Skip to content

Commit

Permalink
automatically generate nice dmgs
Browse files Browse the repository at this point in the history
  • Loading branch information
jurplel committed Oct 30, 2020
1 parent 8928ea0 commit bdde717
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ci/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,26 @@ steps:
displayName: 'Run windeployqt'

- script: |
if [ $(nightlyString) == -nightly ]; then
VERSION=$(Build.BuildNumber)
else
VERSION=$(sed -n 's/[^0-9.]*//g;2p' qView.pro)
fi
cd bin
cp $(Qt5_DIR)/plugins/imageformats/libqapng.dylib qView.app/Contents/PlugIns/imageformats/
cp $(Qt5_DIR)/plugins/imageformats/libqavif.dylib qView.app/Contents/PlugIns/imageformats/
macdeployqt qView.app
if [ $(nightlyString) == -nightly ]; then
mv qView.app 'qView$(nightlyString)$(buildNumString).app'
macdeployqt *.app -dmg
else
brew install create-dmg
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"
fi
macdeployqt *.app -dmg
rm -r *.app
condition: and(succeeded(), ne( variables['skipDeploy'], 'true' ), eq( variables['Agent.OS'], 'Darwin' ))
displayName: 'Run macdeployqt'
Expand Down
2 changes: 2 additions & 0 deletions dist/mac/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<dict>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleName</key>
<string>qView</string>
<key>CFBundleGetInfoString</key>
<string>${QMAKE_SHORT_VERSION}</string>
<key>CFBundleIconFile</key>
Expand Down
2 changes: 2 additions & 0 deletions dist/mac/Info_legacy.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<dict>
<key>CFBundleExecutable</key>
<string>@EXECUTABLE@</string>
<key>CFBundleName</key>
<string>qView</string>
<key>CFBundleGetInfoString</key>
<string>@SHORT_VERSION@</string>
<key>CFBundleIconFile</key>
Expand Down

0 comments on commit bdde717

Please sign in to comment.