aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-02-21 08:54:29 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-08 23:25:12 -0700
commita55b3dd2c14105f2e5d8aa7d9eb03ef55f5cfaaf (patch)
treef06cb1de1f6a1816f0cff03742c339940b8962cd
parentd43032f01fbaa55b1afd144c41e18d8fd3c46396 (diff)
downloadsubsurface-a55b3dd2c14105f2e5d8aa7d9eb03ef55f5cfaaf.tar.gz
build-system: macOS: more hacking around paths
This really is mostly for my scripting and how I build the official packages. But there isn't much harm having it in the repo. And it makes my life easier. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rwxr-xr-xpackaging/macosx/make-package.sh15
-rw-r--r--packaging/macosx/sign2
2 files changed, 16 insertions, 1 deletions
diff --git a/packaging/macosx/make-package.sh b/packaging/macosx/make-package.sh
index f0127f4ad..6aa5f53a3 100755
--- a/packaging/macosx/make-package.sh
+++ b/packaging/macosx/make-package.sh
@@ -42,6 +42,21 @@ for i in libgit2 libGrantlee_TextDocument.dylib libGrantlee_Templates.dylib; do
fi
done
+# ensure libpng and libjpeg inside the bundle are referenced in QtWebKit libraries
+QTWEBKIT=Subsurface.app/Contents/Frameworks/QtWebKit.framework/QtWebKit
+for i in libjpeg.8.dylib libpng16.16.dylib; do
+ OLD=$(otool -L ${QTWEBKIT} | grep $i | cut -d\ -f1 | tr -d "\t")
+ if [[ ! -z ${OLD} ]] ; then
+ # copy the library into the bundle and make sure its id and the reference to it are correct
+ if [[ ! -f Subsurface.app/Contents/Frameworks/$(basename ${OLD}) ]] ; then
+ cp ${OLD} Subsurface.app/Contents/Frameworks
+ fi
+ SONAME=$(basename $OLD)
+ install_name_tool -change ${OLD} @executable_path/../Frameworks/${SONAME} ${QTWEBKIT}
+ install_name_tool -id @executable_path/../Frameworks/${SONAME} Subsurface.app/Contents/Frameworks/${SONAME}
+ fi
+done
+
# next, copy libssh2.1
# cp ${DIR}/install-root/lib/libssh2.1.dylib Subsurface.app/Contents/Frameworks
diff --git a/packaging/macosx/sign b/packaging/macosx/sign
index 9a0d706f9..0b45d5f6d 100644
--- a/packaging/macosx/sign
+++ b/packaging/macosx/sign
@@ -11,4 +11,4 @@ rm -rf Subsurface.app/Contents/Frameworks/QtDBus.framework
# remove anything codesign doesn't want us to sign
find Subsurface.app/Contents/Frameworks/ \( -name Headers -o -name \*.prl -o -name \*_debug \) -print0 | xargs -0 rm -rf
-codesign --keychain $HOME/Library/Keychains/login.keychain -s "Developer ID Application: Dirk Hohndel" --deep Subsurface.app
+codesign --keychain $HOME/Library/Keychains/login.keychain -s "Developer ID Application: Dirk Hohndel" --deep --force Subsurface.app