diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-10-21 13:38:19 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-10-21 13:40:35 -0700 |
commit | 79d204dde8dcab285d705cbfc76bf4bcafd5cb4a (patch) | |
tree | 8805dcdd31eba2251b3f022785231990b9a52cec /packaging/macosx/make-package.sh | |
parent | b1dbdf63228026f84450d445a960155a0529dd44 (diff) | |
download | subsurface-79d204dde8dcab285d705cbfc76bf4bcafd5cb4a.tar.gz |
Add quick script to automate Mac dmg creation
This basically automates what is documented in the README
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging/macosx/make-package.sh')
-rwxr-xr-x | packaging/macosx/make-package.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/packaging/macosx/make-package.sh b/packaging/macosx/make-package.sh new file mode 100755 index 000000000..328e73454 --- /dev/null +++ b/packaging/macosx/make-package.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# +# this simply automates the steps to create a DMG we can ship +# 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 +# +# run this from the packaging/macosx directory + +VERSION=`grep -1 CFBundleVersionString Info.plist | tail -1 | cut -d\> -f 2 | cut -d\< -f 1` +BUNDLER="../../../.local/bin/gtk-mac-bundler" + +${BUNDLER} subsurface.bundle +cd staging/Subsurface.app/Contents +for i in Resources/lib/gdk-pixbuf-2.0/2.10.0/loaders/* ; do + ~/gtk-mac-bundler/bundler/run-install-name-tool-change.sh $i /Applications/Subsurface.app/Contents/Resources Resources change ; +done +for i in Resources/lib/*.dylib; +do + install_name_tool -id "@executable_path/../$i" $i +done + +cd ../../.. +if [ -f Subsurface-${VERSION}.dmg ]; then + mv Subsurface-${VERSION}.dmg Subsurface-${VERSION}.dmg.bak +fi +hdiutil create -volname Subsurface -srcfolder staging Subsurface-${VERSION}.dmg + |