Skip to content

Commit 1df273d

Browse files
committed
OTX: Fix osx package build
1 parent d3e551f commit 1df273d

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

ci-scripts/osx/travis-buildpkg.sh

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,37 @@ export TOONZDIR=toonz/build/toonz
55
echo ">>> Copying stuff to $TOONZDIR/OpenToonz.app/portablestuff"
66
cp -R stuff $TOONZDIR/OpenToonz.app/portablestuff
77

8-
echo ">>> Creating OpenToonz-OTX-osx.dmg"
8+
echo ">>> Configuring OpenToonz.app for deployment"
99

10-
$QTDIR/bin/macdeployqt $TOONZDIR/OpenToonz.app -dmg -verbose=0 -always-overwrite \
10+
$QTDIR/bin/macdeployqt $TOONZDIR/OpenToonz.app -verbose=0 -always-overwrite \
1111
-executable=$TOONZDIR/OpenToonz.app/Contents/MacOS/lzocompress \
1212
-executable=$TOONZDIR/OpenToonz.app/Contents/MacOS/lzodecompress \
1313
-executable=$TOONZDIR/OpenToonz.app/Contents/MacOS/tcleanup \
1414
-executable=$TOONZDIR/OpenToonz.app/Contents/MacOS/tcomposer \
1515
-executable=$TOONZDIR/OpenToonz.app/Contents/MacOS/tconverter \
1616
-executable=$TOONZDIR/OpenToonz.app/Contents/MacOS/tfarmcontroller \
1717
-executable=$TOONZDIR/OpenToonz.app/Contents/MacOS/tfarmserver
18+
19+
echo ">>> Correcting library paths"
20+
for X in `find $TOONZDIR/OpenToonz.app/Contents -type f -name *.dylib -exec otool -l {} \; | grep -e "^toonz" -e"name \/usr\/local" | sed -e"s/://" -e"s/ (.*$//" -e"s/^ *name //"`
21+
do
22+
Z=`echo $X | cut -c 1-1`
23+
if [ "$Z" != "/" ]
24+
then
25+
LIBFILE=$X
26+
else
27+
Y=`basename $X`
28+
W=`basename $LIBFILE`
29+
if [ -f $TOONZDIR/OpenToonz.app/Contents/Frameworks/$Y -a "$Y" != "$W" ]
30+
then
31+
echo "Fixing $X in $LIBFILE"
32+
install_name_tool -change $X @executable_path/../Frameworks/$Y $LIBFILE
33+
fi
34+
fi
35+
done
1836

37+
echo ">>> Creating OpenToonz-OTX-osx.dmg"
38+
39+
$QTDIR/bin/macdeployqt $TOONZDIR/OpenToonz.app -dmg -verbose=0
40+
1941
mv $TOONZDIR/OpenToonz.dmg $TOONZDIR/../OpenToonz-OTX-osx.dmg

0 commit comments

Comments
 (0)