Commit a0b9c39f authored by nanahira's avatar nanahira

the m1mac

parent a4537fed
#!/bin/bash
set -x
set -o errexit
TARGET_YGOPRO_BINARY_PATH=./ygopro-platforms/ygopro-platform-$TARGET_PATFORM
export YGOPRO_LIBEVENT_STATIC_PATH=$PWD/libevent-stable
git submodule update --init
./premake5 gmake --cc=clang
cd build
make config=release -j4
cd ..
mkdir ygopro-platforms
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
strip $TARGET_YGOPRO_BINARY_PATH
stages: stages:
- prepare - prepare
- build - build
- sign - combine
- pack - pack
- deploy - deploy
variables: variables:
GIT_DEPTH: "1" GIT_DEPTH: "1"
USE_IRRKLANG: "1"
mat_common: mat_common:
stage: prepare stage: prepare
...@@ -61,7 +60,7 @@ mat_linux: ...@@ -61,7 +60,7 @@ mat_linux:
- irrlicht_linux - irrlicht_linux
- libevent-stable - libevent-stable
mat_macos_libevent: mat_macos_platform_x86:
stage: prepare stage: prepare
tags: tags:
- macos - macos
...@@ -72,6 +71,28 @@ mat_macos_libevent: ...@@ -72,6 +71,28 @@ mat_macos_libevent:
paths: paths:
- libevent-stable - libevent-stable
mat_macos_platform_m1:
stage: prepare
tags:
- linux
script:
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/libevent-m1mac.tar.gz | tar zfx -
artifacts:
paths:
- libevent-stable
mat_macos_irrklang_patched:
stage: build
tags:
- linux
dependencies: []
script:
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/libirrklang-patched-dylib.tar.gz | tar zfx -
artifacts:
paths:
- libirrklang-patched.dylib
mat_macos: mat_macos:
stage: prepare stage: prepare
tags: tags:
...@@ -124,6 +145,7 @@ exec_windows: ...@@ -124,6 +145,7 @@ exec_windows:
- mat_windows - mat_windows
variables: variables:
irrklang_pro: '1' irrklang_pro: '1'
USE_IRRKLANG: "1"
cache: cache:
paths: paths:
- bin/ - bin/
...@@ -145,6 +167,7 @@ exec_linux: ...@@ -145,6 +167,7 @@ exec_linux:
- linux - linux
variables: variables:
YGOPRO_BUILD_ALL: '1' YGOPRO_BUILD_ALL: '1'
USE_IRRKLANG: "1"
dependencies: dependencies:
- mat_common - mat_common
- mat_irrklang - mat_irrklang
...@@ -169,7 +192,7 @@ exec_linux: ...@@ -169,7 +192,7 @@ exec_linux:
- ygopro - ygopro
- lib - lib
exec_macos: exec_macos_platform_x86:
stage: build stage: build
tags: tags:
- macos - macos
...@@ -177,26 +200,56 @@ exec_macos: ...@@ -177,26 +200,56 @@ exec_macos:
- mat_irrklang - mat_irrklang
- mat_macos - mat_macos
- mat_common - mat_common
- mat_macos_libevent - mat_macos_platform_x86
variables:
USE_IRRKLANG: "1"
TARGET_PATFORM: x86
cache: cache:
paths: paths:
- bin/ - bin/
- obj/ - obj/
script: script:
- git submodule update --init - ./.ci/exec-macos-platform.sh
- brew install dylibbundler - install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib ./ygopro-platforms/ygopro-platform-$TARGET_PATFORM
- sudo cp -rf irrklang/bin/macosx-gcc/libirrklang.dylib /usr/local/lib/ artifacts:
#- sudo cp -rf irrklang/include /usr/local/include/irrklang paths:
- env YGOPRO_LIBEVENT_STATIC_PATH=$PWD/libevent-stable ./premake5 gmake --cc=clang - ygopro-platforms
- cd build
- make config=release -j4 exec_macos_platform_m1:
- cd .. stage: build
tags:
- macos
dependencies:
- mat_macos
- mat_common
- mat_macos_platform_m1
variables:
TARGET_PATFORM: m1
YGOPRO_TARGET_ARM: '1'
cache:
paths:
- bin/
- obj/
script: ./.ci/exec-macos-platform.sh
artifacts:
paths:
- ygopro-platforms
exec_macos:
stage: combine
tags:
- macos
dependencies:
- exec_macos_platform_x86
- exec_macos_platform_m1
- mat_macos_irrklang_patched
script:
- mkdir -p ygopro.app/Contents/MacOS ygopro.app/Contents/Frameworks; - mkdir -p ygopro.app/Contents/MacOS ygopro.app/Contents/Frameworks;
- mv bin/release/ygopro.app ygopro.app/Contents/MacOS/ygopro; - mv bin/release/ygopro.app ygopro.app/Contents/MacOS/ygopro;
# do some special things for irrklang # do some special things for irrklang
- mv ./libirrklang-patched.dylib ygopro.app/Contents/Frameworks/libirrklang.dylib - mv ./libirrklang-patched.dylib ygopro.app/Contents/Frameworks/libirrklang.dylib
- install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib ygopro.app/Contents/MacOS/ygopro #- install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib ygopro.app/Contents/MacOS/ygopro
- dylibbundler -x ygopro.app/Contents/MacOS/ygopro -b -d ygopro.app/Contents/Frameworks/ -p @executable_path/../Frameworks/ -cd -i @executable_path/../Frameworks; #- dylibbundler -x ygopro.app/Contents/MacOS/ygopro -b -d ygopro.app/Contents/Frameworks/ -p @executable_path/../Frameworks/ -cd -i @executable_path/../Frameworks;
- strip ygopro.app/Contents/MacOS/ygopro; - strip ygopro.app/Contents/MacOS/ygopro;
- mkdir ygopro.app/Contents/Resources; - mkdir ygopro.app/Contents/Resources;
- mv premake/gframe/ygopro.icns ygopro.app/Contents/Resources/Icon.icns; - mv premake/gframe/ygopro.icns ygopro.app/Contents/Resources/Icon.icns;
......
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