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
|
2015-04-04 23:31:16 +00:00
|
|
|
VERSION=$(cd ../subsurface; ./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
|
2015-01-02 23:49:08 +00:00
|
|
|
rm -rf ./Subsurface.app
|
|
|
|
make -j8
|
2015-04-04 23:31:16 +00:00
|
|
|
make install
|
2015-01-02 23:49:08 +00:00
|
|
|
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
|
2015-04-04 23:31:16 +00:00
|
|
|
install_name_tool -change /Users/hohndel/src/libgit2/build/libgit2.22.dylib @executable_path/../Frameworks/libgit2.22.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
|
|
|
|
2015-04-04 23:31:16 +00:00
|
|
|
sh ../subsurface/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
|
|
|
|
2015-04-04 23:31:16 +00:00
|
|
|
$DMGCREATE --background ../subsurface/packaging/macosx/DMG-Background.png \
|
2013-02-16 23:12:04 +00:00
|
|
|
--window-size 500 300 --icon-size 96 --volname Subsurface-$VERSION \
|
2013-02-15 09:17:27 +00:00
|
|
|
--app-drop-link 380 205 \
|
2015-04-04 23:31:16 +00:00
|
|
|
--volicon ../subsurface/packaging/macosx/Subsurface.icns \
|
2013-02-16 23:12:04 +00:00
|
|
|
--icon "Subsurface" 110 205 ./Subsurface-$VERSION.dmg ./staging
|