Commit 8eb7c3ef authored by Christian Kandeler's avatar Christian Kandeler

Adapt to qbs' libexec infrastructure.

Change-Id: Ic2d609e017d201b7b3e0b3bcb08359652428aeaa
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
parent 294f8c52
...@@ -61,6 +61,13 @@ exists(src/shared/qbs/qbs.pro) { ...@@ -61,6 +61,13 @@ exists(src/shared/qbs/qbs.pro) {
cache(QBS_APPS_DESTDIR) cache(QBS_APPS_DESTDIR)
QBS_APPS_INSTALL_DIR = $${QTC_PREFIX}/bin QBS_APPS_INSTALL_DIR = $${QTC_PREFIX}/bin
cache(QBS_APPS_INSTALL_DIR) cache(QBS_APPS_INSTALL_DIR)
QBS_LIBEXEC_DESTDIR = $${IDE_LIBEXEC_PATH}
cache(QBS_LIBEXEC_DESTDIR)
QBS_LIBEXEC_INSTALL_DIR = $${QTC_PREFIX}/bin
cache(QBS_LIBEXEC_INSTALL_DIR)
QBS_RELATIVE_LIBEXEC_PATH = $$relative_path($$QBS_LIBEXEC_DESTDIR, $$QBS_APPS_DESTDIR)
isEmpty(QBS_RELATIVE_LIBEXEC_PATH):QBS_RELATIVE_LIBEXEC_PATH = .
cache(QBS_RELATIVE_LIBEXEC_PATH)
QBS_RELATIVE_PLUGINS_PATH = $$relative_path($$QBS_PLUGINS_BUILD_DIR, $$QBS_APPS_DESTDIR$$) QBS_RELATIVE_PLUGINS_PATH = $$relative_path($$QBS_PLUGINS_BUILD_DIR, $$QBS_APPS_DESTDIR$$)
cache(QBS_RELATIVE_PLUGINS_PATH) cache(QBS_RELATIVE_PLUGINS_PATH)
QBS_RELATIVE_SEARCH_PATH = $$relative_path($$QBS_RESOURCES_BUILD_DIR, $$QBS_APPS_DESTDIR) QBS_RELATIVE_SEARCH_PATH = $$relative_path($$QBS_RESOURCES_BUILD_DIR, $$QBS_APPS_DESTDIR)
......
import qbs 1.0 import qbs 1.0
Project { Project {
name: "Qt Creator"
minimumQbsVersion: "1.4" minimumQbsVersion: "1.4"
property bool withAutotests: qbs.buildVariant === "debug" property bool withAutotests: qbs.buildVariant === "debug"
property string ide_version_major: '3' property string ide_version_major: '3'
...@@ -56,6 +57,7 @@ Project { ...@@ -56,6 +57,7 @@ Project {
"QT_NO_CAST_FROM_ASCII" "QT_NO_CAST_FROM_ASCII"
].concat(testsEnabled ? ["WITH_TESTS"] : []) ].concat(testsEnabled ? ["WITH_TESTS"] : [])
qbsSearchPaths: "qbs" qbsSearchPaths: "qbs"
property bool enableQbsJavaSupport: false
references: [ references: [
"src/src.qbs", "src/src.qbs",
......
...@@ -100,6 +100,7 @@ void QbsProjectParser::parse(const QVariantMap &config, const Environment &env, ...@@ -100,6 +100,7 @@ void QbsProjectParser::parse(const QVariantMap &config, const Environment &env,
const qbs::Preferences prefs(QbsManager::settings(), profileName); const qbs::Preferences prefs(QbsManager::settings(), profileName);
params.setSearchPaths(prefs.searchPaths(resourcesBaseDirectory())); params.setSearchPaths(prefs.searchPaths(resourcesBaseDirectory()));
params.setPluginPaths(prefs.pluginPaths(pluginsBaseDirectory())); params.setPluginPaths(prefs.pluginPaths(pluginsBaseDirectory()));
params.setLibexecPath(libExecDirectory());
m_qbsSetupProjectJob = m_project.setupProject(params, QbsManager::logSink(), 0); m_qbsSetupProjectJob = m_project.setupProject(params, QbsManager::logSink(), 0);
...@@ -163,6 +164,14 @@ QString QbsProjectParser::resourcesBaseDirectory() const ...@@ -163,6 +164,14 @@ QString QbsProjectParser::resourcesBaseDirectory() const
return Core::ICore::resourcePath() + QLatin1String("/qbs"); return Core::ICore::resourcePath() + QLatin1String("/qbs");
} }
QString QbsProjectParser::libExecDirectory() const
{
const QString qbsInstallDir = QLatin1String(QBS_INSTALL_DIR);
if (!qbsInstallDir.isEmpty())
return qbsInstallDir + QLatin1String("/libexec");
return Core::ICore::libexecPath();
}
QString QbsProjectParser::pluginsBaseDirectory() const QString QbsProjectParser::pluginsBaseDirectory() const
{ {
const QString qbsInstallDir = QLatin1String(QBS_INSTALL_DIR); const QString qbsInstallDir = QLatin1String(QBS_INSTALL_DIR);
......
...@@ -69,6 +69,7 @@ private slots: ...@@ -69,6 +69,7 @@ private slots:
private: private:
QString pluginsBaseDirectory() const; QString pluginsBaseDirectory() const;
QString resourcesBaseDirectory() const; QString resourcesBaseDirectory() const;
QString libExecDirectory() const;
QString m_projectFilePath; QString m_projectFilePath;
qbs::SetupProjectJob *m_qbsSetupProjectJob; qbs::SetupProjectJob *m_qbsSetupProjectJob;
......
...@@ -7,6 +7,7 @@ QBS_DIRS = \ ...@@ -7,6 +7,7 @@ QBS_DIRS = \
qbscorelib \ qbscorelib \
qbsqtprofilesetup \ qbsqtprofilesetup \
qbsapps \ qbsapps \
qbslibexec \
qbsplugins \ qbsplugins \
qbsstatic qbsstatic
...@@ -15,6 +16,8 @@ qbsqtprofilesetup.subdir = shared/qbs/src/lib/qtprofilesetup ...@@ -15,6 +16,8 @@ qbsqtprofilesetup.subdir = shared/qbs/src/lib/qtprofilesetup
qbsqtprofilesetup.depends = qbscorelib qbsqtprofilesetup.depends = qbscorelib
qbsapps.subdir = shared/qbs/src/app qbsapps.subdir = shared/qbs/src/app
qbsapps.depends = qbsqtprofilesetup qbsapps.depends = qbsqtprofilesetup
qbslibexec.subdir = shared/qbs/src/libexec
qbslibexec.depends = qbscorelib
qbsplugins.subdir = shared/qbs/src/plugins qbsplugins.subdir = shared/qbs/src/plugins
qbsstatic.file = shared/qbs/static.pro qbsstatic.file = shared/qbs/static.pro
......
...@@ -33,12 +33,16 @@ Project { ...@@ -33,12 +33,16 @@ Project {
property string resourcesInstallDir: project.ide_data_path + "/qbs" property string resourcesInstallDir: project.ide_data_path + "/qbs"
property string pluginsInstallDir: project.ide_plugin_path property string pluginsInstallDir: project.ide_plugin_path
property string appInstallDir: project.ide_bin_path property string appInstallDir: project.ide_bin_path
property string libexecInstallDir: project.ide_libexec_path
property string relativeLibexecPath: FileInfo.relativePath(appInstallDir, libexecInstallDir)
property string relativePluginsPath: FileInfo.relativePath(appInstallDir, pluginsInstallDir) property string relativePluginsPath: FileInfo.relativePath(appInstallDir, pluginsInstallDir)
property string relativeSearchPath: FileInfo.relativePath(appInstallDir, property string relativeSearchPath: FileInfo.relativePath(appInstallDir,
resourcesInstallDir) resourcesInstallDir)
property bool enableJava: project.enableQbsJavaSupport
references: [ references: [
qbsBaseDir + "/src/lib/libs.qbs", qbsBaseDir + "/src/lib/libs.qbs",
qbsBaseDir + "/src/libexec/libexec.qbs",
qbsBaseDir + "/src/plugins/plugins.qbs", qbsBaseDir + "/src/plugins/plugins.qbs",
qbsBaseDir + "/share/share.qbs", qbsBaseDir + "/share/share.qbs",
qbsBaseDir + "/src/app/apps.qbs", qbsBaseDir + "/src/app/apps.qbs",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment