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 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) {
......
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 + '"',
......
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) {
......
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)
......
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 {
......
import qbs.Environment
Project {
name: "CPlusPlus Tools"
condition: qbs.getEnv("BUILD_CPLUSPLUS_TOOLS")
condition: Environment.getEnv("BUILD_CPLUSPLUS_TOOLS")
references: [
"3rdparty/cplusplus-keywordgen/cplusplus-keywordgen.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