summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleks Kissinger <aleks0@gmail.com>2019-01-12 12:43:19 +0100
committerAleks Kissinger <aleks0@gmail.com>2019-01-12 12:43:19 +0100
commit123f62d8e237905fb7c9b00725efa3aa84d5f730 (patch)
tree2e0df9abcd0e5e317e765c23a4431f2bfbc78965
parent67e197c3ed5adaf7af497b86c36cb8b1ef2738a7 (diff)
detect poppler version instead of assuming 83
-rwxr-xr-xdeploy-osx.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/deploy-osx.sh b/deploy-osx.sh
index 98043c0..ba8d7c1 100755
--- a/deploy-osx.sh
+++ b/deploy-osx.sh
@@ -6,8 +6,17 @@ macdeployqt tikzit.app
# macdeployqt misses this path for some reason, so fix it
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 -e 'm!.*\(/usr.*\(libpoppler\..*dylib\)\).*!\1!p'`
+POPPLER_LIB=`otool -L $POPPLER_QT | sed -e 'm!.*\(/usr.*\(libpoppler\..*dylib\)\).*!\2!p'`
+
+echo "Found $POPPLER_QT and $POPPLER_LIB"
+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
+
cd ../../..
# create DMG