aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/bundle/BundleModule.qbs
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2015-08-08 15:19:58 -0700
committerJake Petroules <jake.petroules@petroules.com>2015-08-10 19:24:11 +0000
commitcc30770e64b298839b2d7f6043165636f77f99f0 (patch)
treeadfd1aeee3e77b317837f1193c9c02d8524dfd14 /share/qbs/modules/bundle/BundleModule.qbs
parente8fb0b0b9bd6449738858453332432df155afeaf (diff)
Remove warnings in Info.plist generation with non-Xcode toolchains.
If using a plain "system" toolchain not based on Xcode, plist generation will no longer print useless warnings about missing plist files. Change-Id: I0bf349e4096d7340f2ef91bb449f570591990cdd Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'share/qbs/modules/bundle/BundleModule.qbs')
-rw-r--r--share/qbs/modules/bundle/BundleModule.qbs79
1 files changed, 27 insertions, 52 deletions
diff --git a/share/qbs/modules/bundle/BundleModule.qbs b/share/qbs/modules/bundle/BundleModule.qbs
index e06284e3c..1079c48ed 100644
--- a/share/qbs/modules/bundle/BundleModule.qbs
+++ b/share/qbs/modules/bundle/BundleModule.qbs
@@ -211,19 +211,17 @@ Module {
cmd.infoPlistFormat = ModUtils.moduleProperty(product, "infoPlistFormat");
cmd.qmakeEnv = ModUtils.moduleProperty(product, "qmakeEnv");
- cmd.platformPath = product.moduleProperty("xcode", "platformPath");
- cmd.toolchainInstallPath = product.moduleProperty("cpp", "toolchainInstallPath");
cmd.buildEnv = product.moduleProperty("cpp", "buildEnv");
cmd.defines = product.moduleProperty("cpp", "defines");
cmd.platformDefines = product.moduleProperty("cpp", "platformDefines");
cmd.compilerDefines = product.moduleProperty("cpp", "compilerDefines");
cmd.allDefines = [].concat(cmd.defines || []).concat(cmd.platformDefines || []).concat(cmd.compilerDefines || []);
+ cmd.toolchain = product.moduleProperty("qbs", "toolchain");
cmd.platformInfoPlist = product.moduleProperty("xcode", "platformInfoPlist");
cmd.sdkSettingsPlist = product.moduleProperty("xcode", "sdkSettingsPlist");
cmd.toolchainInfoPlist = product.moduleProperty("xcode", "toolchainInfoPlist");
- cmd.sysroot = product.moduleProperty("qbs", "sysroot");
cmd.osBuildVersion = product.moduleProperty("qbs", "hostOSBuildVersion");
cmd.sourceCode = function() {
@@ -258,57 +256,36 @@ Module {
// Add keys from platform's Info.plist if not already present
var platformInfo = {};
- if (platformPath) {
- if (File.exists(platformInfoPlist)) {
- plist = new PropertyList();
- try {
- plist.readFromFile(platformInfoPlist);
- platformInfo = plist.toObject();
- } finally {
- plist.clear();
- }
-
- var additionalProps = platformInfo["AdditionalInfo"];
- for (key in additionalProps) {
- if (additionalProps.hasOwnProperty(key) && !(key in aggregatePlist)) // override infoPlist?
- aggregatePlist[key] = defaultValues[key];
- }
- props = platformInfo['OverrideProperties'];
- for (key in props) {
- aggregatePlist[key] = props[key];
- }
-
- if (product.moduleProperty("qbs", "targetOS").contains("ios")) {
- key = "UIDeviceFamily";
- if (key in platformInfo && !(key in aggregatePlist))
- aggregatePlist[key] = platformInfo[key];
- }
- } else {
- print("warning: platform path given but no platform Info.plist found");
+ var sdkSettings = {};
+ var toolchainInfo = {};
+ if (toolchain.contains("xcode")) {
+ plist = new PropertyList();
+ try {
+ plist.readFromFile(platformInfoPlist);
+ platformInfo = plist.toObject();
+ } finally {
+ plist.clear();
}
- } else {
- print("no platform path specified");
- }
- var sdkSettings = {};
- if (sysroot) {
- if (File.exists(sdkSettingsPlist)) {
- plist = new PropertyList();
- try {
- plist.readFromFile(sdkSettingsPlist);
- sdkSettings = plist.toObject();
- } finally {
- plist.clear();
- }
- } else {
- print("warning: sysroot (SDK path) given but no SDKSettings.plist found");
+ var additionalProps = platformInfo["AdditionalInfo"];
+ for (key in additionalProps) {
+ // override infoPlist?
+ if (additionalProps.hasOwnProperty(key) && !(key in aggregatePlist))
+ aggregatePlist[key] = defaultValues[key];
+ }
+ props = platformInfo['OverrideProperties'];
+ for (key in props) {
+ aggregatePlist[key] = props[key];
+ }
+
+ plist = new PropertyList();
+ try {
+ plist.readFromFile(sdkSettingsPlist);
+ sdkSettings = plist.toObject();
+ } finally {
+ plist.clear();
}
- } else {
- print("no sysroot (SDK path) specified");
- }
- var toolchainInfo = {};
- if (toolchainInstallPath && File.exists(toolchainInfoPlist)) {
plist = new PropertyList();
try {
plist.readFromFile(toolchainInfoPlist);
@@ -316,8 +293,6 @@ Module {
} finally {
plist.clear();
}
- } else {
- print("could not find a ToolchainInfo.plist near the toolchain install path");
}
aggregatePlist["BuildMachineOSBuild"] = osBuildVersion;