summaryrefslogtreecommitdiff
path: root/deploy-osx.sh
diff options
context:
space:
mode:
authorGard Spreemann <gspreemann@gmail.com>2019-01-14 17:45:44 +0100
committerGard Spreemann <gspreemann@gmail.com>2019-01-14 17:45:44 +0100
commit8074365997835ec3e93ee2aa1eadb3a794437066 (patch)
tree6f87d32435c8214c77c9e8103ca4e1d697ae02d5 /deploy-osx.sh
parent5aef304fa112d4b11e401671900877d3c844e07d (diff)
parentd4b6e9839823e27af646a915436462254758e053 (diff)
Merge tag 'v2.1.2' into debian/sid
Diffstat (limited to 'deploy-osx.sh')
-rwxr-xr-xdeploy-osx.sh20
1 files changed, 17 insertions, 3 deletions
diff --git a/deploy-osx.sh b/deploy-osx.sh
index 98043c0..dd9efcd 100755
--- a/deploy-osx.sh
+++ b/deploy-osx.sh
@@ -4,10 +4,24 @@
# copy in libraries and set (most) library paths
macdeployqt tikzit.app
-# macdeployqt misses this path for some reason, so fix it
+# macdeployqt doesn't fix the path to libpoppler for some reason, so we do it by hand
cd tikzit.app/Contents/Frameworks
-install_name_tool -id "@executable_path/../Frameworks/libpoppler.83.dylib" libpoppler.83.dylib
-install_name_tool -change /usr/local/Cellar/poppler/0.72.0/lib/libpoppler.83.dylib "@executable_path/../Frameworks/libpoppler.83.dylib" libpoppler-qt5.1.dylib
+
+POPPLER_QT=`ls libpoppler-qt*`
+POPPLER_PATH=`otool -L $POPPLER_QT | sed -n 's!.*\(/usr.*\(libpoppler\..*dylib\)\).*!\1!p'`
+POPPLER_LIB=`otool -L $POPPLER_QT | sed -n 's!.*\(/usr.*\(libpoppler\..*dylib\)\).*!\2!p'`
+
+echo "Found $POPPLER_QT and $POPPLER_LIB"
+
+if [ "$POPPLER_PATH" != "" ]; then
+ echo "Replacing $POPPLER_PATH with relative path..."
+ install_name_tool -id "@executable_path/../Frameworks/$POPPLER_LIB" $POPPLER_LIB
+ install_name_tool -change $POPPLER_PATH "@executable_path/../Frameworks/$POPPLER_LIB" $POPPLER_QT
+else
+ echo "Poppler already has relative path, so nothing to do."
+fi
+
+
cd ../../..
# create DMG