Commit fb06abe7 authored by nanahira's avatar nanahira

build ikpmp3 as default and fix m1 things

parent 02a747d3
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
set -x set -x
set -o errexit set -o errexit
TARGET_YGOPRO_BINARY_PATH=./ygopro-platforms/ygopro-platform-$TARGET_PATFORM TARGET_YGOPRO_BINARY_PATH=./ygopro-platforms/ygopro-platform-$TARGET_PLATFORM
export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include
export EVENT_LIB_DIR=$PWD/libevent-stable/lib export EVENT_LIB_DIR=$PWD/libevent-stable/lib
export IRRLICHT_INCLUDE_DIR=$PWD/irrlicht/include export IRRLICHT_INCLUDE_DIR=$PWD/irrlicht/include
...@@ -10,7 +10,12 @@ export IRRLICHT_LIB_DIR=$PWD/irrlicht ...@@ -10,7 +10,12 @@ export IRRLICHT_LIB_DIR=$PWD/irrlicht
git submodule update --init git submodule update --init
./premake5 gmake --cc=clang --build-freetype --build-sqlite if [[ $TARGET_PLATFORM == "x86" ]]; then
./premake5 gmake --cc=clang --build-freetype --build-sqlite --build-ikpmp3
else
./premake5 gmake --cc=clang --build-freetype --build-sqlite --no-use-irrklang
fi
cd build cd build
make config=release -j4 make config=release -j4
cd .. cd ..
...@@ -18,5 +23,8 @@ cd .. ...@@ -18,5 +23,8 @@ cd ..
mkdir ygopro-platforms mkdir ygopro-platforms
mv bin/release/YGOPro.app $TARGET_YGOPRO_BINARY_PATH mv bin/release/YGOPro.app $TARGET_YGOPRO_BINARY_PATH
install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib $TARGET_YGOPRO_BINARY_PATH if [[ $TARGET_PLATFORM == "x86" ]]; then
install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib $TARGET_YGOPRO_BINARY_PATH
fi
strip $TARGET_YGOPRO_BINARY_PATH strip $TARGET_YGOPRO_BINARY_PATH
...@@ -173,10 +173,10 @@ exec_linux: ...@@ -173,10 +173,10 @@ exec_linux:
- git submodule update --init - git submodule update --init
- mkdir lib - mkdir lib
- cp -rf irrklang/bin/linux-gcc-64/libIrrKlang.so ./lib/ - cp -rf irrklang/bin/linux-gcc-64/libIrrKlang.so ./lib/
- cp -rf irrklang/bin/linux-gcc-64/ikpMP3.so ./lib/ # - cp -rf irrklang/bin/linux-gcc-64/ikpMP3.so ./lib/
- export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include - export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include
- export EVENT_LIB_DIR=$PWD/libevent-stable/lib - export EVENT_LIB_DIR=$PWD/libevent-stable/lib
- ./premake5 gmake --build-freetype --build-sqlite --build-irrlicht - ./premake5 gmake --build-freetype --build-sqlite --build-irrlicht --build-ikpmp3 --irrklang-pro
- cd build - cd build
- make config=release -j$(nproc) - make config=release -j$(nproc)
- cd .. - cd ..
...@@ -197,7 +197,7 @@ exec_macos_platform_x86: ...@@ -197,7 +197,7 @@ exec_macos_platform_x86:
- mat_common - mat_common
- mat_macos_platform_x86 - mat_macos_platform_x86
variables: variables:
TARGET_PATFORM: x86 TARGET_PLATFORM: x86
cache: cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths: paths:
...@@ -205,7 +205,7 @@ exec_macos_platform_x86: ...@@ -205,7 +205,7 @@ exec_macos_platform_x86:
- obj/ - obj/
script: script:
- ./.ci/exec-macos-platform.sh - ./.ci/exec-macos-platform.sh
- install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib ./ygopro-platforms/ygopro-platform-$TARGET_PATFORM - install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib ./ygopro-platforms/ygopro-platform-$TARGET_PLATFORM
artifacts: artifacts:
paths: paths:
- ygopro-platforms - ygopro-platforms
...@@ -219,7 +219,7 @@ exec_macos_platform_m1: ...@@ -219,7 +219,7 @@ exec_macos_platform_m1:
- mat_common - mat_common
- mat_macos_platform_m1 - mat_macos_platform_m1
variables: variables:
TARGET_PATFORM: m1 TARGET_PLATFORM: m1
MAC_ARM: '1' MAC_ARM: '1'
NO_USE_IRRKLANG: '1' NO_USE_IRRKLANG: '1'
cache: cache:
......
...@@ -46,6 +46,7 @@ newoption { trigger = "irrklang-pro", category = "YGOPro - irrklang - pro", desc ...@@ -46,6 +46,7 @@ newoption { trigger = "irrklang-pro", category = "YGOPro - irrklang - pro", desc
newoption { trigger = "no-irrklang-pro", category = "YGOPro - irrklang - pro", description = "" } newoption { trigger = "no-irrklang-pro", category = "YGOPro - irrklang - pro", description = "" }
newoption { trigger = "irrklang-pro-release-lib-dir", category = "YGOPro - irrklang - pro", description = "", value = "PATH" } newoption { trigger = "irrklang-pro-release-lib-dir", category = "YGOPro - irrklang - pro", description = "", value = "PATH" }
newoption { trigger = "irrklang-pro-debug-lib-dir", category = "YGOPro - irrklang - pro", description = "", value = "PATH" } newoption { trigger = "irrklang-pro-debug-lib-dir", category = "YGOPro - irrklang - pro", description = "", value = "PATH" }
newoption { trigger = 'build-ikpmp3', category = "YGOPro - irrklang - ikpmp3", description = "", value = "PATH" }
newoption { trigger = "winxp-support", category = "YGOPro", description = "" } newoption { trigger = "winxp-support", category = "YGOPro", description = "" }
newoption { trigger = "mac-arm", category = "YGOPro", description = "M1" } newoption { trigger = "mac-arm", category = "YGOPro", description = "M1" }
...@@ -141,6 +142,8 @@ if IRRKLANG_PRO then ...@@ -141,6 +142,8 @@ if IRRKLANG_PRO then
IRRKLANG_PRO_DEBUG_LIB_DIR = GetParam("irrklang-pro-debug-lib-dir") or "../irrklang/lib/Win32-visualStudio-debug" IRRKLANG_PRO_DEBUG_LIB_DIR = GetParam("irrklang-pro-debug-lib-dir") or "../irrklang/lib/Win32-visualStudio-debug"
end end
BUILD_IKPMP3 = USE_IRRKLANG and (GetParam("build-ikpmp3") or IRRKLANG_PRO)
if GetParam("winxp-support") and os.istarget("windows") then if GetParam("winxp-support") and os.istarget("windows") then
WINXP_SUPPORT = true WINXP_SUPPORT = true
end end
...@@ -230,6 +233,6 @@ workspace "YGOPro" ...@@ -230,6 +233,6 @@ workspace "YGOPro"
if BUILD_SQLITE then if BUILD_SQLITE then
include "sqlite3" include "sqlite3"
end end
if USE_IRRKLANG and IRRKLANG_PRO then if BUILD_IKPMP3 then
include "ikpmp3" include "ikpmp3"
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment