From 30b347887335ea49b94c7150b8e6db148ba3aba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Tue, 1 Oct 2024 12:00:43 -0300 Subject: [PATCH] macOS nightly more WIP. --- projects/macos/ecode/build.app.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/projects/macos/ecode/build.app.sh b/projects/macos/ecode/build.app.sh index 1fe2fcf46..c1d246f8d 100755 --- a/projects/macos/ecode/build.app.sh +++ b/projects/macos/ecode/build.app.sh @@ -22,6 +22,7 @@ done SDL2_CONFIG=$(which sdl2-config) CONFIG_NAME= +ARCH_PATH if command -v premake4 &> /dev/null then @@ -29,13 +30,14 @@ then elif command -v premake5 &> /dev/null then CONFIG_NAME=release_arm64 + ARCH_PATH="arm64/" else echo "Neither premake5 nor premake4 is available. Please install one." exit 1 fi rm -rf ../../../libs/macosx -if [ -z $SDL2_CONFIG ]; then +if [ -z "$SDL2_CONFIG" ]; then echo "Building using frameworks" ../make.sh config=$CONFIG_NAME ecode || exit else @@ -63,10 +65,10 @@ fi cat Info.plist.tpl | sed "s/ECODE_VERSION/${ECODE_VERSION}/g" | sed "s/ECODE_MAJOR_VERSION/${ECODE_MAJOR_VERSION}/g" | sed "s/ECODE_MINOR_VERSION/${ECODE_MINOR_VERSION}/g" > Info.plist cp Info.plist ecode.app/Contents/ rm Info.plist -cp ../../../libs/macosx/libeepp.dylib ecode.app/Contents/MacOS +cp ../../../libs/macosx"$ARCH_PATH"/libeepp.dylib ecode.app/Contents/MacOS cp ../../../bin/ecode ecode.app/Contents/MacOS -if [ -z $SDL2_CONFIG ]; then +if [ -z "$SDL2_CONFIG" ]; then SDL2_LIB_PATH="/Library/SDL2.framework/Versions/A/" cp "$SDL2_LIB_PATH/SDL2" ecode.app/Contents/MacOS/SDL2 install_name_tool -change @rpath/SDL2.framework/Versions/A/SDL2 @executable_path/SDL2 ecode.app/Contents/MacOS/libeepp.dylib @@ -74,9 +76,9 @@ codesign --force -s - ecode.app/Contents/MacOS/SDL2 install_name_tool -change @rpath/libeepp.dylib @executable_path/libeepp.dylib ecode.app/Contents/MacOS/ecode else SDL2_LIB_PATH=$(sdl2-config --libs | awk '{ print $1 }' | cut -b 3-) -cp $SDL2_LIB_PATH/libSDL2-2.0.0.dylib ecode.app/Contents/MacOS +cp "$SDL2_LIB_PATH"/libSDL2-2.0.0.dylib ecode.app/Contents/MacOS SDL2_LIB_REAL_PATH=$(otool -L ecode.app/Contents/MacOS/libeepp.dylib | grep libSDL2 | awk '{ print $1 }') -install_name_tool -change $SDL2_LIB_REAL_PATH @executable_path/libSDL2-2.0.0.dylib ecode.app/Contents/MacOS/libeepp.dylib +install_name_tool -change "$SDL2_LIB_REAL_PATH" @executable_path/libSDL2-2.0.0.dylib ecode.app/Contents/MacOS/libeepp.dylib install_name_tool -change libeepp.dylib @executable_path/libeepp.dylib ecode.app/Contents/MacOS/ecode fi