aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/bundle/BundleModule.qbs
Commit message (Collapse)AuthorAgeFilesLines
* apple: Fix BundleModule when using xcode-less profileIvan Komissarov2023-08-221-4/+9
| | | | | | | | | | | | | Unlike Module itself, within the Rule.prepare script, we cannot access properties of the non-present Module. Fix this by adding helper properties in the Bundle module that are set to 'undefined' if xcode is not present. This amends 9cfd88b1b7cca084fabe8053d988aa0685f0cfb3. Change-Id: I5f1c86bd093610f1de8ecb9f9732b2a1b0245baf Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Do not use ModUtils.moduleProperty in bundle moduleIvan Komissarov2023-04-251-43/+43
| | | | | | Task-number: QBS-889 Change-Id: I069b7f785f4ac21923ea976817147a4c3b5f56c5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Prefer built-in JS function in modulesChristian Kandeler2023-02-201-15/+15
| | | | | | | contains -> includes Change-Id: Id893c2ea0659d9bded4f5cec1a3160ccd802118b Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* macos: fix support for Macos Venturav1.24.0Ivan Komissarov2022-11-121-1/+3
| | | | | | | The lsregister tool takes path to a bundle, not a name. Change-Id: I9093bab53586dc66d2854cd02271b1402fb33ac5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add public bundle.useBuiltinXcodeBuildSpecs propertyIvan Komissarov2022-10-291-2/+4
| | | | | | Change-Id: Ib630bc08565527ee648c803f83d4dc9513410b7e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use Host and FileInfo serviceRaphael Cotty2022-01-311-1/+2
| | | | | | | | Replace all the possible use of the qbs module that can be replaced by the Host and FileInfo services. Change-Id: I0d6f820bb2577eacd9081ec2df1eb53adf94d50e Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Fix descriptions for JS commandsDenis Shienkov2021-11-151-1/+1
| | | | | | | | | | | * All descriptions start with a small letter. * Trailing dots have been removed from all descriptions. * For all static library rules replaced 'linking' with 'creating' in descriptions. * Added 'ing' ending to all descriptions where it was missing. Change-Id: I2a4cb9dd53980d33628e097efaae53a68573af42 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix reading Xcode 12.5 specsv1.19.0Ivan Komissarov2021-05-031-3/+6
| | | | | | | | | | | | | | | Since Xcode 12.5, common specs for darwin platforms were moved to "Darwin Package/Product Types.xcspec" in the different folder. However, the old configs are still present, so we need to merge info from both variants. Also, allow to use undefined variables in .xcspec files - since 12.5, this is a valid use-case. Also, implement the "default=" variable formatter used as a fallback when variable is not set. Fixes: QBS-1644 Change-Id: I9a55c5d511cbb01f30219478ee9f3b85763a08d5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Implement codesign moduleJake Petroules2021-02-181-46/+25
| | | | | | | | | | | | | | | This moves code signing functionality into a dedicated module, and also implements automatic provisioning for Apple platforms, which automatically selects appropriate signing identities and provisioning profiles based on the product being built. This also results in a significant performance improvement since all code signing setup information is retrieved in process instead of forking off the openssl and security command line tools. Task-number: QBS-899 Change-Id: I60d0aeaeb2d1004929505bcb1e0bc77512fe77bc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix usage of @VAR@ in info plist filesIvan Komissarov2020-10-081-1/+1
| | | | | | | Fixes: QBS-1601 Change-Id: Iead18bf5fd25f965cf9f9748469f2469488eabc8 Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* xcode: Fix Xcode 12.0 supportIvan Komissarov2020-07-201-2/+2
| | | | | | | | | The *.xcspec files for macOS were moved into the *.ideplugin directory similar to how it is done for iOS/tvOS/etc. Fixes: QBS-1582 Change-Id: I478742c4b52b08f7feee4108272da7bf2b12a744 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Darwin: Fix access to undefined moduleChristian Kandeler2020-03-191-1/+2
| | | | | | | Amends cf5562823e. Change-Id: I5844815342f9e2eae131c1d2cd94ad8119d0dcfe Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Fix code signing for Core Foundation bundlesLeon Buckel2020-02-131-48/+42
| | | | | | | | | | | | | | | | xcode.qbs: - Change the contents of xcode._actualSigningIdentity as expected by the actualSigningIdentity and actualSigningIdentityDisplayName properties - Use Utilities.signingIdentities() to get rid of warning ’Suspicious use of Process during property evaluation...’ - Throw error if specified identity was not found BundleModule.qbs: - Add ‘_CodeSignature/CodeResources’ to outputArtifacts with the tag ‘bundle.code-signature’ and ‘bundle.content’ - Remove local var ‘bundles’ which was always undefined - Fix ‘ModUtils.moduleProperty("qbs", "pathSeparator")’ resulting in ‘TypeError: Result of expression 'obj.moduleProperty' [undefined] is not a function.’ Change-Id: I1a529efb6164906d21203ff3f3be6e570137e8ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Darwin: Adapt to Xcode 11Christian Kandeler2019-10-041-1/+5
| | | | | | | | | | | | | | - xcspec files can now refer to variables in variable names, as in the following line: CONTENTS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH_SHALLOW_BUNDLE_$ (SHALLOW_BUNDLE)) - Some new environment variables have been introduced and need to be set when running our probes; e.g. "SWIFT_PLATFORM_TARGET_PREFIX". - The symbolLinkMode autotest made an invalid assumption about order of output. Change-Id: Ic845c2c4a8eafb4ece0f0bb04e6e492681a02979 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Do not override properties that are present in user plistIvan Komissarov2019-05-161-1/+2
| | | | | | Fixes: QBS-1447 Change-Id: Ie03530e960cbcf0ab14a9cb501a169aec311ec1a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Report an error on unexpected output tagsChristian Kandeler2018-07-131-1/+1
| | | | | | | | | | The artifacts a dynamic rule produces need to be consistent with what it declares in its outputFileTags property. Somewhat suprisingly, such a check was missing so far, so we managed to make such mistakes in our very own modules. These are also fixed here. Change-Id: I9052a8c4b0423e8fd146c9fc67bf5c3ce752c638 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove "qbs" from some rule input tagsChristian Kandeler2018-06-221-1/+2
| | | | | | | | This hack hails from the days where rules required inputs and is no longer needed. Change-Id: I683f94c1e317784e3e9dc3bd7589459a0ba91f9f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove the base module import from shared imports and modulesJoerg Bornemann2018-06-221-1/+0
| | | | | Change-Id: I5270e033dc41b5bd76a417099514c69cc073008b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Check that inputs.partial_infoplists is not emptyAlexandru Croitor2018-04-161-16/+17
| | | | | | | | | | Also change the style of checking for the rest of the inputs. Amends regression introduced by 74e518ef6f6b89dd783ec8ffc8cf1d0c713cf14a . Change-Id: Iddd9b4f1d1688f09e10add41a55e4b4ae6ca7bbc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Don't make a copy of the inputs properties in BundleModule.qbsAlexandru Croitor2018-04-161-12/+17
| | | | | | | | | | | The input artifacts can have a lot inherited module properties, which would cause any copy operation to take a very long time as well as exhaust memory. Instead directly use the inputs variable. Change-Id: I829b0f9296bde125fa36e750a503c499e9912c78 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix and rename the excludedAuxiliaryInputs propertyChristian Kandeler2018-04-051-1/+1
| | | | | | | | | | | | | | | | | | This property did not only exclude auxiliary inputs, but all kinds of inputs ("inputs", "auxiliaryInputs", "explicitlyDependsOn"), which happens to be what we want, as it does not appear to make any sense to exclude only tags from one of the relevant "input-like" properties. But the behavior was inconsistent: When building the (product-local) rule graph, the property was considered, but not when collecting artifacts from other products during rule application. This is now fixed. [ChangeLog] The excludedAuxiliaryInputs property of the Rule item has been renamed to excludedInputs. The old name is deprecated. Change-Id: Id7eae3461a6e85f53b3d47750d296c3e47a18a95 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* bundle module: Adapt to stricter configure scopeChristian Kandeler2017-12-051-6/+11
| | | | | Change-Id: Ice14160860ea4dba82bd1cf43bd3b0b283b22e25 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Add a PropertyListVariableExpander classJake Petroules2017-09-201-1/+16
| | | | | | | | | | | | This allows us to control exactly what warning message is displayed when the expandPlistEnvironmentVariables function encounters an unknown variable replacement, as opposed to whether or not a hardcoded message is shown. We use this new functionality in the Info.plist processor in order to give a much clearer message what went wrong and where the user might look to correct it. Change-Id: I967ea87c837f9aa2b67bad292e392b356fee8bed Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge 1.8 into masterChristian Kandeler2017-06-301-1/+3
|\ | | | | | | Change-Id: Ide2b95fba4d91a5fe755c2d7a8375f87552d2e20
| * Fix running bundled applications on Apple platformsJake Petroules2017-06-271-1/+3
| | | | | | | | | | | | | | | | | | | | Previously, Qbs would attempt to run the temporary copy of the application executable in the .tmp/ subdirectory of the product build directory. This patch corrects it so that it is run via the copy in the install root, or the actual bundle executable in the build directory. Change-Id: I988081e3f70ec52965e798c8193b75c2dcc4fdf9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Determine Xcode architectures automatically if possibleJake Petroules2017-05-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | ...and provide the list via xcode.standardArchitectures. The current list of hardcoded architectures in common.qbs is based on the Xcode variable ARCHS_STANDARD, which can and does change. Currently we can't default to it because the qbs module cannot depend on the xcode module, but users could use the variable in their own projects. Change-Id: I4bf5bbe3abfdef0f0fdda68a2109169ee6ac877c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Implement basic support for multi-config products on Darwin and AndroidJake Petroules2017-05-231-2/+3
| | | | | | | | | | | | | | | | Task-number: QBS-13 Task-number: QBS-292 Change-Id: I63c2e0a4de5949c73ca33af7381c32606190a43a Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Don't add compiler defines to the Info.plist replacement variable listJake Petroules2017-05-101-9/+0
|/ | | | | | | | | This was not implemented correctly (Xcode substitutes environment variables using this syntax, not compiler defines) and not documented anyways. Further, qbs has better functions for dealing with this. Change-Id: I26c51457c059feddea42de2b13969a842be89696 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Reduce some unnecessary reliance on product.typeJake Petroules2017-02-281-17/+4
| | | | | | | | | | | | This reduces unnecessary implicit dependencies on the output of linker rules being root artifacts. It also makes anything that depends on the Bundle module a bundle by default, now including static libraries. This is a slight behavior change. Change-Id: I1ee8d17e29c36ef54f9ff7eb2ad27e3923cbd8b2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Make sure the bundle rule only accepts inputs from compatible rulesJake Petroules2017-02-241-1/+10
| | | | | | | | This fixes a regression introduced in e9fb1cc which broke all bundle products on Apple platforms. Change-Id: Ice17bb1d6d6b535d8c654ae6c717f32d9b2ea41e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Attach the bundle.content file tag to files that are part of a bundleJake Petroules2017-02-081-23/+64
| | | | | | | | | | | | | This simplifies installation for end users, as they only ever have to use this one tag to install an entire bundle, rather than having to remember every possible file tag attached to the output artifacts of rules which install their output to a bundle. Refactor associated rules to handle this new internal workflow. This paves the way for other new functionality like bundle embedding. Change-Id: I76369383ae08d1ff5433b73d517a657dbd329b78 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge 1.6 into masterChristian Kandeler2016-10-171-1/+1
|\ | | | | | | Change-Id: Ie98233d955f3695da0b20069fb2317931e353e4e
| * Remove ResourceRules handlingJake Petroules2016-10-071-1/+1
| | | | | | | | | | | | | | | | | | These have been obsoleted by Apple, and breaks iOS builds in Xcode 8. https://developer.apple.com/library/mac/technotes/tn2206/_index.html Change-Id: I46a86ae80641d760c8f061b7f76769f8ff99d3db Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Deprecate the "moduleProperties" functionChristian Kandeler2016-08-041-7/+7
|/ | | | | | | | Ever since we introduced module merging, there has been no difference between moduleProperty() and moduleProperties(). Change-Id: I3f9a9df3f24bf971828e774a5f687356509df2ca Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge 1.5 into 1.6Jake Petroules2016-06-281-3/+3
|\ | | | | | | Change-Id: If1a2c368170d89d5e6e11b08a32b37901d51eb1d
| * Do the OS X to macOS rename.v1.5.2Jake Petroules2016-06-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog] The "osx" value in qbs.hostOS and qbs.targetOS has been replaced with "macos". For backwards compatibility, qbs.hostOS will still contain "osx" in addition to "macos", and an error will be printed if qbs.targetOS contains "osx" but not "macos". Specifying "macos" without "osx" is allowed. These checks are subject to be removed in a future version of qbs, so update your hostOS and targetOS checks accordingly. [ChangeLog] cpp.minimumOsxVersion has been deprecated and replaced with cpp.minimumMacosVersion. cpp.minimumOsxVersion is subject to be removed in a future version of qbs, so update your projects accordingly. Change-Id: I479891829dff6eb6750cb2a04e1395f085896f63 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Merge remote-tracking branch 'origin/1.5'Joerg Bornemann2016-06-081-1/+1
|\| | | | | | | | | | | | | | | Conflicts: doc/reference/items/transformer.qdoc share/qbs/modules/cpp/GenericGCC.qbs Change-Id: I45560834560019b18274c373c45651eb8aadd206
| * Replace 'the Qt build suite' with 'Qbs' in copyright notices.Jake Petroules2016-06-061-1/+1
| | | | | | | | | | | | Change-Id: I885d94bb14b325dc36767a840ebdb0be1fb59dd2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Remove items scheduled for removal in 1.6.Jake Petroules2016-04-221-4/+0
|/ | | | | Change-Id: I4098b281ab9c1f5bc29fe23164dd3a3303759ce0 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Respect Probe conditions.Christian Kandeler2016-04-141-2/+0
| | | | | | | | Apparently, we've never tested the conditions of Probe items, so the configure script was always run. Change-Id: I7e4bff6843de8a1f8eae35dd54282ab4de2a5cee Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Fix performance regression in bundle module for non-Darwin targets.Christian Kandeler2016-04-141-0/+5
| | | | | | | | The Probe and the validate script only need to be run for the platforms that actually support bundles. Change-Id: Ib56eb28c8b036d52d97c85345547060bb470d67b Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* Add a validate script to the bundle module.Jake Petroules2016-04-131-6/+61
| | | | | | | | | | | Also, adjust autotests to be more flexible. Some product types (for example, application extensions) may not exist in older versions of Xcode. This fixes the bundleStructure autotest. Change-Id: I2e73cd65f50f44017780001e9e0d5fb184edba31 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Introduce Array.containsAll and Array.containsAny.Jake Petroules2016-03-251-6/+4
| | | | | | | Use where appropriate. Change-Id: Iaade46eab682e32d490dc718ec637930f4611c6c Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Implement proper structuring of shallow frameworks (iOS, tvOS, watchOS).Jake Petroules2016-03-201-67/+89
| | | | | | | Add autotests to verify. Change-Id: I07fa069fd089a8b57dae99a36139e22bb67943ce Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Move global auxiliary functions into a new Utilities extension.Jake Petroules2015-11-271-1/+2
| | | | | Change-Id: If0f12b9d28b83080f4435d91b55d70d5cff5d42e Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Deprecate bundle.infoPlistFile and start tagging Info.plist files.Jake Petroules2015-11-021-17/+28
| | | | | | | | This ensures that artifacts will be appropriately rebuilt if the product's Info.plist file changes, which is currently ignored. Change-Id: I3adf7e74bd32f3bb8d3084061dd2793aa02b932c Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Add signingTimestamp property.Jake Petroules2015-10-311-0/+2
| | | | | | | | This lets the user control if/how timestamps are applied to signed code. Qbs defaults to "none" to match Xcode. Change-Id: I72463681c8c769ada7d9e406a5a398134007a85f Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Remove dead code introduced in bfdc2953ecc4a9800c2974d2d63e528c2bdc9b96.Jake Petroules2015-10-301-6/+0
| | | | | | | | It is a duplicate of the above block from when plist handling was moved from the cpp module to the bundle module. Change-Id: I7ddeb96305c890353b114ac7709950131fede78d Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Make provisioning profile handling significantly faster.Jake Petroules2015-10-291-4/+4
| | | | | | | | Do the work of converting DER-encoded provisioning profiles to JSON in a Command instead of the RHS of frequently evaluated property bindings. Change-Id: I027e7ba39893aae02beb8d4da83efdaaf4e00a26 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Add some additional environment variables for Info.plist replacement.Jake Petroules2015-10-291-0/+8
| | | | | Change-Id: I2bf5f77c11fc3d8d1976b4bab1e456843d999dd4 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>