diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-11-08 15:14:03 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-08 15:34:15 -0800 |
commit | f66e3a4489b0739ca5ca1e1ebc7f26617f5f4017 (patch) | |
tree | abe6dc52853c6539fa1c5099a3d8a6429ea9d8fb | |
parent | acb74f25f7e6d26df7f39f596510ee2d5226fb15 (diff) | |
download | subsurface-f66e3a4489b0739ca5ca1e1ebc7f26617f5f4017.tar.gz |
Update Mac bundle build & sign scripts
These are mostly a convenience for me, they'd obviously have to be updated for
someone else trying to use them.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rwxr-xr-x | packaging/macosx/make-package.sh | 28 | ||||
-rw-r--r-- | packaging/macosx/sign | 21 |
2 files changed, 43 insertions, 6 deletions
diff --git a/packaging/macosx/make-package.sh b/packaging/macosx/make-package.sh index 2587ab052..70c9d71de 100755 --- a/packaging/macosx/make-package.sh +++ b/packaging/macosx/make-package.sh @@ -20,12 +20,35 @@ rm -rf ./Subsurface.app LIBRARY_PATH=${DIR}/install-root/lib make -j8 LIBRARY_PATH=${DIR}/install-root/lib make install +# HACK TIME... QtXml is missing. screw this +cp -a /Users/hohndel/Qt/5.5/clang_64/lib/QtXml.framework Subsurface.app/Contents/Frameworks +rm -rf Subsurface.app/Contents/Frameworks/QtXml.framework/Versions/5/Headers +rm -rf Subsurface.app/Contents/Frameworks/QtXml.framework/Headers +rm -rf Subsurface.app/Contents/Frameworks/QtXml.framework/QtXml.prl +rm -rf Subsurface.app/Contents/Frameworks/QtXml.framework/Versions/5/*_debug +rm -rf Subsurface.app/Contents/Frameworks/QtXml.framework/*_debug* +install_name_tool -id @executable_path/../Frameworks/QtXml Subsurface.app/Contents/Frameworks/QtXml.framework/QtXml +install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/QtCore Subsurface.app/Contents/Frameworks/QtXml.framework/QtXml + # now adjust a few references that macdeployqt appears to miss EXECUTABLE=Subsurface.app/Contents/MacOS/Subsurface -for i in libssrfmarblewidget libgit2; do +for i in libssh libssrfmarblewidget libgit2; do OLD=$(otool -L ${EXECUTABLE} | grep $i | cut -d\ -f1 | tr -d "\t") + cp ${DIR}/install-root/lib/$(basename ${OLD}) Subsurface.app/Contents/Frameworks SONAME=$(basename $OLD) install_name_tool -change ${OLD} @executable_path/../Frameworks/${SONAME} ${EXECUTABLE} + if [[ "$i" = "libssh" ]] ; then + LIBSSH=$(basename ${OLD}) + fi + if [[ "$i" = "libgit2" ]] ; then + install_name_tool -change ${LIBSSH} @executable_path/../Frameworks/${LIBSSH} Subsurface.app/Contents/Frameworks/${SONAME} + fi +done + +# next deal with libGrantlee +LIBG=Subsurface.app/Contents/Frameworks/libGrantlee_Templates.5.dylib +for i in QtScript.framework/Versions/5/QtScript QtCore.framework/Versions/5/QtCore ; do + install_name_tool -change @rpath/$i @executable_path/../Frameworks/$i ${LIBG} done # it seems the compiler in XCode 4.6 doesn't build Grantlee5 correctly, @@ -34,13 +57,16 @@ done # # -disabled for now as this is still under more investigation- # cp -a /Users/hohndel/src/tmp/Subsurface.app/Contents Subsurface.app/ +cp ${DIR}/tmp/Subsurface.app/Contents/Frameworks/lib{sql,usb,zip}* Subsurface.app/Contents/Frameworks # clean up shared library dependency in the Grantlee plugins for i in Subsurface.app/Contents/PlugIns/grantlee/5.0/*.so; do OLD=$(otool -L $i | grep libGrantlee_Templates | cut -d\ -f1 | tr -d "\t") SONAME=$(basename $OLD ) install_name_tool -change ${OLD} @executable_path/../Frameworks/${SONAME} $i; + mv $i Subsurface.app/Contents/PlugIns/grantlee done +rmdir Subsurface.app/Contents/PlugIns/grantlee/5.0 # copy things into staging so we can create a nice DMG rm -rf ./staging diff --git a/packaging/macosx/sign b/packaging/macosx/sign index 916600869..9084fec42 100644 --- a/packaging/macosx/sign +++ b/packaging/macosx/sign @@ -5,9 +5,10 @@ echo -- signing staging/Subsurface.app cd staging -echo -- signing Qt frameworks +echo -- signing Qt frameworks and shared libraries -codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s Dirk ./Subsurface.app//Contents/Frameworks/QtConcurrent.framework/Versions/5/QtConcurrent \ +for i in \ + ./Subsurface.app//Contents/Frameworks/QtConcurrent.framework/Versions/5/QtConcurrent \ ./Subsurface.app//Contents/Frameworks/QtCore.framework/Versions/5/QtCore \ ./Subsurface.app//Contents/Frameworks/QtGui.framework/Versions/5/QtGui \ ./Subsurface.app//Contents/Frameworks/QtMultimedia.framework/Versions/5/QtMultimedia \ @@ -25,10 +26,20 @@ codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s Dirk ./Su ./Subsurface.app//Contents/Frameworks/QtWebKit.framework/Versions/5/QtWebKit \ ./Subsurface.app//Contents/Frameworks/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets \ ./Subsurface.app//Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets \ - ./Subsurface.app//Contents/Frameworks/QtXmlPatterns.framework/Versions/5/QtXMLPatterns + ./Subsurface.app//Contents/Frameworks/QtBluetooth.framework/Versions/5/QtBluetooth \ + ./Subsurface.app//Contents/Frameworks/QtDbus.framework/Versions/5/QtDbus \ + ./Subsurface.app//Contents/Frameworks/QtXml.framework/Versions/5/QtXml \ + ./Subsurface.app//Contents/Frameworks/QtWebChannel.framework/Versions/5/QtWebChannel \ + ./Subsurface.app//Contents/Frameworks/*.dylib +do + codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s Dirk $i +done echo -- signing plugins -find ./Subsurface.app/Contents/PlugIns -name \*.dylib | xargs codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s Dirk +for i in $(find ./Subsurface.app/Contents/PlugIns -name \*.dylib -o -name \*.so) +do + codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s Dirk $i +done echo -- finally sign .app -codesign --keychain /Users/hohndel/Library/Keychains/login.keychain -s Dirk ./Subsurface.app +codesign -v --keychain /Users/hohndel/Library/Keychains/login.keychain -s Dirk ./Subsurface.app |