diff options
author | Tim Jenssen <tim.jenssen@qt.io> | 2024-02-20 18:56:42 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2024-02-20 20:19:40 +0000 |
commit | 0416941fd150b7163795ccdf1b514aa2d64221c8 (patch) | |
tree | 8d62c95863ed4da9f7a44e35fe1b3860ea1a14c0 | |
parent | d68ad36ce1a360bf810b01ec27eaf9b474e18a26 (diff) |
CMake: introduce option BUILD_DESIGNSTUDIO
This change needs an update of the super repository
If you want to buid QtDesignStudio documentation no branding path
is necessary anymore:
cmake -DCMAKE_GENERATOR:STRING=Ninja -DWITH_DOCS=ON -DCMAKE_PREFIX_PATH:PATH=C:\Qt_online\6.5.3\msvc2019_64 -DBUILD_DESIGNSTUDIO=ON C:/dev/tqtc-qtc-super/qtcreator
cmake --build . --target html_docs
Task-number: QDS-9827
Task-number: QTCREATORBUG-24222
Change-Id: Ic779b6ab57c71c7f6fa53467bf1ba3ee17cab0ea
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | dist/branding/qtdesignstudio/CMakeLists.txt | 1 | ||||
-rw-r--r-- | dist/branding/qtdesignstudio/QtCreatorIDEBranding.cmake | 45 | ||||
-rw-r--r-- | dist/branding/qtdesignstudio/QtProject/QtDesignStudio.ini | 1 | ||||
-rw-r--r-- | doc/qtcreatordev/src/qtcreator-documentation.qdoc | 9 | ||||
-rw-r--r-- | doc/qtdesignstudio/README.md | 20 | ||||
-rw-r--r-- | share/qtcreator/qmldesigner/EasingCurves.ini (renamed from dist/branding/qtdesignstudio/QtProject/qtdesignstudio/EasingCurves.ini) | 0 | ||||
-rw-r--r-- | src/plugins/qmldesigner/CMakeLists.txt | 13 | ||||
-rw-r--r-- | src/plugins/qmldesigner/components/timelineeditor/preseteditor.cpp | 2 |
9 files changed, 70 insertions, 26 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2aefb1a58d..63ca493c29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,10 @@ cmake_minimum_required(VERSION 3.16) +option(BUILD_DESIGNSTUDIO "Build and install design studio plugins, examples and settings." OFF) +if (BUILD_DESIGNSTUDIO) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/dist/branding/qtdesignstudio") +endif() + ## Add paths to check for cmake modules: list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(Utils) diff --git a/dist/branding/qtdesignstudio/CMakeLists.txt b/dist/branding/qtdesignstudio/CMakeLists.txt deleted file mode 100644 index 7886ac3ef6..0000000000 --- a/dist/branding/qtdesignstudio/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -install(DIRECTORY QtProject DESTINATION "${IDE_DATA_PATH}") diff --git a/dist/branding/qtdesignstudio/QtCreatorIDEBranding.cmake b/dist/branding/qtdesignstudio/QtCreatorIDEBranding.cmake index e2131bcc75..204cedffdb 100644 --- a/dist/branding/qtdesignstudio/QtCreatorIDEBranding.cmake +++ b/dist/branding/qtdesignstudio/QtCreatorIDEBranding.cmake @@ -16,3 +16,48 @@ set(IDE_DOC_FILE_ONLINE "qtdesignstudio/qtdesignstudio-online.qdocconf") set(IDE_ICON_PATH "${CMAKE_CURRENT_LIST_DIR}") set(IDE_LOGO_PATH "${CMAKE_CURRENT_LIST_DIR}") + +set(DESIGNSTUDIO_PLUGINS + Android + BareMetal + Boot2Qt + CMakeProjectManager + CodePaster + Core + CppEditor + Debugger + Designer + DiffEditor + EffectComposer + Help + Insight + LanguageClient + McuSupport + ProjectExplorer + QmakeProjectManager + QmlDesigner + QmlDesignerBase + QmlJSEditor + QmlJSTools + QmlPreview + QmlProjectManager + QtSupport + RemoteLinux + ResourceEditor + StudioPlugin + StudioWelcome + Texteditor + UpdateInfo + VcsBase + assetexporterplugin + componentsplugin + qmlpreviewplugin + qtquickplugin) + +if(DESIGNSTUDIO_EXTRAPLUGINS) + list(APPEND DESIGNSTUDIO_PLUGINS ${DESIGNSTUDIO_EXTRAPLUGINS}) +endif() + +if(NOT BUILD_PLUGINS) + set(BUILD_PLUGINS "${DESIGNSTUDIO_PLUGINS}" CACHE STRING "Build plugins" FORCE) +endif() diff --git a/dist/branding/qtdesignstudio/QtProject/QtDesignStudio.ini b/dist/branding/qtdesignstudio/QtProject/QtDesignStudio.ini index 4685e29f3b..a48e5ded50 100644 --- a/dist/branding/qtdesignstudio/QtProject/QtDesignStudio.ini +++ b/dist/branding/qtdesignstudio/QtProject/QtDesignStudio.ini @@ -52,6 +52,7 @@ flashActionDisabled=true OverrideLanguage=C [General] HideOptionCategories=C++, Debug, Designer, Kits, BuildAndRun, CPaster, LanguageClient, Version Control +SuppressedWarnings=LinkWithQtInstallation [Help] ContextHelpOption=3 diff --git a/doc/qtcreatordev/src/qtcreator-documentation.qdoc b/doc/qtcreatordev/src/qtcreator-documentation.qdoc index 9e567c6fd4..ffed1871a5 100644 --- a/doc/qtcreatordev/src/qtcreator-documentation.qdoc +++ b/doc/qtcreatordev/src/qtcreator-documentation.qdoc @@ -387,8 +387,7 @@ separate doc build folder, not in the project folder. To get the correct product name and version when building \QDS Manual, you - must run CMake with the branding option. The branding data is located in - the \QDS (private) repository, \c tqtc-plugin-qtquickdesigner. + must run CMake with the BUILD_DESIGNSTUDIO option. To build docs with CMake in a separate doc build folder: @@ -408,12 +407,12 @@ \li To also build Extending \QC Manual, add the following option: \c {-DBUILD_DEVELOPER_DOCS=ON} \li To also build the \QDS Manual, add the following option: - \c {"-DCMAKE_MODULE_PATH=<absolute_path_to_qtquickdesignerrepo>/studiodata/branding/"} + \c {-DBUILD_DESIGNSTUDIO=ON} For example: \badcode C:\dev\qtc-doc-build>cmake -DWITH_DOCS=ON -DBUILD_DEVELOPER_DOCS=ON - "-DCMAKE_MODULE_PATH=C:\dev\tqtc-plugin-qtquickdesigner\studiodata\branding" + -DBUILD_DESIGNSTUDIO=ON "-DCMAKE_PREFIX_PATH=C:\Qt\6.4.0\msvc2019_64" C:\dev\qtc-super\qtcreator \endcode @@ -425,7 +424,7 @@ \badcode C:\dev\qtc-doc-build>cmake -DWITH_ONLINE_DOCS=ON -DBUILD_DEVELOPER_DOCS=ON - "-DCMAKE_MODULE_PATH=C:\dev\tqtc-plugin-qtquickdesigner\studiodata\branding" + -DBUILD_DESIGNSTUDIO=ON "-DCMAKE_PREFIX_PATH=C:\Qt\6.4.0\msvc2019_64" C:\dev\qtc-super\qtcreator \endcode diff --git a/doc/qtdesignstudio/README.md b/doc/qtdesignstudio/README.md index c23a21a9a2..bbb46d13bb 100644 --- a/doc/qtdesignstudio/README.md +++ b/doc/qtdesignstudio/README.md @@ -7,22 +7,4 @@ separate table of contents files for each Manual and by using defines to hide and show information depending on which Manual is being built. Because branding information is needed to use the correct product name and -version, you must run `qmake -r` on `qtcreator.pro` with the `IDE_BRANDING_PRI` -option set to the absolute path of `ide_branding.pri` in the Qt Design Studio -repository. - -For example, on Windows enter (all on one line): - -`C:\dev\qtc-super\qtcreator>..\..\..\Qt\5.14.1\msvc2017_64\bin\qmake.exe - qtcreator.pro -r - IDE_BRANDING_PRI=C:\dev\tqtc-plugin-qtquickdesigner\studiodata\branding\ide_branding.pri` - -## Building the Qt Design Studio Manual - -1. Run `qmake` from Qt 5.14.0, or later with the path to the branding - information as a parameter: - `<relative_path_to>\qmake.exe qtcreator.pro -r IDE_BRANDING_PRI=<absolute_path_to>\tqtc-plugin-qtquickdesigner\studiodata\branding\ide_branding.pri` -5. Run `make docs` on Linux and macOS or `nmake docs` on Windows. - -The docs are generated in `qtcreator\doc\html\qtdesignstudio` with the -Qt Design Studio branding. +version. diff --git a/dist/branding/qtdesignstudio/QtProject/qtdesignstudio/EasingCurves.ini b/share/qtcreator/qmldesigner/EasingCurves.ini index 4e7a5b3ab1..4e7a5b3ab1 100644 --- a/dist/branding/qtdesignstudio/QtProject/qtdesignstudio/EasingCurves.ini +++ b/share/qtcreator/qmldesigner/EasingCurves.ini diff --git a/src/plugins/qmldesigner/CMakeLists.txt b/src/plugins/qmldesigner/CMakeLists.txt index 0ca1db5751..f520495d7c 100644 --- a/src/plugins/qmldesigner/CMakeLists.txt +++ b/src/plugins/qmldesigner/CMakeLists.txt @@ -1243,3 +1243,16 @@ extend_qtc_plugin(qtquickplugin qtquickplugin.cpp qtquickplugin.h qtquickplugin.qrc ) + +if (BUILD_DESIGNSTUDIO) + configure_file( + "${QtCreator_SOURCE_DIR}/dist/branding/qtdesignstudio/QtProject/QtDesignStudio.ini" + "${PROJECT_BINARY_DIR}/${IDE_DATA_PATH}/QtProject/${IDE_CASED_ID}.ini" + COPYONLY + ) + install(FILES + ${QtCreator_SOURCE_DIR}/dist/branding/qtdesignstudio/QtProject/QtDesignStudio.ini + DESTINATION ${IDE_DATA_PATH}/QtProject + RENAME ${IDE_CASED_ID}.ini + ) +endif () diff --git a/src/plugins/qmldesigner/components/timelineeditor/preseteditor.cpp b/src/plugins/qmldesigner/components/timelineeditor/preseteditor.cpp index 0f12c6ce2d..b06023242f 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/preseteditor.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/preseteditor.cpp @@ -137,7 +137,7 @@ const char settingsFileName[] = "EasingCurves.ini"; QString settingsFullFilePath(const QSettings::Scope &scope) { if (scope == QSettings::SystemScope) - return Core::ICore::installerResourcePath(settingsFileName).toString(); + return Core::ICore::resourcePath("qmldesigner/%1").toString().arg(settingsFileName); return Core::ICore::userResourcePath(settingsFileName).toString(); } |