forked from tikzit/tikzit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy-osx.sh
executable file
·30 lines (20 loc) · 991 Bytes
/
deploy-osx.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# deploy the Mac app bundle. Note the bin/ directory
# of Qt should be in your PATH
# copy in libraries and set (most) library paths
macdeployqt tikzit.app
# macdeployqt doesn't fix the path to libpoppler for some reason, so we do it by hand
cd tikzit.app/Contents/Frameworks
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
hdiutil create -volname TikZiT -srcfolder tikzit.app -ov -format UDZO tikzit.dmg