Commit 052e0223 authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Move welcome page to separate sub directory 'apphelp'.

parent 18784e96
......@@ -79,18 +79,8 @@ if(BUILD_KF5)
string(REPLACE "kdex.dtd" "kdedbx45.dtd" index_file "${index_file}")
file(WRITE "index-kf5.docbook" "${index_file}")
kdoctools_create_handbook(index-kf5.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR umbrello)
file(READ "welcome.docbook" index_file)
string(REPLACE "4.2" "4.5" index_file "${index_file}")
string(REPLACE "kdex.dtd" "kdedbx45.dtd" index_file "${index_file}")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/welcome.docbook "${index_file}")
if(WITH_WELCOME_PAGE)
kdoctools_create_article(${CMAKE_CURRENT_BINARY_DIR}/welcome.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR umbrello)
endif()
else()
kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR umbrello)
if(WITH_WELCOME_PAGE)
kdoctools_create_article(welcome.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR umbrello)
endif()
endif()
add_subdirectory(apphelp)
########### install files ###############
if(BUILD_KF5)
file(READ "welcome.docbook" index_file)
string(REPLACE "4.2" "4.5" index_file "${index_file}")
string(REPLACE "kdex.dtd" "kdedbx45.dtd" index_file "${index_file}")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/welcome.docbook "${index_file}")
if(WITH_WELCOME_PAGE)
kdoctools_create_article(${CMAKE_CURRENT_BINARY_DIR}/welcome.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR umbrello/apphelp)
endif()
else()
if(WITH_WELCOME_PAGE)
kdoctools_create_article(welcome.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR umbrello/apphelp)
endif()
endif()
......@@ -21,7 +21,7 @@ QString UMLAppPrivate::findWelcomeFile()
{
QStringList dirList;
// from build dir
dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../doc"));
dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../doc/apphelp"));
// determine path from installation
#if QT_VERSION > 0x050000
......@@ -34,27 +34,27 @@ QString UMLAppPrivate::findWelcomeFile()
// from custom install
foreach(const QString &lang, langList) {
dirList.append(QCoreApplication::applicationDirPath() + QString(QLatin1String("/../share/doc/HTML/%1/umbrello")).arg(lang));
dirList.append(QCoreApplication::applicationDirPath() + QString(QLatin1String("/../share/doc/HTML/%1/umbrello/apphelp")).arg(lang));
}
dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../share/doc/HTML/en/umbrello"));
dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../share/doc/HTML/en/umbrello/apphelp"));
QStringList locations = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
// from real installation
foreach(const QString &location, locations) {
foreach(const QString &lang, langList) {
dirList.append(QString(QLatin1String("%1/doc/HTML/%2/umbrello")).arg(location).arg(lang));
dirList.append(QString(QLatin1String("%1/doc/HTML/%2/umbrello/apphelp")).arg(location).arg(lang));
}
dirList.append(QString(QLatin1String("%1/doc/HTML/en/umbrello")).arg(location));
dirList.append(QString(QLatin1String("%1/doc/HTML/en/umbrello/apphelp")).arg(location));
}
#else
KLocale *local = KGlobal::locale();
QString lang = local->language();
// from custom install
dirList.append(QCoreApplication::applicationDirPath() + QString(QLatin1String("/../share/doc/HTML/%1/umbrello")).arg(lang));
dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../share/doc/HTML/en/umbrello"));
dirList.append(QCoreApplication::applicationDirPath() + QString(QLatin1String("/../share/doc/HTML/%1/umbrello/apphelp")).arg(lang));
dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../share/doc/HTML/en/umbrello/apphelp"));
// /usr/share/doc/kde
dirList.append(KStandardDirs::installPath("html") + lang + QLatin1String("/umbrello"));
dirList.append(KStandardDirs::installPath("html") + lang + QLatin1String("/umbrello/apphelp"));
#endif
foreach(const QString &dir, dirList) {
QString filePath = dir + QLatin1String("/welcome.html");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment