Commit 1b392326 authored by nanahira's avatar nanahira

test macos

parent 3fbf6a87
stages: stages:
- prepare - prepare
- build - build
- sign
- pack - pack
- deploy - deploy
...@@ -50,21 +51,21 @@ mat_linux: ...@@ -50,21 +51,21 @@ mat_linux:
- premake5 - premake5
- irrlicht_linux - irrlicht_linux
mat_mac: mat_macos:
stage: prepare stage: prepare
tags: tags:
- linux - linux
script: script:
- apt update; apt -y install wget tar - apt update; apt -y install wget tar
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-alpha12-macosx.tar.gz | tar zfx - - wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-alpha12-macosx.tar.gz | tar zfx -
- mkdir irrlicht_mac - mkdir irrlicht
- cd irrlicht_mac - cd irrlicht
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/irrlicht-mycard-mac.tar.gz | tar zfx - - wget -O - https://cdn01.moecube.com/ygopro-build-materials/irrlicht-mycard-mac.tar.gz | tar zfx -
- cd .. - cd ..
artifacts: artifacts:
paths: paths:
- premake5 - premake5
- irrlicht_mac - irrlicht
mat_windows: mat_windows:
stage: prepare stage: prepare
...@@ -150,6 +151,50 @@ exec_linux: ...@@ -150,6 +151,50 @@ exec_linux:
- ygopro - ygopro
- libIrrKlang.so - libIrrKlang.so
exec_macos:
stage: build
tags:
- macos
dependencies:
- mat_irrklang
- mat_macos
cache:
paths:
- bin/
- obj/
script:
- brew install freetype libevent sqlite dylibbundler
- ./premake5 gmake --cc=clang
- cd build
- make config=release -j4
- cd ..
- mkdir -p ygopro.app/Contents/MacOS;
- mv bin/release/ygopro ygopro.app/Contents/MacOS;
- dylibbundler -x ygopro.app/Contents/MacOS/ygopro -b -d ygopro.app/Contents/Frameworks/ -p @executable_path/../Frameworks/ -cd;
- strip ygopro.app/Contents/MacOS/ygopro; mkdir ygopro.app/Contents/Resources;
- mv premake/gframe/ygopro.icns ygopro.app/Contents/Resources/Icon.icns;
- defaults write "$PWD/ygopro.app/Contents/Info.plist" "CFBundleIconFile" "Icon.icns";
- defaults write "$PWD/ygopro.app/Contents/Info.plist" "CFBundleIdentifier" "moe.mycard.ygopro";
artifacts:
paths:
- ygopro.app
exec_macos_sign:
stage: sign
tags:
- macos
dependencies:
- exec_macos
script:
- codesign --deep --sign "$(security find-identity -v -p codesigning $MACOS_KEYCHAIN_NAME | head -1 | grep -o '".*"' | tr -d '"')" ygopro.app
artifacts:
paths:
- ygopro.app
only:
- tags
- gitlabci
assets: assets:
stage: prepare stage: prepare
tags: tags:
...@@ -337,13 +382,53 @@ pack_linux_en-US: ...@@ -337,13 +382,53 @@ pack_linux_en-US:
- tags - tags
- gitlabci - gitlabci
pack_macos_zh-CN:
stage: pack
tags:
- linux
dependencies:
- assets
- assets_nonwindows
- exec_macos_sign
- assets_zh-CN
script: ./.ci/pack-macos.sh
variables:
TARGET_LOCALE: zh-CN
artifacts:
paths:
- dist
only:
- tags
- gitlabci
pack_macos_en-US:
stage: pack
tags:
- linux
dependencies:
- assets
- assets_nonwindows
- exec_macos_sign
- assets_en-US
script: ./.ci/pack-macos.sh
variables:
TARGET_LOCALE: en-US
artifacts:
paths:
- dist
only:
- tags
- gitlabci
upload_to_minio: upload_to_minio:
stage: deploy stage: deploy
dependencies: dependencies:
- pack_windows_zh-CN - pack_windows_zh-CN
- pack_linux_zh-CN - pack_linux_zh-CN
- pack_macos_zh-CN
- pack_windows_en-US - pack_windows_en-US
- pack_linux_en-US - pack_linux_en-US
- pack_macos_en-US
tags: tags:
- linux - linux
image: python image: python
......
...@@ -46,7 +46,7 @@ before_install: ...@@ -46,7 +46,7 @@ before_install:
cp premake/lua/premake4.lua lua/; cp premake/lua/premake4.lua lua/;
fi fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir irrlicht ; cd irrlicht ; curl --retry 5 --location https://github.com/moecube/irrlicht/releases/download/test/irrlicht-mycard-mac.tar.gz | tar zfx - ; cp libIrrlicht.a /usr/local/lib/ ; sudo cp -r include /usr/local/include/irrlicht ; cd .. ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir irrlicht ; cd irrlicht ; curl --retry 5 --location https://github.com/moecube/irrlicht/releases/download/test/irrlicht-mycard-mac.tar.gz | tar zfx - ; cd .. ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl --retry 5 --location https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-macosx.tar.gz | tar zfx -; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl --retry 5 --location https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-macosx.tar.gz | tar zfx -; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl --retry 5 --location https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz | tar zfx - ; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl --retry 5 --location https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz | tar zfx - ; fi
......
...@@ -55,6 +55,8 @@ project "ygopro" ...@@ -55,6 +55,8 @@ project "ygopro"
end end
configuration "macosx" configuration "macosx"
links { "lua" } links { "lua" }
includedirs { "../irrlicht/include" }
libdirs { "../irrlicht" }
if USE_IRRKLANG then if USE_IRRKLANG then
links { "irrklang" } links { "irrklang" }
libdirs { "../irrklang/bin/macosx-gcc" } libdirs { "../irrklang/bin/macosx-gcc" }
......
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