11 # Pull out framework paths info with otool
12 MACDEPLOYQT=`otool -L $APP.app/Contents/MacOS/fstl | sed -n -e "s:\(.*\)lib/QtCore.*:\1/bin/macdeployqt:gp"`
15 cp ../app/Info.plist $APP.app/Contents/
17 # Delete unused Qt plugins
18 cd fstl.app/Contents/PlugIns
19 rm -rf accessible audio imageformats mediaservice playlistformats position printsupport qml1tooling sensorgestures sensors
22 echo "Fixing Qt for $1"
23 for LIB in $( otool -L $1 | sed -n -e "s:\(.*Qt.*.framework[^ ]*\).*:\1:gp" )
25 RENAMED=`echo $LIB | sed -n -e "s:.*\(Qt.*\)\.framework.*:@executable_path/../Frameworks/\1.framework/Versions/5/\1:gp"`
26 install_name_tool -change $LIB $RENAMED $1
30 # Remap platform links
32 fix_qt libqcocoa.dylib
34 # Delete unused Qt frameworks
36 rm -rf QtDeclarative.framework QtMultimedia.framework QtMultimediaWidgets.framework QtNetwork.framework QtPositioning.framework QtQml.framework QtQuick.framework QtScript.framework QtSensors.framework QtSql.framework QtXmlPatterns.framework Qt3DCore.framework Qt3DRender.framework QtLocation.framework QtSerialBus.framework QtSerialPort.framework
38 # Clean up remaining Qt frameworks
39 for LIB in $( ls|sed -n -e "s:\(Qt.*\)\.framework:\1:gp" )
41 fix_qt $LIB.framework/Versions/Current/$LIB
49 cp ../README.md ./$APP/README.txt
51 hdiutil create $APP.dmg -volname "$APP" -srcfolder $APP