aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/bundle/BundleModule.qbs
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@theqtcompany.com>2015-09-20 01:09:56 -0700
committerJake Petroules <jake.petroules@theqtcompany.com>2015-09-22 16:36:02 +0000
commit8efec0f4a04058a728d18aac0ee8c34f1ba0f971 (patch)
treefe2afa2ea419707af18d11f630e82b18b5b7c004 /share/qbs/modules/bundle/BundleModule.qbs
parent9b24adda9102a5f27a3ee356ef1f6793d8aa1f0e (diff)
Copy provisioning profile to application bundle.
Change-Id: I4b9cb8ce0bad0eae35bbdfed4cdd24cc76a8a5db 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.qbs28
1 files changed, 27 insertions, 1 deletions
diff --git a/share/qbs/modules/bundle/BundleModule.qbs b/share/qbs/modules/bundle/BundleModule.qbs
index 0c681d6fb..e5b6c414c 100644
--- a/share/qbs/modules/bundle/BundleModule.qbs
+++ b/share/qbs/modules/bundle/BundleModule.qbs
@@ -406,7 +406,8 @@ Module {
outputFileTags: ["bundle",
"bundle.symlink.headers", "bundle.symlink.private-headers",
"bundle.symlink.resources", "bundle.symlink.executable",
- "bundle.symlink.version", "bundle.hpp", "bundle.resource"]
+ "bundle.symlink.version", "bundle.hpp", "bundle.resource",
+ "bundle.provisioningprofile"]
outputArtifacts: {
var i, artifacts = [];
if (ModUtils.moduleProperty(product, "isBundle")) {
@@ -415,6 +416,18 @@ Module {
fileTags: ["bundle"]
});
+ var provisioningProfilePath = product.moduleProperty("xcode",
+ "provisioningProfilePath");
+ if (provisioningProfilePath) {
+ var ext = product.moduleProperty("qbs", "targetOS").contains("osx")
+ ? "provisionprofile"
+ : "mobileprovision";
+ artifacts.push({
+ filePath: FileInfo.joinPaths(product.destinationDirectory, ModUtils.moduleProperty(product, "contentsFolderPath"), "embedded." + ext),
+ fileTags: ["bundle.provisioningprofile"]
+ });
+ }
+
var packageType = ModUtils.moduleProperty(product, "packageType");
if (packageType === "FMWK") {
var publicHeaders = ModUtils.moduleProperties(product, "publicHeaders");
@@ -542,6 +555,19 @@ Module {
commands.push(cmd);
}
+ var provisioningProfiles = outputs["bundle.provisioningprofile"];
+ for (i in provisioningProfiles) {
+ cmd = new JavaScriptCommand();
+ cmd.description = "copying provisioning profile";
+ cmd.highlight = "filegen";
+ cmd.source = product.moduleProperty("xcode", "provisioningProfilePath");
+ cmd.destination = provisioningProfiles[i].filePath;
+ cmd.sourceCode = function() {
+ File.copy(source, destination);
+ };
+ commands.push(cmd);
+ }
+
cmd = new JavaScriptCommand();
cmd.description = "copying public headers";
cmd.highlight = "filegen";