Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
None
-
1.19.0
-
None
-
-
fb3b51013323d76c301a36c20fb4b53cc93fb45b (qbs/qbs/1.19)
Description
codesign an app bundle on macOS fails if the application has a version set:
import qbs CppApplication { Depends { name: "codesign" } Depends { name: "bundle" } version: "3.4.1" codesign.enableCodeSigning: true bundle.isBundle: true bundle.identifierPrefix: "org.example" // next line: workaround bundle.frameworkVersion: "" files: [ "main.cpp" ] }
setting the version lets BundleModule.qbs frameworkVersion() accidentally derive a framework version which then lets codesign deduce the product is a framework rather than an application and will append "Content" to the signing file path which lets codesign fail with "invalid bundle".
My proposed fix is:
bundle/BundleModule.qbs::135: property string frameworkVersion: { + if( product.type.contains("application") ) + return ""; var n = parseInt(product.version, 10); return isNaN(n) ? bundleSettingsProbe.xcodeSettings["FRAMEWORK_VERSION"] : String(n); }
Cheers,
Max