Mercurial > minori
diff 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 |
line wrap: on
line diff
--- a/scripts/osx/deploy_build.sh Thu Apr 18 16:51:35 2024 -0400 +++ b/scripts/osx/deploy_build.sh Thu Apr 18 16:53:17 2024 -0400 @@ -4,6 +4,11 @@ # run this in your build dir to get a usable app bundle SCRIPT_DIR=$(dirname -- "$0") +FRAMEWORK_MODE=false +if test "x$1x" = "x--frameworksx"; then + echo "framework mode enabled" + FRAMEWORK_MODE=true +fi BUNDLE_NAME="Minori" cp -r "$SCRIPT_DIR/../../rc/sys/osx/$BUNDLE_NAME.app" . @@ -12,9 +17,15 @@ cp ".libs/minori" "$BUNDLE_NAME.app/Contents/MacOS/minori" mkdir -p "$BUNDLE_NAME.app/Contents/Frameworks" -for i in animia pugixml anitomy; do +for i in animone pugixml anitomy; do cp "dep/$i/.libs/lib$i.0.dylib" "$BUNDLE_NAME.app/Contents/Frameworks" install_name_tool -change "/usr/local/lib/lib$i.0.dylib" "@executable_path/../Frameworks/lib$i.0.dylib" "$BUNDLE_NAME.app/Contents/MacOS/minori" done macdeployqt "$BUNDLE_NAME.app" +if $FRAMEWORK_MODE; then + for i in QtCore QtGui QtWidgets; do + install_name_tool -id @executable_path/../Frameworks/$i.framework/Versions/5/$i $BUNDLE_NAME.app/Contents/Frameworks/$i.framework/Versions/5/$i + install_name_tool -change @rpath/$i.framework/Versions/5/$i @executable_path/../Frameworks/$i.framework/Versions/5/$i $BUNDLE_NAME.app/Contents/MacOS/minori + done +fi