Commit 7c8744e6 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Qbs: Replace deprecated qbs.getEnv with Environment.getEnv

Change-Id: Iebca0ae87bc3dee65fbc0f16c3c7f6f8afc0fead
Reviewed-by: default avatarJake Petroules <jake.petroules@theqtcompany.com>
parent 5e7edfef
var Environment = loadExtension("qbs.Environment")
var File = loadExtension("qbs.File") var File = loadExtension("qbs.File")
var MinimumLLVMVersion = "3.6.2" var MinimumLLVMVersion = "3.6.2"
...@@ -13,7 +14,7 @@ function isSuitableLLVMConfig(llvmConfigCandidate, qtcFunctions, processOutputRe ...@@ -13,7 +14,7 @@ function isSuitableLLVMConfig(llvmConfigCandidate, qtcFunctions, processOutputRe
function llvmConfig(qbs, qtcFunctions, processOutputReader) function llvmConfig(qbs, qtcFunctions, processOutputReader)
{ {
var llvmInstallDirFromEnv = qbs.getEnv("LLVM_INSTALL_DIR") var llvmInstallDirFromEnv = Environment.getEnv("LLVM_INSTALL_DIR")
var llvmConfigVariants = [ var llvmConfigVariants = [
"llvm-config", "llvm-config-3.2", "llvm-config-3.3", "llvm-config-3.4", "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" "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) ...@@ -30,7 +31,7 @@ function llvmConfig(qbs, qtcFunctions, processOutputReader)
} }
// Find llvm-config* in PATH // Find llvm-config* in PATH
var pathListString = qbs.getEnv("PATH"); var pathListString = Environment.getEnv("PATH");
var separator = qbs.hostOS.contains("windows") ? ";" : ":"; var separator = qbs.hostOS.contains("windows") ? ";" : ":";
var pathList = pathListString.split(separator); var pathList = pathListString.split(separator);
for (var i = 0; i < llvmConfigVariants.length; ++i) { for (var i = 0; i < llvmConfigVariants.length; ++i) {
......
import qbs 1.0 import qbs 1.0
import qbs.Environment
import qbs.FileInfo import qbs.FileInfo
Project { Project {
...@@ -51,7 +52,7 @@ Project { ...@@ -51,7 +52,7 @@ Project {
property string ide_bin_path: qbs.targetOS.contains("osx") property string ide_bin_path: qbs.targetOS.contains("osx")
? ide_app_target + ".app/Contents/MacOS" ? ide_app_target + ".app/Contents/MacOS"
: ide_app_path : ide_app_path
property bool testsEnabled: qbs.getEnv("TEST") || qbs.buildVariant === "debug" property bool testsEnabled: Environment.getEnv("TEST") || qbs.buildVariant === "debug"
property stringList generalDefines: [ property stringList generalDefines: [
"QT_CREATOR", "QT_CREATOR",
'IDE_LIBRARY_BASENAME="' + libDirName + '"', 'IDE_LIBRARY_BASENAME="' + libDirName + '"',
......
import qbs import qbs
import qbs.Environment
import qbs.File import qbs.File
import qbs.FileInfo import qbs.FileInfo
...@@ -8,18 +9,18 @@ QtcLibrary { ...@@ -8,18 +9,18 @@ QtcLibrary {
targetName: name targetName: name
property string cdbPath: { property string cdbPath: {
var paths = [ var paths = [
qbs.getEnv("CDB_PATH"), Environment.getEnv("CDB_PATH"),
qbs.getEnv("ProgramFiles") + "/Debugging Tools For Windows/sdk", Environment.getEnv("ProgramFiles") + "/Debugging Tools For Windows/sdk",
qbs.getEnv("ProgramFiles") + "/Debugging Tools For Windows (x86)/sdk", Environment.getEnv("ProgramFiles") + "/Debugging Tools For Windows (x86)/sdk",
qbs.getEnv("ProgramFiles") + "/Debugging Tools For Windows (x64)/sdk", Environment.getEnv("ProgramFiles") + "/Debugging Tools For Windows (x64)/sdk",
qbs.getEnv("ProgramFiles") + "/Debugging Tools For Windows 64-bit/sdk", Environment.getEnv("ProgramFiles") + "/Debugging Tools For Windows 64-bit/sdk",
qbs.getEnv("ProgramW6432") + "/Debugging Tools For Windows (x86)/sdk", Environment.getEnv("ProgramW6432") + "/Debugging Tools For Windows (x86)/sdk",
qbs.getEnv("ProgramW6432") + "/Debugging Tools For Windows (x64)/sdk", Environment.getEnv("ProgramW6432") + "/Debugging Tools For Windows (x64)/sdk",
qbs.getEnv("ProgramW6432") + "/Debugging Tools For Windows 64-bit/sdk", Environment.getEnv("ProgramW6432") + "/Debugging Tools For Windows 64-bit/sdk",
qbs.getEnv("ProgramFiles") + "/Windows Kits/8.0/Debuggers", Environment.getEnv("ProgramFiles") + "/Windows Kits/8.0/Debuggers",
qbs.getEnv("ProgramFiles") + "/Windows Kits/8.1/Debuggers", Environment.getEnv("ProgramFiles") + "/Windows Kits/8.1/Debuggers",
qbs.getEnv("ProgramFiles(x86)") + "/Windows Kits/8.0/Debuggers/inc", Environment.getEnv("ProgramFiles(x86)") + "/Windows Kits/8.0/Debuggers/inc",
qbs.getEnv("ProgramFiles(x86)") + "/Windows Kits/8.1/Debuggers/inc" Environment.getEnv("ProgramFiles(x86)") + "/Windows Kits/8.1/Debuggers/inc"
]; ];
var c = paths.length; var c = paths.length;
for (var i = 0; i < c; ++i) { for (var i = 0; i < c; ++i) {
......
import qbs 1.0 import qbs 1.0
import qbs.Environment
QtcLibrary { QtcLibrary {
name: "QtcSsh" name: "QtcSsh"
...@@ -46,7 +47,7 @@ QtcLibrary { ...@@ -46,7 +47,7 @@ QtcLibrary {
"sshsendfacility.cpp", "sshsendfacility_p.h", "sshsendfacility.cpp", "sshsendfacility_p.h",
].concat(botanFiles) ].concat(botanFiles)
property var useSystemBotan: qbs.getEnv("USE_SYSTEM_BOTAN") === "1" property var useSystemBotan: Environment.getEnv("USE_SYSTEM_BOTAN") === "1"
property var botanIncludes: { property var botanIncludes: {
var result = ["../3rdparty"]; var result = ["../3rdparty"];
if (useSystemBotan) if (useSystemBotan)
......
import qbs import qbs
import qbs.Environment
import qbs.File import qbs.File
import qbs.FileInfo import qbs.FileInfo
...@@ -14,7 +15,7 @@ Project { ...@@ -14,7 +15,7 @@ Project {
] ]
property bool qbsSubModuleExists: File.exists(qbsProject.qbsBaseDir + "/qbs.qbs") 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 useExternalQbs: qbs_install_dir
property bool buildQbsProjectManager: useExternalQbs || qbsSubModuleExists property bool buildQbsProjectManager: useExternalQbs || qbsSubModuleExists
Project { Project {
......
import qbs.Environment
Project { Project {
name: "CPlusPlus Tools" name: "CPlusPlus Tools"
condition: qbs.getEnv("BUILD_CPLUSPLUS_TOOLS") condition: Environment.getEnv("BUILD_CPLUSPLUS_TOOLS")
references: [ references: [
"3rdparty/cplusplus-keywordgen/cplusplus-keywordgen.qbs", "3rdparty/cplusplus-keywordgen/cplusplus-keywordgen.qbs",
"cplusplus-ast2png/cplusplus-ast2png.qbs", "cplusplus-ast2png/cplusplus-ast2png.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