From 7b16ab246d5c8241f08c0ffa3a87c9803ec4aa50 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 2 Sep 2020 15:43:52 +0200 Subject: Replace hand-rolled doc targets with ones provided by Qt This helps to provide correct include paths to QDoc as it requires them from 5.11 onwards. Add a custom module header that pulls in the required header files into the doc build. Change-Id: I857ec5cd49e6c6c586baed6f1e39f2e9ceb900b4 Reviewed-by: Katja Marttila Reviewed-by: Leena Miettinen --- doc/config/ifw.qdocconf | 101 +++++------------------------------ doc/doc.pri | 57 -------------------- doc/doc.pro | 12 +++++ doc/ifw-online.qdocconf | 20 +++++++ doc/ifw.qdocconf | 3 ++ doc/includes/IFWDoc | 114 ++++++++++++++++++++++++++++++++++++++++ doc/installerfw-online.qdocconf | 20 ------- doc/installerfw.qdocconf | 3 -- 8 files changed, 163 insertions(+), 167 deletions(-) delete mode 100644 doc/doc.pri create mode 100644 doc/doc.pro create mode 100644 doc/ifw-online.qdocconf create mode 100644 doc/ifw.qdocconf create mode 100644 doc/includes/IFWDoc delete mode 100644 doc/installerfw-online.qdocconf delete mode 100644 doc/installerfw.qdocconf (limited to 'doc') diff --git a/doc/config/ifw.qdocconf b/doc/config/ifw.qdocconf index d58de3ab4..5a1e6cfa5 100644 --- a/doc/config/ifw.qdocconf +++ b/doc/config/ifw.qdocconf @@ -2,17 +2,24 @@ include($QT_INSTALL_DOCS/global/qt-cpp-defines.qdocconf) include($QT_INSTALL_DOCS/global/compat.qdocconf) include($QT_INSTALL_DOCS/global/fileextensions.qdocconf) +moduleheader = IFWDoc +includepaths += -I ./includes \ + -I ../src/libs/installer \ + -I ../src/libs/kdtools \ + -I ../src/libs/7zip/unix/CPP \ + -I ../src/libs/7zip/win/CPP + language = Cpp -project = "Qt Installer Framework" +project = "QtInstallerFramework" description = "Qt Installer Framework Manual" url = http://qt-project.org/doc/qtinstallerframework/ sourcedirs += ../../src/libs/installer ../../src/libs/kdtools ../includes headerdirs += ../../src/libs/installer ../../src/libs/kdtools -imagedirs = $SRCDIR/images $SRCDIR/templates/images -outputdir = $OUTDIR -exampledirs = $SRCDIR ../../examples +imagedirs = ../images ../templates/images +exampledirs = .. \ + ../../examples headers.fileextensions = "*.h" sources.fileextensions = "*.qdoc *.qdocinc *.cpp" @@ -29,7 +36,7 @@ indexes += $QT_INSTALL_DOCS/qtcore/qtcore.index \ qhp.projects = InstallerFramework qhp.InstallerFramework.file = ifw.qhp -qhp.InstallerFramework.namespace = org.qt-project.ifw.$IFW_VERSION_TAG +qhp.InstallerFramework.namespace = org.qt-project.ifw.$QT_VERSION_TAG qhp.InstallerFramework.virtualFolder = doc qhp.InstallerFramework.indexTitle = Qt Installer Framework Manual qhp.InstallerFramework.filterAttributes = ifw @@ -42,7 +49,8 @@ qhp.InstallerFramework.subprojects.manual.title = Qt Installer Framework Manual qhp.InstallerFramework.subprojects.manual.indexTitle = Qt Installer Framework Manual qhp.InstallerFramework.subprojects.manual.type = manual -macro.ifwversion = $IFW_VERSION +# For docs, QT_VERSION resolves to IFW version +macro.ifwversion = $QT_VERSION # commands borrowed from qtbase/doc/global/macros.qdocconf @@ -62,84 +70,3 @@ outputprefixes = QML outputprefixes.QML = navigation.homepage = "Qt Installer Framework Manual" - -defines += ABSTRACTTASK_H \ - ADMINAUTHORIZATION_H \ - COMPONENT_P_H \ - COMPONENTCHECKER_H \ - CONSTANTS_H \ - CONSUMEOUTPUTOPERATION_H \ - COPYDIRECTORYOPERATION_H \ - COPYFILETASK_H \ - CREATEDESKTOPENTRYOPERATION_H \ - CREATELINKOPERATION_H \ - CREATELOCALREPOSITORYOPERATION_H \ - CREATESHORTCUTOPERATION_H \ - DOWNLOADARCHIVESJOB_H \ - DOWNLOADFILETASK_H \ - DOWNLOADFILETASK_P_H \ - ELEVATEDEXECUTEOPERATION_H \ - ENVIRONMENTVARIABLESOPERATION_H \ - ERRORS_H \ - EXTRACTARCHIVEOPERATION_H \ - EXTRACTARCHIVEOPERATION_P_H \ - FAKESTOPPROCESSFORUPDATEOPERATION_H \ - FILEIO_H \ - FILEUTILS_H \ - GLOBALS_H \ - GLOBALSETTINGSOPERATION_H \ - GRAPH_H \ - INSTALLERCALCULATOR_H \ - INSTALLICONSOPERATION_H \ - KD_UPDATER_H \ - KD_UPDATER_UPDATE_INFO_DATA_H \ - KD_UPDATER_UPDATE_INFO_H \ - KD_UPDATER_UPDATE_OPERATIONS_H \ - KDSYSINFO_H \ - KEEPALIVEOBJECT_H \ - LIBINSTALLER_ENVIRONMENT_H \ - LICENSEOPERATION_H \ - LINEREPLACEOPERATION_H \ - METADATAJOB_H \ - METADATAJOB_P_H \ - MINIMUMPROGRESSOPERATION_H \ - OBSERVER_H \ - PACKAGEMANAGERCORE_P_H \ - PACKAGEMANAGERCOREDATA_H \ - PACKAGEMANAGERPAGEFACTORY_H \ - PACKAGEMANAGERPROXYFACTORY_H \ - PERMISSIONSETTINGS_H \ - PROGRESSCOORDINATOR_H \ - PROTOCOL_H \ - PROXYCREDENTIALSDIALOG_H \ - Q_OS_.* \ - QINSTALLER_FILEUTILS_H \ - QINSTALLER_GLOBAL_H \ - QINSTALLER_INIT_H \ - QINSTALLER_UTILS_H \ - QPROCESSWRAPPER_H \ - QSETTINGSWRAPPER_H \ - QT_VERSION \ - REGISTERFILETYPEOPERATION_H \ - REMOTECLIENT_H \ - REMOTECLIENT_P_H \ - REMOTEFILEENGINE_H \ - REMOTEOBJECT_H \ - REMOTESERVER_H \ - REMOTESERVER_P_H \ - REMOTESERVERCONNECTION_H \ - REPLACEOPERATION_H \ - REPOSITORY_H \ - SCRIPTENGINE_P_H \ - SELFRESTARTOPERATION_H \ - SERVERAUTHENTICATIONDIALOG_H \ - SETTINGS_H \ - SETTINGSOPERATION_H \ - SIMPLEMOVEFILEOPERATION_H \ - TESTREPOSITORY_H \ - UI_PROXYCREDENTIALSDIALOG_H \ - UI_SERVERAUTHENTICATIONDIALOG_H \ - UNINSTALLERCALCULATOR_H \ - UNZIPTASK_H \ - REPOSITORYCATEGORY_H \ - COMPONENTSELECTIONPAGE_P_H diff --git a/doc/doc.pri b/doc/doc.pri deleted file mode 100644 index a11a39b53..000000000 --- a/doc/doc.pri +++ /dev/null @@ -1,57 +0,0 @@ -# Adapted from doc/doc.pri in Qt Creator. - -QDOC_BIN = $$[QT_INSTALL_BINS]/qdoc -win32:QDOC_BIN = $$replace(QDOC_BIN, "/", "\\") - -IFW_VERSION_TAG = $$replace(IFW_VERSION_STR, "[-.]", ) - -defineReplace(cmdEnv) { - !equals(QMAKE_DIR_SEP, /): 1 ~= s,^(.*)$,(set \\1) &&,g - return("$$1") -} - -QDOC = $$cmdEnv(SRCDIR=$$PWD OUTDIR=$$OUT_PWD/doc/html IFW_VERSION=$$IFW_VERSION_STR IFW_VERSION_TAG=$$IFW_VERSION_TAG QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS]) $$QDOC_BIN - -unix { - HELPGENERATOR = $$[QT_INSTALL_BINS]/qhelpgenerator -} else { - # Always run qhelpgenerator inside its own cmd; this is a workaround for - # an unusual bug which causes qhelpgenerator.exe to do nothing - HELPGENERATOR = cmd /C $$replace($$list($$[QT_INSTALL_BINS]/qhelpgenerator.exe), "/", "\\") -} -HELPGENERATOR = $$HELPGENERATOR -platform minimal - -QHP_FILE = $$OUT_PWD/doc/html/ifw.qhp -QCH_FILE = $$OUT_PWD/doc/ifw.qch - -html_docs.commands = $$QDOC $$PWD/installerfw.qdocconf -html_docs.files = $$QHP_FILE - -html_docs_online.commands = $$QDOC $$PWD/installerfw-online.qdocconf -html_docs_online.files = $$QHP_FILE - -qch_docs.commands = $$HELPGENERATOR -o $$QCH_FILE $$QHP_FILE -qch_docs.depends += html_docs -qch_docs.files = $$QCH_FILE - -docs_online.depends = html_docs_online -QMAKE_EXTRA_TARGETS += html_docs_online docs_online - -macx { - DOC_DIR = "$${OUT_PWD}/bin/Ifw.app/Contents/Resources/doc" - cp_docs.commands = mkdir -p \"$${DOC_DIR}\" ; $${QMAKE_COPY} \"$${QCH_FILE}\" \"$${DOC_DIR}\" - cp_docs.depends += qch_docs - docs.depends = cp_docs - QMAKE_EXTRA_TARGETS += html_docs qch_docs cp_docs docs ht -} -!macx { - docs.depends = qch_docs - QMAKE_EXTRA_TARGETS += html_docs qch_docs docs -} - -OTHER_FILES = $$HELP_DEP_FILES - -fixnavi.commands = \ - cd $$replace(PWD, "/", $$QMAKE_DIR_SEP) && \ - perl fixnavi.pl installerfw.qdoc . -QMAKE_EXTRA_TARGETS += fixnavi diff --git a/doc/doc.pro b/doc/doc.pro new file mode 100644 index 000000000..b22f139f0 --- /dev/null +++ b/doc/doc.pro @@ -0,0 +1,12 @@ +TEMPLATE = aux + +CONFIG += force_qt +QT += core-private widgets concurrent network qml xml + +CONFIG += force_independent +QMAKE_DOCS_TARGETDIR = html + +build_online_docs: \ + QMAKE_DOCS = $$PWD/ifw-online.qdocconf +else: \ + QMAKE_DOCS = $$PWD/ifw.qdocconf diff --git a/doc/ifw-online.qdocconf b/doc/ifw-online.qdocconf new file mode 100644 index 000000000..b93b52ef2 --- /dev/null +++ b/doc/ifw-online.qdocconf @@ -0,0 +1,20 @@ +# Run qdoc from the directory that contains this file. +include(config/ifw.qdocconf) + +HTML.footer = \ + " \n" \ + "

\n" \ + " © 2018 The Qt Company Ltd.\n" \ + " Documentation contributions included herein are the copyrights of\n" \ + " their respective owners. " \ + " The documentation provided herein is licensed under the terms of the" \ + " GNU Free Documentation" \ + " License version 1.3 as published by the Free Software Foundation. " \ + " The Qt Company, Qt and their respective logos are trademarks of The Qt Company Ltd " \ + " in Finland and/or other countries worldwide. All other trademarks are property\n" \ + " of their respective owners.

\n" + +include($QT_INSTALL_DOCS/global/qt-html-templates-online.qdocconf) + +# Add an .html file with sidebar content, used in the online style +HTML.stylesheets += config/style/qt5-sidebar.html diff --git a/doc/ifw.qdocconf b/doc/ifw.qdocconf new file mode 100644 index 000000000..a5c7f185c --- /dev/null +++ b/doc/ifw.qdocconf @@ -0,0 +1,3 @@ +# Run qdoc from the directory that contains this file. +include(config/ifw.qdocconf) +include($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf) diff --git a/doc/includes/IFWDoc b/doc/includes/IFWDoc new file mode 100644 index 000000000..d4b598a0a --- /dev/null +++ b/doc/includes/IFWDoc @@ -0,0 +1,114 @@ +#pragma once + +#ifdef Q_CLANG_QDOC + +// installer +#include "abstractfiletask.h" +#include "abstracttask.h" +#include "adminauthorization.h" +#include "binarycontent.h" +#include "binaryformatengine.h" +#include "binaryformatenginehandler.h" +#include "binaryformat.h" +#include "binarylayout.h" +#include "commandlineparser.h" +#include "componentchecker.h" +#include "component.h" +#include "componentmodel.h" +#include "constants.h" +#include "consumeoutputoperation.h" +#include "copydirectoryoperation.h" +#include "copyfiletask.h" +#include "createdesktopentryoperation.h" +#include "createlinkoperation.h" +#include "createlocalrepositoryoperation.h" +#include "createshortcutoperation.h" +#include "downloadarchivesjob.h" +#include "downloadfiletask.h" +#include "elevatedexecuteoperation.h" +#include "environmentvariablesoperation.h" +#include "errors.h" +#include "extractarchiveoperation.h" +#include "fakestopprocessforupdateoperation.h" +#include "fileio.h" +#include "fileutils.h" +#include "globalsettingsoperation.h" +#include "globals.h" +#include "graph.h" +#include "init.h" +#include "installercalculator.h" +#include "installer_global.h" +#include "installiconsoperation.h" +#include "keepaliveobject.h" +#include "lazyplaintextedit.h" +#include "licenseoperation.h" +#include "linereplaceoperation.h" +#include "lib7z_extract.h" +#include "lib7z_list.h" +#include "lib7z_facade.h" +#include "link.h" +#include "messageboxhandler.h" +#include "metadatajob.h" +#include "minimumprogressoperation.h" +#include "observer.h" +#include "packagemanagercoredata.h" +#include "packagemanagercore.h" +#include "packagemanagergui.h" +#include "packagemanagerpagefactory.h" +#include "packagemanagerproxyfactory.h" +#include "packagesource.h" +#include "performinstallationform.h" +#include "permissionsettings.h" +#include "productkeycheck.h" +#include "progresscoordinator.h" +#include "protocol.h" +#include "proxycredentialsdialog.h" +#include "qinstallerglobal.h" +#include "qprocesswrapper.h" +#include "qsettingswrapper.h" +#include "qtpatch.h" +#include "range.h" +#include "registerfiletypeoperation.h" +#include "remoteclient.h" +#include "remotefileengine.h" +#include "remoteobject.h" +#include "remoteserverconnection.h" +#include "remoteserver.h" +#include "replaceoperation.h" +#include "repositorycategory.h" +#include "repository.h" +#include "runextensions.h" +#include "scriptengine.h" +#include "selfrestartoperation.h" +#include "serverauthenticationdialog.h" +#include "settings.h" +#include "settingsoperation.h" +#include "simplemovefileoperation.h" +#include "systeminfo.h" +#include "testrepository.h" +#include "uninstallercalculator.h" +#include "unziptask.h" +#include "utils.h" + +//kdtools +#include "environment.h" +#include "filedownloaderfactory.h" +#include "filedownloader.h" +#include "genericfactory.h" +#include "job.h" +#include "kdtoolsglobal.h" +#include "localpackagehub.h" +#include "lockfile.h" +#include "runoncechecker.h" +#include "selfrestarter.h" +#include "sysinfo.h" +#include "task.h" +#include "updatefinder.h" +#include "update.h" +#include "updateoperationfactory.h" +#include "updateoperation.h" +#include "updateoperations.h" +#include "updater.h" + +#endif // Q_CLANG_QDOC + diff --git a/doc/installerfw-online.qdocconf b/doc/installerfw-online.qdocconf deleted file mode 100644 index b93b52ef2..000000000 --- a/doc/installerfw-online.qdocconf +++ /dev/null @@ -1,20 +0,0 @@ -# Run qdoc from the directory that contains this file. -include(config/ifw.qdocconf) - -HTML.footer = \ - " \n" \ - "

\n" \ - " © 2018 The Qt Company Ltd.\n" \ - " Documentation contributions included herein are the copyrights of\n" \ - " their respective owners. " \ - " The documentation provided herein is licensed under the terms of the" \ - " GNU Free Documentation" \ - " License version 1.3 as published by the Free Software Foundation. " \ - " The Qt Company, Qt and their respective logos are trademarks of The Qt Company Ltd " \ - " in Finland and/or other countries worldwide. All other trademarks are property\n" \ - " of their respective owners.

\n" - -include($QT_INSTALL_DOCS/global/qt-html-templates-online.qdocconf) - -# Add an .html file with sidebar content, used in the online style -HTML.stylesheets += config/style/qt5-sidebar.html diff --git a/doc/installerfw.qdocconf b/doc/installerfw.qdocconf deleted file mode 100644 index a5c7f185c..000000000 --- a/doc/installerfw.qdocconf +++ /dev/null @@ -1,3 +0,0 @@ -# Run qdoc from the directory that contains this file. -include(config/ifw.qdocconf) -include($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf) -- cgit v1.2.3