forked from qt-creator/qt-creator
Fix location of qbs plugins.
They are not (arch-independent) resources. Task-number: QTCREATORBUG-10074 Change-Id: If257dfc3a8a866003c84331409162699b162eb19 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
@@ -63,6 +63,8 @@
|
||||
|
||||
#include <qbs.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
|
||||
using namespace Core;
|
||||
@@ -462,9 +464,8 @@ void QbsProject::parse(const QVariantMap &config, const Environment &env, const
|
||||
params.setIgnoreDifferentProjectFilePath(false);
|
||||
params.setEnvironment(env.toProcessEnvironment());
|
||||
const qbs::Preferences prefs(QbsManager::settings(), profileName);
|
||||
const QString qbsDir = qbsDirectory();
|
||||
params.setSearchPaths(prefs.searchPaths(qbsDir));
|
||||
params.setPluginPaths(prefs.pluginPaths(qbsDir));
|
||||
params.setSearchPaths(prefs.searchPaths(resourcesBaseDirectory()));
|
||||
params.setPluginPaths(prefs.pluginPaths(pluginsBaseDirectory()));
|
||||
|
||||
// Do the parsing:
|
||||
prepareForParsing();
|
||||
@@ -705,7 +706,7 @@ void QbsProject::updateDeploymentInfo(const qbs::Project &project)
|
||||
activeTarget()->setDeploymentData(deploymentData);
|
||||
}
|
||||
|
||||
QString QbsProject::qbsDirectory() const
|
||||
QString QbsProject::resourcesBaseDirectory() const
|
||||
{
|
||||
const QString qbsInstallDir = QLatin1String(QBS_INSTALL_DIR);
|
||||
if (!qbsInstallDir.isEmpty())
|
||||
@@ -713,5 +714,14 @@ QString QbsProject::qbsDirectory() const
|
||||
return ICore::resourcePath() + QLatin1String("/qbs");
|
||||
}
|
||||
|
||||
QString QbsProject::pluginsBaseDirectory() const
|
||||
{
|
||||
const QString qbsInstallDir = QLatin1String(QBS_INSTALL_DIR);
|
||||
if (!qbsInstallDir.isEmpty())
|
||||
return qbsInstallDir + QLatin1String("/lib/");
|
||||
return QDir::cleanPath(QCoreApplication::applicationDirPath()
|
||||
+ QLatin1String("/../lib/qtcreator"));
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QbsProjectManager
|
||||
|
||||
Reference in New Issue
Block a user