diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-02-25 16:27:35 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-02-25 17:38:30 +0100 |
commit | 0816b8e476d20e00cbcffd1e71162adf93e85658 (patch) | |
tree | 537711cbc6285e6108fb745fb98665114e27b806 /src | |
parent | e455dcff532c6cc1482c844d3f1ffb7130f082ee (diff) |
Do not put the plugins where the resources are.
That's not where they belong.
Also make less assumptions about the file path leading to them.
Ideally, we should also do the latter for the stuff in share/,
but then someone would have to touch the horrific qmake code in static.pro.
Task-number: QTCREATORBUG-10074
Change-Id: Ide9c4b83dcf0cd7a62b57643b79caf05662358cb
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/app/qbs/commandlinefrontend.cpp | 2 | ||||
-rw-r--r-- | src/lib/corelib/tools/preferences.cpp | 12 | ||||
-rw-r--r-- | src/lib/corelib/tools/preferences.h | 4 | ||||
-rw-r--r-- | src/plugins/plugins.pri | 18 | ||||
-rw-r--r-- | src/plugins/scanner/scannerplugin.qbs | 2 |
5 files changed, 19 insertions, 19 deletions
diff --git a/src/app/qbs/commandlinefrontend.cpp b/src/app/qbs/commandlinefrontend.cpp index 7189a202b..09e14831f 100644 --- a/src/app/qbs/commandlinefrontend.cpp +++ b/src/app/qbs/commandlinefrontend.cpp @@ -143,7 +143,7 @@ void CommandLineFrontend::start() profileName = m_settings->defaultProfile(); const Preferences prefs(m_settings, profileName); params.setSearchPaths(prefs.searchPaths(qbsRootPath)); - params.setPluginPaths(prefs.pluginPaths(qbsRootPath)); + params.setPluginPaths(prefs.pluginPaths(qbsRootPath + QLatin1String("/lib"))); params.setBuildRoot(buildDirectory(profileName)); params.setBuildConfiguration(baseConfig); params.setOverriddenValues(userConfig); diff --git a/src/lib/corelib/tools/preferences.cpp b/src/lib/corelib/tools/preferences.cpp index bdff7c67b..174944dbf 100644 --- a/src/lib/corelib/tools/preferences.cpp +++ b/src/lib/corelib/tools/preferences.cpp @@ -84,12 +84,12 @@ QString Preferences::defaultBuildDirectory() const /*! * \brief Returns the list of paths where qbs looks for module definitions and such. - * If there is no such setting, \c qbsRootPath will be used to look up a fallback location. + * If there is no such setting, they will be looked up at \c{baseDir}/share/qbs. */ -QStringList Preferences::searchPaths(const QString &qbsRootPath) const +QStringList Preferences::searchPaths(const QString &baseDir) const { const QStringList searchPaths = pathList(QLatin1String("qbsSearchPaths"), - qbsRootPath + QLatin1String("/share/qbs")); + baseDir + QLatin1String("/share/qbs")); // TODO: Remove in 1.2. const QStringList deprecatedSearchPaths = getPreference(QLatin1String("qbsPath")).toString() @@ -103,11 +103,11 @@ QStringList Preferences::searchPaths(const QString &qbsRootPath) const /*! * \brief Returns the list of paths where qbs looks for plugins. - * If there is no such setting, \c qbsRootPath will be used to look up a fallback location. + * If there is no such setting, they will be looked up at \c{baseDir}/qbs/plugins. */ -QStringList Preferences::pluginPaths(const QString &qbsRootPath) const +QStringList Preferences::pluginPaths(const QString &baseDir) const { - return pathList(QLatin1String("pluginsPath"), qbsRootPath + QLatin1String("/lib/qbs/plugins")); + return pathList(QLatin1String("pluginsPath"), baseDir + QLatin1String("/qbs/plugins")); } QVariant Preferences::getPreference(const QString &key, const QVariant &defaultValue) const diff --git a/src/lib/corelib/tools/preferences.h b/src/lib/corelib/tools/preferences.h index e5e6c9bb6..e6600947c 100644 --- a/src/lib/corelib/tools/preferences.h +++ b/src/lib/corelib/tools/preferences.h @@ -46,8 +46,8 @@ public: int jobs() const; QString shell() const; QString defaultBuildDirectory() const; - QStringList searchPaths(const QString &qbsRootPath = QString()) const; - QStringList pluginPaths(const QString &qbsRootPath = QString()) const; + QStringList searchPaths(const QString &baseDir = QString()) const; + QStringList pluginPaths(const QString &baseDir = QString()) const; private: QVariant getPreference(const QString &key, const QVariant &defaultValue = QVariant()) const; diff --git a/src/plugins/plugins.pri b/src/plugins/plugins.pri index 40c6b7f8f..46b33d431 100644 --- a/src/plugins/plugins.pri +++ b/src/plugins/plugins.pri @@ -1,21 +1,21 @@ -!isEmpty(QBS_RESOURCES_BUILD_DIR) { - destdirPrefix = $${QBS_RESOURCES_BUILD_DIR} +!isEmpty(QBS_PLUGINS_BUILD_DIR) { + destdirPrefix = $${QBS_PLUGINS_BUILD_DIR} } else { greaterThan(QT_MAJOR_VERSION, 4): \ - destdirPrefix = $$shadowed($$PWD)/../.. + destdirPrefix = $$shadowed($$PWD)/../../lib else: \ - destdirPrefix = ../../../.. # Note: Will break if pri file is included from some other place + destdirPrefix = ../../../../lib # Note: Will break if pri file is included from some other place } -DESTDIR = $${destdirPrefix}/lib/qbs/plugins +DESTDIR = $${destdirPrefix}/qbs/plugins TEMPLATE = lib CONFIG += depend_includepath CONFIG += shared unix: CONFIG += plugin -!isEmpty(QBS_RESOURCES_INSTALL_DIR): \ - installPrefix = $${QBS_RESOURCES_INSTALL_DIR} +!isEmpty(QBS_PLUGINS_INSTALL_DIR): \ + installPrefix = $${QBS_PLUGINS_INSTALL_DIR} else: \ - installPrefix = $${QBS_INSTALL_PREFIX} -target.path = $${installPrefix}/lib/qbs/plugins + installPrefix = $${QBS_INSTALL_PREFIX}/lib +target.path = $${installPrefix}/qbs/plugins INSTALLS += target diff --git a/src/plugins/scanner/scannerplugin.qbs b/src/plugins/scanner/scannerplugin.qbs index ee841a4d0..975c510cc 100644 --- a/src/plugins/scanner/scannerplugin.qbs +++ b/src/plugins/scanner/scannerplugin.qbs @@ -7,6 +7,6 @@ DynamicLibrary { Group { fileTagsFilter: ["dynamiclibrary"] qbs.install: true - qbs.installDir: project.resourcesInstallDir + "/lib/qbs/plugins" + qbs.installDir: project.pluginsInstallDir + "/qbs/plugins" } } |