diff --git a/src/platform/osx/BuildMacOSImage.sh.in b/src/platform/osx/BuildMacOSImage.sh.in index d26a300e27..9cb8464b50 100644 --- a/src/platform/osx/BuildMacOSImage.sh.in +++ b/src/platform/osx/BuildMacOSImage.sh.in @@ -105,3 +105,33 @@ echo -e "\n[9/9] Creating .tgz and DMG Image for distribution..." cat $ROOT/Build.log fi fi + +if [[ -e $OS_NAME.dmg ]] +then + +else +echo -e "\n[9/9 (bis)] Creating .tgz and DMG Image for distribution... again" + { + echo killing...; sudo pkill -9 XProtect >/dev/null || true; + echo waiting...; while pgrep XProtect; do sleep 3; done; + + tar -czvf @SLIC3R_APP_KEY@${VERSION_NUMBER}-$OS_NAME.tgz pack/@SLIC3R_APP_KEY@ + #tar -czvf @SLIC3R_APP_KEY@-@SLIC3R_VERSION_FULL@-macOS.tgz pack/@SLIC3R_APP_KEY@ + + # create dmg + hdiutil create -ov -fs HFS+ -volname "@SLIC3R_APP_KEY@" -srcfolder "pack/@SLIC3R_APP_KEY@" temp.dmg + hdiutil convert temp.dmg -format UDZO -o @SLIC3R_APP_KEY@${VERSION_NUMBER}-$OS_NAME.dmg + rm -f temp.dmg + popd + } &> $ROOT/Build.log # Capture all command output + + # check if evrything went well + if [ -e $OS_NAME.dmg ]; then + echo -e "\n ... done\n" + else + # something went wrong, publish log + echo -e "\n ... fail\n" + cat $ROOT/Build.log + fi +fi +