From e093bda8b4a894d0f6824adfcc5556b958e7bb59 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Thu, 23 Feb 2017 15:38:24 -0800 Subject: Make sure the bundle rule only accepts inputs from compatible rules This fixes a regression introduced in e9fb1cc which broke all bundle products on Apple platforms. Change-Id: Ice17bb1d6d6b535d8c654ae6c717f32d9b2ea41e Reviewed-by: Christian Kandeler --- share/qbs/modules/bundle/BundleModule.qbs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'share/qbs/modules/bundle/BundleModule.qbs') diff --git a/share/qbs/modules/bundle/BundleModule.qbs b/share/qbs/modules/bundle/BundleModule.qbs index 0bf25033d..a7e6ec186 100644 --- a/share/qbs/modules/bundle/BundleModule.qbs +++ b/share/qbs/modules/bundle/BundleModule.qbs @@ -69,6 +69,7 @@ Module { // Outputs property var xcodeSettings: ({}) + property var productTypeIdentifierChain: [] configure: { var specsPath = path; @@ -84,11 +85,14 @@ Module { additionalSettings, !qbs.targetOS.contains("macos")); var settings = reader.expandedSettings(_productTypeIdentifier); - if (settings) { + var chain = reader.productTypeIdentifierChain(_productTypeIdentifier); + if (settings && chain) { xcodeSettings = settings; + productTypeIdentifierChain = chain; found = true; } else { xcodeSettings = {}; + productTypeIdentifierChain = []; found = false; } } @@ -180,6 +184,7 @@ Module { // private properties property string _productTypeIdentifier: Bundle.productTypeIdentifier(product.type) + property stringList _productTypeIdentifierChain: bundleSettingsProbe.productTypeIdentifierChain property bool _useXcodeBuildSpecs: true // false to use ONLY the qbs build specs @@ -496,6 +501,10 @@ Module { "compiled_ibdoc", "compiled_assetcatalog", "xcode.provisioningprofile.main"] + // Make sure the inputs of this rule are only those rules which produce outputs compatible + // with the type of the bundle being produced. + excludedAuxiliaryInputs: Bundle.excludedAuxiliaryInputs(project, product) + outputFileTags: [ "bundle.content", "bundle.symlink.headers", "bundle.symlink.private-headers", -- cgit v1.2.3