mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-19 03:53:57 +03:00
Fix macOS packaging issue.
This commit is contained in:
@@ -894,6 +894,8 @@ end
|
||||
function set_macos_and_ios_config()
|
||||
if os.is_real("macosx") and ( is_xcode() or _OPTIONS["use-frameworks"] ) then
|
||||
libdirs { "/System/Library/Frameworks", "/Library/Frameworks" }
|
||||
elseif os.is_real("macosx") then
|
||||
libdirs { "/opt/homebrew/lib" }
|
||||
end
|
||||
|
||||
if _OPTIONS["use-frameworks"] then
|
||||
|
||||
@@ -693,6 +693,9 @@ function build_eepp( build_name )
|
||||
filter { "system:macosx", "action:xcode* or options:use-frameworks" }
|
||||
libdirs { "/System/Library/Frameworks", "/Library/Frameworks" }
|
||||
|
||||
filter { "system:macosx", "not action:xcode*", "not options:use-frameworks" }
|
||||
libdirs { "/opt/homebrew/lib" }
|
||||
|
||||
filter "system:windows"
|
||||
files { "src/eepp/system/platform/win/*.cpp" }
|
||||
files { "src/eepp/network/platform/win/*.cpp" }
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
SDL2_CONFIG=$(which sdl2-config)
|
||||
rm -rf ../../../libs/macosx
|
||||
if [ -z $SDL2_CONFIG ]; then
|
||||
echo "Building using frameworks"
|
||||
../make.sh config=release ecode || exit
|
||||
@@ -34,7 +35,8 @@ install_name_tool -change @rpath/libeepp.dylib @executable_path/libeepp.dylib ec
|
||||
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
|
||||
install_name_tool -change $SDL2_LIB_PATH/libSDL2-2.0.0.dylib @executable_path/libSDL2-2.0.0.dylib ecode.app/Contents/MacOS/libeepp.dylib
|
||||
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 libeepp.dylib @executable_path/libeepp.dylib ecode.app/Contents/MacOS/ecode
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user