diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 50285980..5eb0b65c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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 diff --git a/compileOSX.sh b/compileOSX.sh index 9a7098d7..f79e20af 100755 --- a/compileOSX.sh +++ b/compileOSX.sh @@ -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!" diff --git a/dmg.json b/dmg.json new file mode 100644 index 00000000..17a86537 --- /dev/null +++ b/dmg.json @@ -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" + } + ] +} \ No newline at end of file