Files
oboe/pkg/mac/fix_dylibs.sh
Celtic Minstrel ee5e7fd48c Various fixes to make the project build in Xcode 12 on Catalina
This now requires Boost to be installed by MacPorts. However, we could add the standard Homebrew path to the include path as well to support both.

This also requires SFML and its dependencies to be installed in /Library/Frameworks; it's unclear whether this is reasonable.

Code signing is completely disabled, and Zlib is now loaded as a tbd instead of a dylib. This will probably break for some older computers, but hopefully they can just use the Xcode 4 project instead.

Boost is forcing -mt suffixes on all its libraries. Whatever. We'll just roll with that.
This makes the script work both with and without the suffixes.

Using parentheses instead of braces silences the stupid narrowing warning, so yay.
2022-07-05 00:17:52 -04:00

30 lines
757 B
Bash
Executable File

#!/bin/sh
# fix_dylibs.sh
# BoE
#
# Created by Celtic Minstrel on 14-04-17.
#
echo Fixing boost dylib install names...
EXEPATH=@executable_path/../Frameworks
BOEPATH="$BUILT_PRODUCTS_DIR/$EXECUTABLE_PATH"
cd "$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH"
FSPATH=libboost_filesystem*.dylib
SYSPATH=libboost_system*.dylib
echo $FSPATH $SYSPATH
# Update references in the executable file
install_name_tool -change "$SYSPATH" "$EXEPATH/libboost_system.dylib" "$BOEPATH"
install_name_tool -change "$FSPATH" "$EXEPATH/libboost_filesystem.dylib" "$BOEPATH"
# Update references within Boost
install_name_tool -id "$SYSPATH" $SYSPATH
install_name_tool -id "$FSPATH" $FSPATH
install_name_tool -change "$SYSPATH" "$EXEPATH/libboost_system-mt.dylib" $FSPATH