From 0bbd8a85d3cb646b60ed7cff628a11df0679b867 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 22 Mar 2016 14:28:07 +0100 Subject: [PATCH] Fix project resolving with qbs master. Change-Id: Iee12398a4897d795ea5b8b6cadfec8f234ba069d Reviewed-by: Joerg Bornemann --- qbs/imports/QtcClangInstallation/functions.js | 5 ++-- qtcreator.qbs | 3 ++- src/libs/qtcreatorcdbext/qtcreatorcdbext.qbs | 25 ++++++++++--------- src/libs/ssh/ssh.qbs | 3 ++- src/src.qbs | 3 ++- src/tools/cplusplustools.qbs | 5 +++- 6 files changed, 26 insertions(+), 18 deletions(-) diff --git a/qbs/imports/QtcClangInstallation/functions.js b/qbs/imports/QtcClangInstallation/functions.js index 5a342b3bae6..4c2019f149b 100644 --- a/qbs/imports/QtcClangInstallation/functions.js +++ b/qbs/imports/QtcClangInstallation/functions.js @@ -1,3 +1,4 @@ +var Environment = loadExtension("qbs.Environment") var File = loadExtension("qbs.File") var MinimumLLVMVersion = "3.6.2" @@ -13,7 +14,7 @@ function isSuitableLLVMConfig(llvmConfigCandidate, qtcFunctions, processOutputRe function llvmConfig(qbs, qtcFunctions, processOutputReader) { - var llvmInstallDirFromEnv = qbs.getEnv("LLVM_INSTALL_DIR") + var llvmInstallDirFromEnv = Environment.getEnv("LLVM_INSTALL_DIR") var llvmConfigVariants = [ "llvm-config", "llvm-config-3.2", "llvm-config-3.3", "llvm-config-3.4", "llvm-config-3.5", "llvm-config-3.6", "llvm-config-4.0", "llvm-config-4.1" @@ -30,7 +31,7 @@ function llvmConfig(qbs, qtcFunctions, processOutputReader) } // Find llvm-config* in PATH - var pathListString = qbs.getEnv("PATH"); + var pathListString = Environment.getEnv("PATH"); var separator = qbs.hostOS.contains("windows") ? ";" : ":"; var pathList = pathListString.split(separator); for (var i = 0; i < llvmConfigVariants.length; ++i) { diff --git a/qtcreator.qbs b/qtcreator.qbs index d1bb6d7759d..e03ddbf2345 100644 --- a/qtcreator.qbs +++ b/qtcreator.qbs @@ -1,4 +1,5 @@ import qbs 1.0 +import qbs.Environment import qbs.FileInfo Project { @@ -51,7 +52,7 @@ Project { property string ide_bin_path: qbs.targetOS.contains("osx") ? ide_app_target + ".app/Contents/MacOS" : ide_app_path - property bool testsEnabled: qbs.getEnv("TEST") || qbs.buildVariant === "debug" + property bool testsEnabled: Environment.getEnv("TEST") || qbs.buildVariant === "debug" property stringList generalDefines: [ "QT_CREATOR", 'IDE_LIBRARY_BASENAME="' + libDirName + '"', diff --git a/src/libs/qtcreatorcdbext/qtcreatorcdbext.qbs b/src/libs/qtcreatorcdbext/qtcreatorcdbext.qbs index ea4a7cdf60e..9bdb41f45e5 100644 --- a/src/libs/qtcreatorcdbext/qtcreatorcdbext.qbs +++ b/src/libs/qtcreatorcdbext/qtcreatorcdbext.qbs @@ -1,4 +1,5 @@ import qbs +import qbs.Environment import qbs.File import qbs.FileInfo @@ -8,18 +9,18 @@ QtcLibrary { targetName: name property string cdbPath: { var paths = [ - qbs.getEnv("CDB_PATH"), - qbs.getEnv("ProgramFiles") + "/Debugging Tools For Windows/sdk", - qbs.getEnv("ProgramFiles") + "/Debugging Tools For Windows (x86)/sdk", - qbs.getEnv("ProgramFiles") + "/Debugging Tools For Windows (x64)/sdk", - qbs.getEnv("ProgramFiles") + "/Debugging Tools For Windows 64-bit/sdk", - qbs.getEnv("ProgramW6432") + "/Debugging Tools For Windows (x86)/sdk", - qbs.getEnv("ProgramW6432") + "/Debugging Tools For Windows (x64)/sdk", - qbs.getEnv("ProgramW6432") + "/Debugging Tools For Windows 64-bit/sdk", - qbs.getEnv("ProgramFiles") + "/Windows Kits/8.0/Debuggers", - qbs.getEnv("ProgramFiles") + "/Windows Kits/8.1/Debuggers", - qbs.getEnv("ProgramFiles(x86)") + "/Windows Kits/8.0/Debuggers/inc", - qbs.getEnv("ProgramFiles(x86)") + "/Windows Kits/8.1/Debuggers/inc" + Environment.getEnv("CDB_PATH"), + Environment.getEnv("ProgramFiles") + "/Debugging Tools For Windows/sdk", + Environment.getEnv("ProgramFiles") + "/Debugging Tools For Windows (x86)/sdk", + Environment.getEnv("ProgramFiles") + "/Debugging Tools For Windows (x64)/sdk", + Environment.getEnv("ProgramFiles") + "/Debugging Tools For Windows 64-bit/sdk", + Environment.getEnv("ProgramW6432") + "/Debugging Tools For Windows (x86)/sdk", + Environment.getEnv("ProgramW6432") + "/Debugging Tools For Windows (x64)/sdk", + Environment.getEnv("ProgramW6432") + "/Debugging Tools For Windows 64-bit/sdk", + Environment.getEnv("ProgramFiles") + "/Windows Kits/8.0/Debuggers", + Environment.getEnv("ProgramFiles") + "/Windows Kits/8.1/Debuggers", + Environment.getEnv("ProgramFiles(x86)") + "/Windows Kits/8.0/Debuggers/inc", + Environment.getEnv("ProgramFiles(x86)") + "/Windows Kits/8.1/Debuggers/inc" ]; var c = paths.length; for (var i = 0; i < c; ++i) { diff --git a/src/libs/ssh/ssh.qbs b/src/libs/ssh/ssh.qbs index 185f397b612..8998d6823cb 100644 --- a/src/libs/ssh/ssh.qbs +++ b/src/libs/ssh/ssh.qbs @@ -1,4 +1,5 @@ import qbs 1.0 +import qbs.Environment QtcLibrary { name: "QtcSsh" @@ -46,7 +47,7 @@ QtcLibrary { "sshsendfacility.cpp", "sshsendfacility_p.h", ].concat(botanFiles) - property var useSystemBotan: qbs.getEnv("USE_SYSTEM_BOTAN") === "1" + property var useSystemBotan: Environment.getEnv("USE_SYSTEM_BOTAN") === "1" property var botanIncludes: { var result = ["../3rdparty"]; if (useSystemBotan) diff --git a/src/src.qbs b/src/src.qbs index ff8007be734..69160e489e3 100644 --- a/src/src.qbs +++ b/src/src.qbs @@ -1,4 +1,5 @@ import qbs +import qbs.Environment import qbs.File import qbs.FileInfo @@ -14,7 +15,7 @@ Project { ] property bool qbsSubModuleExists: File.exists(qbsProject.qbsBaseDir + "/qbs.qbs") - property path qbs_install_dir: qbs.getEnv("QBS_INSTALL_DIR") + property path qbs_install_dir: Environment.getEnv("QBS_INSTALL_DIR") property bool useExternalQbs: qbs_install_dir property bool buildQbsProjectManager: useExternalQbs || qbsSubModuleExists Project { diff --git a/src/tools/cplusplustools.qbs b/src/tools/cplusplustools.qbs index 1b1bec39e08..fe2fc5cf161 100644 --- a/src/tools/cplusplustools.qbs +++ b/src/tools/cplusplustools.qbs @@ -1,6 +1,9 @@ +import qbs +import qbs.Environment + Project { name: "CPlusPlus Tools" - condition: qbs.getEnv("BUILD_CPLUSPLUS_TOOLS") + condition: Environment.getEnv("BUILD_CPLUSPLUS_TOOLS") references: [ "cplusplus-ast2png/cplusplus-ast2png.qbs", "cplusplus-frontend/cplusplus-frontend.qbs",