deploy-osx.sh 991 Bytes
Newer Older
Aleks Kissinger's avatar
Aleks Kissinger committed
1 2 3
# deploy the Mac app bundle. Note the bin/ directory
# of Qt should be in your PATH

4
# copy in libraries and set (most) library paths
Aleks Kissinger's avatar
Aleks Kissinger committed
5
macdeployqt tikzit.app
6

7
# macdeployqt doesn't fix the path to libpoppler for some reason, so we do it by hand
8
cd tikzit.app/Contents/Frameworks
9 10

POPPLER_QT=`ls libpoppler-qt*`
11 12
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'`
13 14 15

echo "Found $POPPLER_QT and $POPPLER_LIB"

16 17 18 19 20 21 22 23
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

24

25 26 27
cd ../../..

# create DMG
Aleks Kissinger's avatar
Aleks Kissinger committed
28 29
hdiutil create -volname TikZiT -srcfolder tikzit.app -ov -format UDZO tikzit.dmg

Aleks Kissinger's avatar
Aleks Kissinger committed
30