diff --git a/appveyor.yml b/appveyor.yml index 35222b281..21a1732fb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -693,7 +693,7 @@ for: python3 ./scripts/treestate.py scan /usr/local usrlocal.json brew update - brew install coreutils ccache git openssl@1.1 pkg-config + brew install coreutils ccache git openssl@1.1 pkg-config qbs # The build environment is now ready for use. We can complete # the rest of the process of creating the Homebrew archive @@ -725,6 +725,10 @@ for: - qmake --version - which qmake - qbs --version + # Patch Qbs. Remove after Qbs 2.1.2+. + - curl https://gist.githubusercontent.com/dismine/43a20f66f563232e54e02f2e85732e7a/raw/e80a0c827348da3e99310ba4a648c1860bb3a8a6/BundleModule.qbs --output $HOME/BundleModule.qbs --silent + - cp -f $HOME/BundleModule.qbs $(brew --prefix qbs)/share/qbs/modules/bundle/BundleModule.qbs + - rm $HOME/BundleModule.qbs - cd ${APPVEYOR_BUILD_FOLDER} build_script: diff --git a/dmg.qbs b/dmg.qbs index 669266716..f51416941 100755 --- a/dmg.qbs +++ b/dmg.qbs @@ -1,5 +1,6 @@ import qbs.File import qbs.FileInfo +import qbs.Utilities VAppleApplicationDiskImage { Depends { name: "buildconfig" } @@ -43,10 +44,15 @@ VAppleApplicationDiskImage { codesign.signingType: "apple-id" } - files: [ - "dist/macx/dmg/dmg.iconset", - "dist/macx/dmg/en_US.lproj/LICENSE" - ] + files: { + var files = ["dist/macx/dmg/dmg.iconset"]; + + // Tested on 2.1.1. At least this version doesn't crash even if the feature still doesn't work + if (Utilities.versionCompare(qbs.version, "2.1.1") >= 0) + files.push("dist/macx/dmg/en_US.lproj/LICENSE"); + + return files; + } Group { name: "Bundles"