# HG changeset patch # User Jason Maltzen # Date 2015-12-23 23:54:54 # Node ID 18c75fda9083c459388041d376d1beaac0431c62 # Parent bf1ae47e0be691ec85534f1a14d5d117c074035d Update Mac bundle build script to include a step to package a DMG diff --git a/mac/build_mac_bundle.sh b/mac/build_mac_bundle.sh old mode 100644 new mode 100755 --- a/mac/build_mac_bundle.sh +++ b/mac/build_mac_bundle.sh @@ -1,12 +1,26 @@ #!/bin/sh -/bin/mv DesertPaintLab.app DesertPaintLab.app.`/bin/date +"%Y%m%d%H%M%S"` -/bin/mkdir -p DesertPaintLab.app -/bin/cp Info.plist DesertPaintLab.app/Info.plist -/bin/mkdir -p DesertPaintLab.app/Contents/MacOS -/bin/cp launcher.sh DesertPaintLab.app/Contents/MacOS -/bin/chmod 755 DesertPaintLab.app/Contents/MacOS/launcher.sh -/bin/cp ../bin/Release/DesertPaintLab.exe DesertPaintLab.app/Contents/MacOS/ -/bin/mkdir -p DesertPaintLab.app/Contents/Resources -/bin/cp ../bin/Release/colors.txt DesertPaintLab.app/Contents/Resources/ -/bin/cp -r ../bin/Release/template DesertPaintLab.app/Contents/Resources/template +if [ $# -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi +VERSION=$1 +if [ -d DesertPaintLab.app ]; then + /bin/mv bin/DesertPaintLab.app bin/DesertPaintLab.app.`/bin/date +"%Y%m%d%H%M%S"` +fi +/bin/mkdir -p bin/DesertPaintLab.app +/bin/mkdir -p bin/DesertPaintLab.app/Contents/MacOS +/bin/cp Info.plist bin/DesertPaintLab.app/Contents/Info.plist +/bin/cp launcher.sh bin/DesertPaintLab.app/Contents/MacOS +/bin/chmod 755 bin/DesertPaintLab.app/Contents/MacOS/launcher.sh +/bin/cp ../bin/Release/DesertPaintLab.exe bin/DesertPaintLab.app/Contents/MacOS/ +/bin/mkdir -p bin/DesertPaintLab.app/Contents/Resources +/bin/cp ../bin/Release/colors.txt bin/DesertPaintLab.app/Contents/Resources/ +/bin/cp ../bin/Release/ingredients.txt bin/DesertPaintLab.app/Contents/Resources/ +/bin/cp -r ../bin/Release/template bin/DesertPaintLab.app/Contents/Resources/template + +/usr/bin/defaults write bin/DesertPaintLab.app/Info.plist CFBundleShortVersionString ${VERSION} +/usr/bin/defaults write bin/DesertPaintLab.app/Info.plist CFBundleVersion ${VERSION} + +# package up into a DMG +/usr/bin/hdiutil create -volname DesertPaintLab -srcfolder bin/ -ov -format UDIF -fs HFS+ DesertPaintLab.dmg