Use appdmg instead of create-dmg

This commit is contained in:
Luis Ángel San Martín 2019-09-01 11:27:45 +02:00
parent ffbe32734e
commit 30c5b0d904
3 changed files with 56 additions and 1 deletions

View File

@ -33,6 +33,7 @@ jobs:
brew link qt --force
brew install create-dmg
brew install clang-format
npm install -g appdmg
wget "https://sourceforge.net/projects/p7zip/files/p7zip/16.02/p7zip_16.02_src_all.tar.bz2" -P $(Build.SourcesDirectory)/compressed_archive
tar xjf $(Build.SourcesDirectory)/compressed_archive/p7zip_16.02_src_all.tar.bz2 -C $(Build.SourcesDirectory)/compressed_archive
mv $(Build.SourcesDirectory)/compressed_archive/p7zip_16.02 $(Build.SourcesDirectory)/compressed_archive/libp7zip

View File

@ -55,6 +55,10 @@ echo "Creating dmg package"
#tar -czf "${dest}".tar.gz "${dest}"
#hdiutil create "${dest}".dmg -srcfolder "./${dest}" -ov
create-dmg --volname "YACReader $VERSION.$BUILD_NUMBER Installer" --volicon icon.icns --window-size 600 403 --icon-size 128 --app-drop-link 485 90 --background background.png --icon YACReader 80 90 --icon YACReaderLibrary 235 90 --eula COPYING.txt --icon YACReaderLibraryServer 470 295 --icon README.md 120 295 --icon COPYING.txt 290 295 "$dest.dmg" "$dest"
#create-dmg --volname "YACReader $VERSION.$BUILD_NUMBER Installer" --volicon icon.icns --window-size 600 403 --icon-size 128 --app-drop-link 485 90 --background background.png --icon YACReader 80 90 --icon YACReaderLibrary 235 90 --eula COPYING.txt --icon YACReaderLibraryServer 470 295 --icon README.md 120 295 --icon COPYING.txt 290 295 "$dest.dmg" "$dest"
sed -i'' -e 's/#VERSION#/${VERSION}/g' dmg.json
sed -i'' -e 's/#BUILD_NUMBER#/${BUILD_NUMBER}/g' dmg.json
appdmg dmg.json "$dest.dmg"
echo "Done!"

50
dmg.json Normal file
View File

@ -0,0 +1,50 @@
{
"title": "YACReader-#VERSION#.#BUILD_NUMBER# MacOSX-Intel",
"icon": "icon.icns",
"background": "background.png",
"window": {
"size": {
"width": 600,
"height": 403
}
},
"icon-size": 128,
"contents": [
{
"x": 485,
"y": 90,
"type": "link",
"path": "/Applications"
},
{
"x": 80,
"y": 90,
"type": "file",
"path": "YACReader-9.5.0 MacOSX-Intel/YACReader.app"
},
{
"x": 235,
"y": 90,
"type": "file",
"path": "YACReader-9.5.0 MacOSX-Intel/YACReaderLibrary.app"
},
{
"x": 470,
"y": 295,
"type": "file",
"path": "YACReader-9.5.0 MacOSX-Intel/YACReaderLibraryServer"
},
{
"x": 120,
"y": 295,
"type": "file",
"path": "YACReader-9.5.0 MacOSX-Intel/README.md"
},
{
"x": 290,
"y": 295,
"type": "file",
"path": "YACReader-9.5.0 MacOSX-Intel/COPYING.txt"
}
]
}