diff options
author | Jake Petroules <jake.petroules@petroules.com> | 2015-02-24 20:19:52 -0800 |
---|---|---|
committer | Jake Petroules <jake.petroules@petroules.com> | 2015-02-25 15:37:29 +0000 |
commit | 6c9de0488a8fcee5e88c00d1df07f9c11e8bacfc (patch) | |
tree | 29fa62bc74630df44670c48d769f6967d26a3d22 /share/qbs/modules/bundle/BundleModule.qbs | |
parent | d9b51b1148ff6cb96017b5bafcbebcd67457217f (diff) |
Use real properties for lsregister to allow overriding.
Change-Id: Idce06100cd8acfe0087692980bdc48dabd753836
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.qbs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/share/qbs/modules/bundle/BundleModule.qbs b/share/qbs/modules/bundle/BundleModule.qbs index ea0a6ec96..b5cfb3fca 100644 --- a/share/qbs/modules/bundle/BundleModule.qbs +++ b/share/qbs/modules/bundle/BundleModule.qbs @@ -10,14 +10,6 @@ import qbs.TextFile Module { additionalProductTypes: ["bundle"] - setupBuildEnvironment: { - if (qbs.hostOS.contains("darwin")) { - var v = new ModUtils.EnvironmentVariable("PATH", ":", false); - v.prepend("/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support"); - v.set(); - } - } - property bool isBundle: qbs.targetOS.contains("darwin") && (product.type.contains("application") || product.type.contains("dynamiclibrary") @@ -86,6 +78,12 @@ Module { property string localizedResourcesFolderSuffix: ".lproj" + property string lsregisterName: "lsregister" + property string lsregisterPath: FileInfo.joinPaths( + "/System/Library/Frameworks/CoreServices.framework" + + "/Versions/A/Frameworks/LaunchServices.framework" + + "/Versions/A/Support", lsregisterName); + // all paths are relative to the directory containing the bundle readonly property string infoPlistPath: { var path; @@ -584,7 +582,8 @@ Module { if (product.type.contains("application") && product.moduleProperty("qbs", "hostOS").contains("darwin")) { for (i in bundles) { - cmd = new Command("lsregister", ["-f", bundles[i].filePath]); + cmd = new Command(ModUtils.moduleProperty(product, "lsregisterPath"), + ["-f", bundles[i].filePath]); cmd.description = "register " + ModUtils.moduleProperty(product, "bundleName"); commands.push(cmd); } |