Skip to content

Commit bdde717

Browse files
committed
automatically generate nice dmgs
1 parent 8928ea0 commit bdde717

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

ci/deploy.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,26 @@ steps:
4242
displayName: 'Run windeployqt'
4343

4444
- script: |
45+
if [ $(nightlyString) == -nightly ]; then
46+
VERSION=$(Build.BuildNumber)
47+
else
48+
VERSION=$(sed -n 's/[^0-9.]*//g;2p' qView.pro)
49+
fi
50+
4551
cd bin
4652
4753
cp $(Qt5_DIR)/plugins/imageformats/libqapng.dylib qView.app/Contents/PlugIns/imageformats/
4854
cp $(Qt5_DIR)/plugins/imageformats/libqavif.dylib qView.app/Contents/PlugIns/imageformats/
4955
56+
macdeployqt qView.app
5057
if [ $(nightlyString) == -nightly ]; then
5158
mv qView.app 'qView$(nightlyString)$(buildNumString).app'
59+
macdeployqt *.app -dmg
60+
else
61+
brew install create-dmg
62+
create-dmg --volname "qView $VERSION" --window-size 660 400 --icon-size 160 --icon "qView.app" 180 170 --hide-extension qView.app --app-drop-link 480 170 "qView-$VERSION.dmg" "qView.app"
5263
fi
5364
54-
macdeployqt *.app -dmg
5565
rm -r *.app
5666
condition: and(succeeded(), ne( variables['skipDeploy'], 'true' ), eq( variables['Agent.OS'], 'Darwin' ))
5767
displayName: 'Run macdeployqt'

dist/mac/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<dict>
55
<key>CFBundleExecutable</key>
66
<string>${EXECUTABLE_NAME}</string>
7+
<key>CFBundleName</key>
8+
<string>qView</string>
79
<key>CFBundleGetInfoString</key>
810
<string>${QMAKE_SHORT_VERSION}</string>
911
<key>CFBundleIconFile</key>

dist/mac/Info_legacy.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<dict>
55
<key>CFBundleExecutable</key>
66
<string>@EXECUTABLE@</string>
7+
<key>CFBundleName</key>
8+
<string>qView</string>
79
<key>CFBundleGetInfoString</key>
810
<string>@SHORT_VERSION@</string>
911
<key>CFBundleIconFile</key>

0 commit comments

Comments
 (0)