comparison scripts/osx/deploy_build.sh @ 273:f31305b9f60a

*: various code safety changes this also makes the code build on Qt 5.7. I can't test it though because I don't have it working... FAIL!
author Paper <paper@paper.us.eu.org>
date Thu, 18 Apr 2024 16:53:17 -0400
parents 862d0d8619f6
children 22f9aacf6ac1
comparison
equal deleted inserted replaced
272:5437009cb10e 273:f31305b9f60a
2 # 2 #
3 # deploy_build.sh: 3 # deploy_build.sh:
4 # run this in your build dir to get a usable app bundle 4 # run this in your build dir to get a usable app bundle
5 5
6 SCRIPT_DIR=$(dirname -- "$0") 6 SCRIPT_DIR=$(dirname -- "$0")
7 FRAMEWORK_MODE=false
8 if test "x$1x" = "x--frameworksx"; then
9 echo "framework mode enabled"
10 FRAMEWORK_MODE=true
11 fi
7 BUNDLE_NAME="Minori" 12 BUNDLE_NAME="Minori"
8 13
9 cp -r "$SCRIPT_DIR/../../rc/sys/osx/$BUNDLE_NAME.app" . 14 cp -r "$SCRIPT_DIR/../../rc/sys/osx/$BUNDLE_NAME.app" .
10 15
11 mkdir -p "$BUNDLE_NAME.app/Contents/MacOS" 16 mkdir -p "$BUNDLE_NAME.app/Contents/MacOS"
12 cp ".libs/minori" "$BUNDLE_NAME.app/Contents/MacOS/minori" 17 cp ".libs/minori" "$BUNDLE_NAME.app/Contents/MacOS/minori"
13 18
14 mkdir -p "$BUNDLE_NAME.app/Contents/Frameworks" 19 mkdir -p "$BUNDLE_NAME.app/Contents/Frameworks"
15 for i in animia pugixml anitomy; do 20 for i in animone pugixml anitomy; do
16 cp "dep/$i/.libs/lib$i.0.dylib" "$BUNDLE_NAME.app/Contents/Frameworks" 21 cp "dep/$i/.libs/lib$i.0.dylib" "$BUNDLE_NAME.app/Contents/Frameworks"
17 install_name_tool -change "/usr/local/lib/lib$i.0.dylib" "@executable_path/../Frameworks/lib$i.0.dylib" "$BUNDLE_NAME.app/Contents/MacOS/minori" 22 install_name_tool -change "/usr/local/lib/lib$i.0.dylib" "@executable_path/../Frameworks/lib$i.0.dylib" "$BUNDLE_NAME.app/Contents/MacOS/minori"
18 done 23 done
19 24
20 macdeployqt "$BUNDLE_NAME.app" 25 macdeployqt "$BUNDLE_NAME.app"
26 if $FRAMEWORK_MODE; then
27 for i in QtCore QtGui QtWidgets; do
28 install_name_tool -id @executable_path/../Frameworks/$i.framework/Versions/5/$i $BUNDLE_NAME.app/Contents/Frameworks/$i.framework/Versions/5/$i
29 install_name_tool -change @rpath/$i.framework/Versions/5/$i @executable_path/../Frameworks/$i.framework/Versions/5/$i $BUNDLE_NAME.app/Contents/MacOS/minori
30 done
31 fi