diff options
author | Jake Petroules <jake.petroules@theqtcompany.com> | 2015-09-20 01:11:22 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@theqtcompany.com> | 2015-09-25 07:37:42 +0000 |
commit | 010637125b556223fbb70f5c8ab49cea07220fe7 (patch) | |
tree | 08a2b1a20168cfcefcda02622b715184bd514b24 /share/qbs/modules/bundle/BundleModule.qbs | |
parent | 8efec0f4a04058a728d18aac0ee8c34f1ba0f971 (diff) |
Add support for entitlements to the code signing process.
Change-Id: I14111b46f0b0a864a27b86618ad716b35c074d64
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 | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/share/qbs/modules/bundle/BundleModule.qbs b/share/qbs/modules/bundle/BundleModule.qbs index e5b6c414c..414a55222 100644 --- a/share/qbs/modules/bundle/BundleModule.qbs +++ b/share/qbs/modules/bundle/BundleModule.qbs @@ -400,8 +400,9 @@ Module { condition: qbs.targetOS.contains("darwin") multiplex: true inputs: ["infoplist", "pkginfo", "hpp", - "icns", "resourcerules", - "compiled_ibdoc", "compiled_assetcatalog"] + "icns", "resourcerules", "xcent", + "compiled_ibdoc", "compiled_assetcatalog", + "xcode.provisioningprofile"] outputFileTags: ["bundle", "bundle.symlink.headers", "bundle.symlink.private-headers", @@ -416,14 +417,13 @@ Module { fileTags: ["bundle"] }); - var provisioningProfilePath = product.moduleProperty("xcode", - "provisioningProfilePath"); - if (provisioningProfilePath) { - var ext = product.moduleProperty("qbs", "targetOS").contains("osx") - ? "provisionprofile" - : "mobileprovision"; + for (i in inputs["xcode.provisioningprofile"]) { + var ext = inputs["xcode.provisioningprofile"][i].fileName.split('.')[1]; artifacts.push({ - filePath: FileInfo.joinPaths(product.destinationDirectory, ModUtils.moduleProperty(product, "contentsFolderPath"), "embedded." + ext), + filePath: FileInfo.joinPaths(product.destinationDirectory, + ModUtils.moduleProperty(product, + "contentsFolderPath"), + "embedded." + ext), fileTags: ["bundle.provisioningprofile"] }); } @@ -560,7 +560,7 @@ Module { cmd = new JavaScriptCommand(); cmd.description = "copying provisioning profile"; cmd.highlight = "filegen"; - cmd.source = product.moduleProperty("xcode", "provisioningProfilePath"); + cmd.source = inputs["xcode.provisioningprofile"][i].filePath; cmd.destination = provisioningProfiles[i].filePath; cmd.sourceCode = function() { File.copy(source, destination); @@ -623,10 +623,16 @@ Module { subpath = subpath.substring(subpath.indexOf(ModUtils.moduleProperty("qbs", "pathSeparator"))); } - cmd = new Command(product.moduleProperty("xcode", "codesignPath"), - (product.moduleProperty("xcode", "codesignFlags") || []) - .concat(["--force", "--sign", actualSigningIdentity, - bundles[i].filePath + subpath])); + var args = product.moduleProperty("xcode", "codesignFlags") || []; + args.push("--force"); + args.push("--sign", actualSigningIdentity); + for (var j in inputs.xcent) { + args.push("--entitlements", inputs.xcent[j].filePath); + break; // there should only be one + } + args.push(bundles[i].filePath + subpath); + + cmd = new Command(product.moduleProperty("xcode", "codesignPath"), args); cmd.description = "codesign " + ModUtils.moduleProperty(product, "bundleName") + " using " + codesignDisplayName |