From 9cf41cacc76d7a2e8b641723bbdb9e191dc014e5 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Fri, 28 Oct 2022 01:57:03 +0300 Subject: Add public bundle.useBuiltinXcodeBuildSpecs property Change-Id: Ib630bc08565527ee648c803f83d4dc9513410b7e Reviewed-by: Leena Miettinen Reviewed-by: Christian Kandeler --- doc/reference/modules/bundle-module.qdoc | 11 +++++++++++ share/qbs/modules/bundle/BundleModule.qbs | 6 ++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/reference/modules/bundle-module.qdoc b/doc/reference/modules/bundle-module.qdoc index 4184672b4..fe9bf1354 100644 --- a/doc/reference/modules/bundle-module.qdoc +++ b/doc/reference/modules/bundle-module.qdoc @@ -464,6 +464,17 @@ This is the same as the base resources path. */ +/*! + \qmlproperty bool bundle::useBuiltinXcodeBuildSpecs + + Set this property to \c true to use Xcode \c .xcspec files shipped with \QBS. + + This property can be used as a workaround when using a new Xcode version that is not supported + by \QBS yet. + + \default false +*/ + /*! \qmlproperty string bundle::versionsFolderPath \readonly diff --git a/share/qbs/modules/bundle/BundleModule.qbs b/share/qbs/modules/bundle/BundleModule.qbs index 6526fa314..7432161a4 100644 --- a/share/qbs/modules/bundle/BundleModule.qbs +++ b/share/qbs/modules/bundle/BundleModule.qbs @@ -52,7 +52,7 @@ Module { property string xcodeDeveloperPath: xcode.developerPath property var xcodeArchSettings: xcode._architectureSettings property string productTypeIdentifier: _productTypeIdentifier - property bool useXcodeBuildSpecs: _useXcodeBuildSpecs + property bool useXcodeBuildSpecs: !useBuiltinXcodeBuildSpecs property bool isMacOs: qbs.targetOS.contains("macos") property bool xcodePresent: xcode.present property string xcodeVersion: xcode.version @@ -187,11 +187,13 @@ Module { readonly property string unlocalizedResourcesFolderPath: bundleSettingsProbe.xcodeSettings["UNLOCALIZED_RESOURCES_FOLDER_PATH"] readonly property string versionsFolderPath: bundleSettingsProbe.xcodeSettings["VERSIONS_FOLDER_PATH"] + property bool useBuiltinXcodeBuildSpecs: !_useXcodeBuildSpecs // true to use ONLY the qbs build specs + // 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 + property bool _useXcodeBuildSpecs: true // TODO: remove in 1.25 property var extraEnv: ({ "PRODUCT_BUNDLE_IDENTIFIER": identifier -- cgit v1.2.3