2013-02-16 22:46:17 +00:00
|
|
|
#!/bin/sh
|
2012-10-21 20:38:19 +00:00
|
|
|
#
|
|
|
|
# this simply automates the steps to create a DMG we can ship
|
2013-02-15 09:17:27 +00:00
|
|
|
#
|
2012-10-21 20:38:19 +00:00
|
|
|
# for this to work you need to have a custom build of MacPorts / gtk / etc
|
|
|
|
# with prefix=/Applications/Subsurface.app/Contents/Resources
|
|
|
|
# yes, that's a major hack, but otherwise gettext cannot seem to find
|
|
|
|
# the gtk related .mo files and localization is only partial
|
|
|
|
#
|
2013-02-15 09:17:27 +00:00
|
|
|
# run this from the top subsurface directory
|
|
|
|
|
|
|
|
# install location of yourway-create-dmg
|
2013-02-16 23:09:28 +00:00
|
|
|
DMGCREATE=../yoursway-create-dmg/create-dmg
|
2013-02-15 09:17:27 +00:00
|
|
|
|
2013-02-16 06:28:31 +00:00
|
|
|
# same git version magic as in the Makefile
|
2013-02-21 06:45:11 +00:00
|
|
|
# for the naming of volume and dmg we don't need the "always 3 digits"
|
|
|
|
# darwin version - the 'regular' version that has 2 digits for releases
|
|
|
|
# is better
|
|
|
|
VERSION=$(./scripts/get-version linux)
|
2012-10-21 20:38:19 +00:00
|
|
|
|
2013-02-16 06:28:31 +00:00
|
|
|
|
|
|
|
# first build and install Subsurface and then clean up the staging area
|
2013-12-15 19:19:01 +00:00
|
|
|
sudo rm -rf ./Subsurface.app
|
2013-02-16 06:28:31 +00:00
|
|
|
make
|
2013-12-15 19:19:01 +00:00
|
|
|
sudo make mac-deploy
|
2014-12-17 19:29:40 +00:00
|
|
|
sudo install_name_tool -change /Users/hohndel/src/marble/install/libssrfmarblewidget.0.19.2.dylib @executable_path/../Frameworks/libssrfmarblewidget.0.19.2.dylib Subsurface.app/Contents/MacOS/Subsurface
|
2013-02-15 09:17:27 +00:00
|
|
|
|
2013-12-15 19:19:01 +00:00
|
|
|
# copy things into staging so we can create a nice DMG
|
|
|
|
rm -rf ./staging
|
|
|
|
mkdir ./staging
|
|
|
|
cp -a ./Subsurface.app ./staging
|
2013-02-15 09:17:27 +00:00
|
|
|
|
2013-12-15 19:19:01 +00:00
|
|
|
sudo sh ./packaging/macosx/sign
|
2013-02-15 09:17:27 +00:00
|
|
|
|
2013-02-16 23:12:04 +00:00
|
|
|
if [ -f ./Subsurface-$VERSION.dmg ]; then
|
|
|
|
rm ./Subsurface-$VERSION.dmg.bak
|
|
|
|
mv ./Subsurface-$VERSION.dmg ./Subsurface-$VERSION.dmg.bak
|
2012-10-21 20:38:19 +00:00
|
|
|
fi
|
2013-02-15 09:17:27 +00:00
|
|
|
|
2013-02-16 23:12:04 +00:00
|
|
|
$DMGCREATE --background ./packaging/macosx/DMG-Background.png \
|
|
|
|
--window-size 500 300 --icon-size 96 --volname Subsurface-$VERSION \
|
2013-02-15 09:17:27 +00:00
|
|
|
--app-drop-link 380 205 \
|
2013-12-15 19:19:01 +00:00
|
|
|
--volicon ~/src/subsurface/packaging/macosx/Subsurface.icns \
|
2013-02-16 23:12:04 +00:00
|
|
|
--icon "Subsurface" 110 205 ./Subsurface-$VERSION.dmg ./staging
|