From b12ba08de0bd422659fe882ac4d5faf14d3fd207 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 19 Jun 2023 16:06:29 +0200 Subject: [PATCH] Build systems: Do not put qbs plugins under the qtcreator plugins dir Otherwise, the extension system will unnecessarily try to load them at start-up. Change-Id: I7a932904835cb387e3cf10924ca79a58e5f92b33 Reviewed-by: Eike Ziller --- cmake/QtCreatorAPIInternal.cmake | 2 +- qbs/modules/qbsbuildconfig/qbsbuildconfig.qbs | 7 +++++-- qbs/modules/qtc/qtc.qbs | 2 +- src/shared/CMakeLists.txt | 6 +++++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/cmake/QtCreatorAPIInternal.cmake b/cmake/QtCreatorAPIInternal.cmake index ecb6d17f360..0e990b58fbd 100644 --- a/cmake/QtCreatorAPIInternal.cmake +++ b/cmake/QtCreatorAPIInternal.cmake @@ -49,7 +49,7 @@ if (APPLE) set(_IDE_LIBRARY_BASE_PATH "Frameworks") set(_IDE_LIBRARY_PATH "${_IDE_OUTPUT_PATH}/${_IDE_LIBRARY_BASE_PATH}") - set(_IDE_PLUGIN_PATH "${_IDE_OUTPUT_PATH}/PlugIns") + set(_IDE_PLUGIN_PATH "${_IDE_OUTPUT_PATH}/PlugIns/qtcreator") set(_IDE_LIBEXEC_PATH "${_IDE_OUTPUT_PATH}/Resources/libexec") set(_IDE_DATA_PATH "${_IDE_OUTPUT_PATH}/Resources") set(_IDE_DOC_PATH "${_IDE_OUTPUT_PATH}/Resources/doc") diff --git a/qbs/modules/qbsbuildconfig/qbsbuildconfig.qbs b/qbs/modules/qbsbuildconfig/qbsbuildconfig.qbs index eca4f33508e..1ee8cef7a16 100644 --- a/qbs/modules/qbsbuildconfig/qbsbuildconfig.qbs +++ b/qbs/modules/qbsbuildconfig/qbsbuildconfig.qbs @@ -34,7 +34,10 @@ Module { ? ["@loader_path/" + FileInfo.relativePath('/' + appInstallDir, '/' + libInstallDir)] : ["$ORIGIN/..", "$ORIGIN/../" + qtc.ide_library_path] property string resourcesInstallDir: qtc.ide_data_path + "/qbs" - property string pluginsInstallDir: qtc.ide_plugin_path + "/qbs/plugins" + property string pluginsInstallBaseDir: qbs.targetOS.contains("darwin") + ? qtc.ide_plugin_path + "/.." + : qtc.ide_library_path + "/.." + property string pluginsInstallDir: pluginsInstallBaseDir + "/qbs/plugins" property string qmlTypeDescriptionsInstallDir: qtc.ide_data_path + "/qml-type-descriptions" property string appInstallDir: qtc.ide_bin_path property string libexecInstallDir: qtc.ide_libexec_path @@ -44,7 +47,7 @@ Module { property string relativeLibexecPath: FileInfo.relativePath('/' + appInstallDir, '/' + libexecInstallDir) property string relativePluginsPath: FileInfo.relativePath('/' + appInstallDir, - '/' + qtc.ide_plugin_path) + '/' + pluginsInstallBaseDir) property string relativeSearchPath: FileInfo.relativePath('/' + appInstallDir, '/' + resourcesInstallDir) } diff --git a/qbs/modules/qtc/qtc.qbs b/qbs/modules/qtc/qtc.qbs index 8a78e329b07..75f85ab79dc 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -41,7 +41,7 @@ Module { } property string ide_plugin_path: { if (qbs.targetOS.contains("macos")) - return ide_app_target + ".app/Contents/PlugIns" + return ide_app_target + ".app/Contents/PlugIns/qtcreator" else if (qbs.targetOS.contains("windows")) return libDirName + "/qtcreator/plugins" else diff --git a/src/shared/CMakeLists.txt b/src/shared/CMakeLists.txt index 93409b0bf45..7dc20458d2d 100644 --- a/src/shared/CMakeLists.txt +++ b/src/shared/CMakeLists.txt @@ -19,7 +19,11 @@ if (BUILD_QBS) set(QBS_LIB_INSTALL_DIR "${IDE_LIBRARY_PATH}" CACHE STRING "" FORCE) set(QBS_DLL_INSTALL_DIR "${IDE_BIN_PATH}" CACHE STRING "" FORCE) set(QBS_LIBEXEC_INSTALL_DIR "${IDE_LIBEXEC_PATH}" CACHE STRING "" FORCE) - set(QBS_PLUGINS_INSTALL_BASE "${IDE_PLUGIN_PATH}" CACHE STRING "" FORCE) + if (APPLE) + set(QBS_PLUGINS_INSTALL_BASE "${IDE_PLUGIN_PATH}/../" CACHE STRING "" FORCE) + else() + set(QBS_PLUGINS_INSTALL_BASE "${_IDE_LIBRARY_BASE_PATH}/" CACHE STRING "" FORCE) + endif() set(QBS_RESOURCES_INSTALL_BASE "${IDE_DATA_PATH}/qbs" CACHE STRING "" FORCE) set(QBS_DOC_INSTALL_DIR "${IDE_DOC_PATH}" CACHE STRING "" FORCE) set(QBS_HEADERS_INSTALL_DIR "${IDE_DATA_PATH}/qbs/include/qbs" CACHE STRING "" FORCE)