mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Fix macOS cross build script.
premake5 project now saves lib files in a arch subfolder.
This commit is contained in:
@@ -11,7 +11,7 @@ rm -rf ./ecode.app
|
||||
mkdir -p ecode.app/assets
|
||||
mkdir -p ecode.app/lib
|
||||
cp ../../../bin/assets/icon/ecode.png ecode.app/ecode.png
|
||||
cp ../../../libs/haiku/libeepp.so ecode.app/lib/
|
||||
cp ../../../libs/haiku/x86_64/libeepp.so ecode.app/lib/
|
||||
cp ../../../bin/ecode ecode.app/
|
||||
cp -L /boot/system/lib/libSDL2-2.0.so.0 ecode.app/lib/
|
||||
strip ecode.app/lib/libSDL2-2.0.so.0
|
||||
|
||||
@@ -7,7 +7,7 @@ else
|
||||
echo "Building using sdl2-config"
|
||||
../make_no_fw.sh config=release ecode || exit
|
||||
fi
|
||||
|
||||
ARCH=$(uname -m)
|
||||
rm -rf ./ecode.app
|
||||
mkdir -p ecode.app/Contents/MacOS/
|
||||
mkdir -p ecode.app/Contents/Resources/
|
||||
@@ -30,13 +30,14 @@ 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
|
||||
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
|
||||
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
|
||||
install_name_tool -change libeepp.dylib @executable_path/libeepp.dylib ecode.app/Contents/MacOS/ecode
|
||||
fi
|
||||
|
||||
install_name_tool -change libeepp.dylib @executable_path/libeepp.dylib ecode.app/Contents/MacOS/ecode
|
||||
#cp -r ../../../bin/assets ecode.app/Contents/MacOS/assets
|
||||
mkdir -p ecode.app/Contents/MacOS/assets/colorschemes
|
||||
cp -r ../../../bin/assets/colorschemes/ ecode.app/Contents/MacOS/assets/colorschemes/
|
||||
|
||||
@@ -15,13 +15,13 @@ cp Info.plist ecode.app/Contents/
|
||||
rm Info.plist
|
||||
chmod +x run.sh
|
||||
cp run.sh ecode.app/Contents/MacOS
|
||||
cp ../../../libs/macosx/libeepp.dylib ecode.app/Contents/MacOS
|
||||
cp ../../../libs/macosx/arm64/libeepp.dylib ecode.app/Contents/MacOS
|
||||
cp ../../../bin/ecode ecode.app/Contents/MacOS
|
||||
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
|
||||
codesign --force -s - ecode.app/Contents/MacOS/SDL2
|
||||
install_name_tool -change libeepp.dylib @executable_path/libeepp.dylib ecode.app/Contents/MacOS/ecode
|
||||
install_name_tool -change @rpath/libeepp.dylib @executable_path/libeepp.dylib ecode.app/Contents/MacOS/ecode
|
||||
#cp -r ../../../bin/assets ecode.app/Contents/MacOS/assets
|
||||
mkdir -p ecode.app/Contents/MacOS/assets/colorschemes
|
||||
cp -r ../../../bin/assets/colorschemes/ ecode.app/Contents/MacOS/assets/colorschemes/
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
cd "$(dirname "$0")" || exit
|
||||
|
||||
ARCH=32
|
||||
ARCHI=x86
|
||||
for i in "$@"; do
|
||||
case $i in
|
||||
config=*)
|
||||
@@ -15,6 +16,7 @@ done
|
||||
|
||||
if [[ "$CONFIG" == *"x86_64"* ]]; then
|
||||
ARCH=64
|
||||
ARCHI=x86_64
|
||||
fi
|
||||
|
||||
premake5 --file=../../premake5.lua --os=windows --cc=mingw --with-mojoal --windows-mingw-build gmake2
|
||||
@@ -23,13 +25,13 @@ cd ../../make/windows/ || exit
|
||||
mingw"$ARCH"-make "$@"
|
||||
|
||||
case "$OSTYPE" in
|
||||
darwin*|linux*|freebsd*)
|
||||
darwin*|linux*|freebsd*)
|
||||
cd ../../bin/ || exit
|
||||
ln -sf ../libs/windows/eepp.dll eepp.dll
|
||||
ln -sf ../libs/windows/eepp-debug.dll eepp-debug.dll
|
||||
ln -sf ../libs/windows/$ARCHI/eepp.dll eepp.dll
|
||||
ln -sf ../libs/windows/$ARCHI/eepp-debug.dll eepp-debug.dll
|
||||
;;
|
||||
cygwin*|win*)
|
||||
cd ../../libs/windows/ || exit
|
||||
cd ../../libs/windows/$ARCHI || exit
|
||||
|
||||
if [ -f eepp.dll ]; then
|
||||
cp -f eepp.dll ../../bin/eepp.dll
|
||||
|
||||
Reference in New Issue
Block a user