diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-12-15 11:19:01 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-12-15 11:22:57 -0800 |
commit | d3065d811ac6441fd0eaa64b17eade4335a5a366 (patch) | |
tree | 2ecbe212033e4322ea38f97d6b8408a50f2f25eb /packaging/macosx | |
parent | 79b8e558cdd888931189ee2900a352cf42fd5ed7 (diff) | |
download | subsurface-d3065d811ac6441fd0eaa64b17eade4335a5a366.tar.gz |
Tools to create nice signed DMG
These are only useful for me, but having them in git makes my life so much
easier...
Instead of using macdeployqt to create my DMG I use the tool that I used for
Subsurface 3. This allows for much prettier DMG content as well.
Fixes #329
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging/macosx')
-rwxr-xr-x | packaging/macosx/make-package.sh | 44 | ||||
-rw-r--r-- | packaging/macosx/sign | 27 |
2 files changed, 35 insertions, 36 deletions
diff --git a/packaging/macosx/make-package.sh b/packaging/macosx/make-package.sh index 4bddbbe13..f2099fe2c 100755 --- a/packaging/macosx/make-package.sh +++ b/packaging/macosx/make-package.sh @@ -9,55 +9,27 @@ # # run this from the top subsurface directory -# adjust to your install location of gtk-mac-bundler. I appear to need at -# least 0.7.2 -BUNDLER=../.local/bin/gtk-mac-bundler -BUNDLER_SRC=$HOME/gtk-mac-bundler - # install location of yourway-create-dmg DMGCREATE=../yoursway-create-dmg/create-dmg -# This is the directory into which MacPorts, libdivecomputer and all the -# other components have been installed -PREFIX=/Applications/Subsurface.app/Contents/Resources - -INFOPLIST=./packaging/macosx/Info.plist - # same git version magic as in the Makefile # 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) -# gtk-mac-bundler allegedly supports signing by setting this environment -# variable, but this fails as we change the shared objects below and all -# the signatures become invalid. -# export APPLICATION_CERT=Dirk - -# force rebuilding of Info.plist -rm $INFOPLIST # first build and install Subsurface and then clean up the staging area +sudo rm -rf ./Subsurface.app make -make install-macosx -rm -rf ./staging - -# now populate it with the bundle -$BUNDLER packaging/macosx/subsurface.bundle +sudo make mac-deploy -# correct the paths and names -cd staging/Subsurface.app/Contents -for i in Resources/lib/gdk-pixbuf-2.0/2.10.0/loaders/*; do - $BUNDLER_SRC/bundler/run-install-name-tool-change.sh $i $PREFIX Resources change -done -for i in Resources/lib/*.dylib; do - install_name_tool -id "@executable_path/../$i" $i -done - -cd ../../.. +# copy things into staging so we can create a nice DMG +rm -rf ./staging +mkdir ./staging +cp -a ./Subsurface.app ./staging -codesign -s Dirk ./staging/Subsurface.app/Contents/MacOS/subsurface \ - ./staging/Subsurface.app/Contents/MacOS/subsurface-bin +sudo sh ./packaging/macosx/sign if [ -f ./Subsurface-$VERSION.dmg ]; then rm ./Subsurface-$VERSION.dmg.bak @@ -67,5 +39,5 @@ fi $DMGCREATE --background ./packaging/macosx/DMG-Background.png \ --window-size 500 300 --icon-size 96 --volname Subsurface-$VERSION \ --app-drop-link 380 205 \ - --volicon ~/subsurface/packaging/macosx/Subsurface.icns \ + --volicon ~/src/subsurface/packaging/macosx/Subsurface.icns \ --icon "Subsurface" 110 205 ./Subsurface-$VERSION.dmg ./staging diff --git a/packaging/macosx/sign b/packaging/macosx/sign new file mode 100644 index 000000000..de0680e14 --- /dev/null +++ b/packaging/macosx/sign @@ -0,0 +1,27 @@ +#!/bin/bash + +echo -- signing staging/Subsurface.app +cd staging + +#echo -- signing application +# +#codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s 3A8CE62A483083EDEA5581A61E770EC1FA8BECE8 ./Subsurface.app/Contents/MacOS/Subsurface + +echo -- signing Qt frameworks + +codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s 3A8CE62A483083EDEA5581A61E770EC1FA8BECE8 ./Subsurface.app//Contents/Frameworks/QtCore.framework/Versions/4/QtCore +codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s 3A8CE62A483083EDEA5581A61E770EC1FA8BECE8 ./Subsurface.app//Contents/Frameworks/QtDeclarative.framework/Versions/4/QtDeclarative +codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s 3A8CE62A483083EDEA5581A61E770EC1FA8BECE8 ./Subsurface.app//Contents/Frameworks/QtGui.framework/Versions/4/QtGui +codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s 3A8CE62A483083EDEA5581A61E770EC1FA8BECE8 ./Subsurface.app//Contents/Frameworks/QtNetwork.framework/Versions/4/QtNetwork +codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s 3A8CE62A483083EDEA5581A61E770EC1FA8BECE8 ./Subsurface.app//Contents/Frameworks/QtScript.framework/Versions/4/QtScript +codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s 3A8CE62A483083EDEA5581A61E770EC1FA8BECE8 ./Subsurface.app//Contents/Frameworks/QtSql.framework/Versions/4/QtSql +codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s 3A8CE62A483083EDEA5581A61E770EC1FA8BECE8 ./Subsurface.app//Contents/Frameworks/QtSvg.framework/Versions/4/QtSvg +codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s 3A8CE62A483083EDEA5581A61E770EC1FA8BECE8 ./Subsurface.app//Contents/Frameworks/QtWebKit.framework/Versions/4/QtWebkit +codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s 3A8CE62A483083EDEA5581A61E770EC1FA8BECE8 ./Subsurface.app//Contents/Frameworks/QtXml.framework/Versions/4/QtXml +codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s 3A8CE62A483083EDEA5581A61E770EC1FA8BECE8 ./Subsurface.app//Contents/Frameworks/QtXmlPatterns.framework/Versions/4/QtXmlPatterns + +echo -- signing plugins +find ./Subsurface.app/Contents/PlugIns -name \*.dylib | xargs codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s 3A8CE62A483083EDEA5581A61E770EC1FA8BECE8 + +echo -- finally sign .app +codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s 3A8CE62A483083EDEA5581A61E770EC1FA8BECE8 ./Subsurface.app |