Probe if bundles are ready.
This commit is contained in:
parent
626b0d4bc8
commit
e54c3f0d52
|
@ -259,7 +259,7 @@ macos_task_template: &MACOS_TASK_TEMPLATE
|
||||||
- qbs-config defaultProfile qt6
|
- qbs-config defaultProfile qt6
|
||||||
- qbs config profiles.qt6.baseProfile clang
|
- qbs config profiles.qt6.baseProfile clang
|
||||||
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build --command-echo-mode command-line --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:${ENABLE_CCACHE} project.conanProfiles:valentina moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig 'modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME'
|
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build --command-echo-mode command-line --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:${ENABLE_CCACHE} project.conanProfiles:valentina moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig 'modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME'
|
||||||
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build -p 'Valentina DMG' --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:${ENABLE_CCACHE} project.conanProfiles:valentina moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig 'modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME'
|
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:${ENABLE_CCACHE} project.conanProfiles:valentina moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig 'modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME'
|
||||||
# Store the notarization credentials so that we can prevent a UI password dialog
|
# Store the notarization credentials so that we can prevent a UI password dialog
|
||||||
# from blocking the CI
|
# from blocking the CI
|
||||||
- echo "Create keychain profile"
|
- echo "Create keychain profile"
|
||||||
|
|
|
@ -726,7 +726,7 @@ for:
|
||||||
- qbs config defaultProfile qt6
|
- qbs config defaultProfile qt6
|
||||||
- qbs config profiles.qt6.baseProfile clang
|
- qbs config profiles.qt6.baseProfile clang
|
||||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix openssl@1.1)/lib/pkgconfig 'modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME'
|
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix openssl@1.1)/lib/pkgconfig 'modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME'
|
||||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix openssl@1.1)/lib/pkgconfig 'modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME'
|
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix openssl@1.1)/lib/pkgconfig 'modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME'
|
||||||
# Store the notarization credentials so that we can prevent a UI password dialog
|
# Store the notarization credentials so that we can prevent a UI password dialog
|
||||||
# from blocking the CI
|
# from blocking the CI
|
||||||
- echo "Create keychain profile"
|
- echo "Create keychain profile"
|
||||||
|
@ -838,7 +838,7 @@ for:
|
||||||
- qbs config defaultProfile qt6
|
- qbs config defaultProfile qt6
|
||||||
- qbs config profiles.qt6.baseProfile clang
|
- qbs config profiles.qt6.baseProfile clang
|
||||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false 'modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME'
|
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false 'modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME'
|
||||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix openssl@1.1)/lib/pkgconfig 'modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME'
|
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix openssl@1.1)/lib/pkgconfig 'modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME'
|
||||||
# notarytool supported since XCode 13. First we need to backport it.
|
# notarytool supported since XCode 13. First we need to backport it.
|
||||||
- curl https://bitbucket.org/valentinaproject/valentinaproject.bitbucket.io/downloads/notarytool.tar.xz --output $HOME/notarytool.tar.xz --silent
|
- curl https://bitbucket.org/valentinaproject/valentinaproject.bitbucket.io/downloads/notarytool.tar.xz --output $HOME/notarytool.tar.xz --silent
|
||||||
- tar -xf $HOME/notarytool.tar.xz
|
- tar -xf $HOME/notarytool.tar.xz
|
||||||
|
|
21
dmg.qbs
21
dmg.qbs
|
@ -1,3 +1,6 @@
|
||||||
|
import qbs.File
|
||||||
|
import qbs.FileInfo
|
||||||
|
|
||||||
VAppleApplicationDiskImage {
|
VAppleApplicationDiskImage {
|
||||||
Depends { name: "buildconfig" }
|
Depends { name: "buildconfig" }
|
||||||
Depends { name: "ib" }
|
Depends { name: "ib" }
|
||||||
|
@ -5,13 +8,29 @@ VAppleApplicationDiskImage {
|
||||||
Depends { name: "Tape"; condition: buildconfig.enableMultiBundle }
|
Depends { name: "Tape"; condition: buildconfig.enableMultiBundle }
|
||||||
Depends { name: "Puzzle"; condition: buildconfig.enableMultiBundle }
|
Depends { name: "Puzzle"; condition: buildconfig.enableMultiBundle }
|
||||||
|
|
||||||
condition: qbs.targetOS.contains("macos")
|
condition: qbs.targetOS.contains("macos") && bundleProbe.ready
|
||||||
name: "Valentina DMG"
|
name: "Valentina DMG"
|
||||||
targetName: "valentina"
|
targetName: "valentina"
|
||||||
version: buildconfig.projectVersion
|
version: buildconfig.projectVersion
|
||||||
builtByDefault: false
|
builtByDefault: false
|
||||||
codesign.enableCodeSigning: buildconfig.enableCodeSigning
|
codesign.enableCodeSigning: buildconfig.enableCodeSigning
|
||||||
|
|
||||||
|
Probe {
|
||||||
|
id: bundleProbe
|
||||||
|
property string root: absoluteSourceBase
|
||||||
|
property bool enableMultiBundle: buildconfig.enableMultiBundle
|
||||||
|
property bool ready
|
||||||
|
configure: {
|
||||||
|
if (!enableMultiBundle)
|
||||||
|
ready = File.exists(FileInfo.joinPaths(root, "Valentina.app"));
|
||||||
|
else
|
||||||
|
ready = File.exists(FileInfo.joinPaths(root, "Valentina.app"))
|
||||||
|
&& File.exists(FileInfo.joinPaths(root, "Tape.app"))
|
||||||
|
&& File.exists(FileInfo.joinPaths(root, "Puzzle.app"));
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Properties {
|
Properties {
|
||||||
condition: qbs.buildVariant !== "release"
|
condition: qbs.buildVariant !== "release"
|
||||||
codesign.codesignFlags: ["--deep"]
|
codesign.codesignFlags: ["--deep"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user