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.
This commit is contained in:
2022-06-30 20:01:09 -04:00
parent e77a0743a7
commit ee5e7fd48c
4 changed files with 127 additions and 45 deletions

View File

@@ -10,12 +10,20 @@ echo Fixing boost dylib install names...
EXEPATH=@executable_path/../Frameworks
BOEPATH="$BUILT_PRODUCTS_DIR/$EXECUTABLE_PATH"
BFSPATH="$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH/libboost_filesystem.dylib"
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 libboost_system.dylib "$EXEPATH/libboost_system.dylib" "$BOEPATH"
install_name_tool -change libboost_filesystem.dylib "$EXEPATH/libboost_filesystem.dylib" "$BOEPATH"
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 -change libboost_system.dylib "$EXEPATH/libboost_system.dylib" "$BFSPATH"
install_name_tool -id "$SYSPATH" $SYSPATH
install_name_tool -id "$FSPATH" $FSPATH
install_name_tool -change "$SYSPATH" "$EXEPATH/libboost_system-mt.dylib" $FSPATH