Commit e0b50dcd authored by nanahira's avatar nanahira

Merge branch 'master' into server

parents b76ddf6c e8f14d9e
#!/bin/bash
set -x
set -o errexit
# ygopro-database
apt update && apt -y install wget git p7zip-full
git clone --depth=1 https://code.mycard.moe/nanahira/ygopro-database
cp -rf ./ygopro-database/locales/$TARGET_LOCALE/* .
# ygopro-images
wget -O ygopro-images.zip https://cdn01.moecube.com/images/ygopro-images-${TARGET_LOCALE}.zip
7z x -y -opics ygopro-images.zip
#!/bin/bash
set -x
set -o errexit
# TARGET_LOCALE
apt update && apt -y install tar git
git submodule update --init
mkdir dist replay
tar -zcf dist/KoishiPro-$CI_COMMIT_REF_NAME-linux-$TARGET_LOCALE.tar.gz --exclude='.git*' ygopro LICENSE README.md libIrrKlang.so lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound windbot bot bot.conf locales fonts
#!/bin/bash
set -x
set -o errexit
# TARGET_LOCALE
apt update && apt -y install tar git
git submodule update --init
mkdir dist replay
tar -zcf dist/KoishiPro-$CI_COMMIT_REF_NAME-osx-$TARGET_LOCALE.tar.gz --exclude='.git*' ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound windbot bot bot.conf locales fonts
#!/bin/bash
set -x
set -o errexit
# TARGET_LOCALE
apt update && apt -y install p7zip-full git
git submodule update --init
mkdir dist replay
ARCHIVE_FILES=(ygopro.exe LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound bot.conf Bot.exe WindBot locales fonts)
if [[ "$TARGET_LOCALE" == "zh-CN" ]]; then
ARCHIVE_FILES=("${ARCHIVE_FILES[@]}" update-koishipro)
fi
7z a -mx9 -xr!.git* dist/KoishiPro-$CI_COMMIT_REF_NAME-win32-$TARGET_LOCALE.7z "${ARCHIVE_FILES[@]}"
#!/bin/bash
set -x
set -o errexit
echo "$MACOS_CERTIFICATE" | base64 --decode --output cert.p12
security create-keychain -p "$MACOS_KEYCHAIN_PASSWORD" "$MACOS_KEYCHAIN_NAME" || true
security list-keychains -s login.keychain "$MACOS_KEYCHAIN_NAME"
security default-keychain -s "$MACOS_KEYCHAIN_NAME"
security unlock-keychain -p "$MACOS_KEYCHAIN_PASSWORD" "$MACOS_KEYCHAIN_NAME"
security import cert.p12 -P "$MACOS_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k "$MACOS_KEYCHAIN_PASSWORD" "$MACOS_KEYCHAIN_NAME";
CERT_IDENTITY_NAME=$(security find-identity -v -p codesigning $MACOS_KEYCHAIN_NAME | head -1 | grep -o '".*"' | tr -d '"')
/usr/bin/codesign --deep --sign "$CERT_IDENTITY_NAME" ygopro.app
security lock-keychain "$MACOS_KEYCHAIN_NAME"
stages:
- prepare
- build
- sign
- pack
- deploy
variables:
GIT_DEPTH: "1"
#USE_IRRKLANG: "1"
mat_lua:
stage: prepare
tags:
- linux
script:
- apt update; apt -y install wget tar
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/lua-5.3.5.tar.gz | tar zfx -
- mv lua-5.3.5/src lua
- cp premake/lua/premake4.lua lua/;
artifacts:
paths:
- lua
mat_linux:
stage: prepare
tags:
- linux
script:
- apt update; apt -y install git wget tar
#- git clone --depth=1 https://code.mycard.moe/mycard/irrlicht irrlicht_linux
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-alpha14-linux.tar.gz | tar zfx -
artifacts:
paths:
- premake5
#- irrlicht_linux
mat_windows:
stage: prepare
tags:
- linux
script:
- apt update; apt -y install wget tar patch p7zip-full
# premake5.exe
- wget https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-alpha14-windows.zip
- 7z x -y premake-5.0.0-alpha14-windows.zip
# event
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/libevent-2.0.22-stable.tar.gz | tar zfx -
- mv libevent-2.0.22-stable event ; cp -rf event/WIN32-Code/* event/include
# sqlite3
- wget https://cdn01.moecube.com/ygopro-build-materials/sqlite-amalgamation-3310100.zip
- 7z x -y sqlite-amalgamation-3310100.zip
- mv sqlite-amalgamation-3310100 sqlite3
artifacts:
paths:
- premake5.exe
- event
- sqlite3
exec_windows:
stage: build
tags:
- vs
dependencies:
- mat_lua
- mat_windows
#variables:
# irrklang_pro: '1'
cache:
paths:
- bin/
- obj/
script:
- git submodule update --init
- bash -c 'cp -rf premake/* .'
#- cmd /C "patch -p0 < irrlicht\irrlicht.patch"
- '.\premake5.exe vs2019'
- cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" build\ygo.sln /m /p:Configuration=Release'
- copy bin\release\ygopro.exe .
artifacts:
paths:
- ygopro.exe
exec_linux:
stage: build
tags:
- linux
dependencies:
- mat_irrklang
- mat_linux
cache:
paths:
- bin/
- obj/
script:
- apt update; apt -y install git build-essential libevent-dev libsqlite3-dev liblua5.3-dev
- git submodule update --init
- ./premake5 gmake
- cd build
- make config=release -j$(nproc)
- cd ..
- mv bin/release/ygopro .
- strip ygopro
artifacts:
paths:
- ygopro
#win_server_pack:
# stage: pack
# dependencies:
# - exec_windows
# tags:
# - linux
# script:
# - apt update; apt -y install p7zip-full wget
# - wget https://nodejs.org/dist/v14.17.0/node-v14.17.0-win-x64.7z
upload_to_minio:
stage: deploy
dependencies:
- exec_windows
tags:
- linux
image: python
script:
- pip install -U -i https://mirrors.aliyun.com/pypi/simple/ awscli
- aws s3 --endpoint=https://minio.mycard.moe:9000 cp ygopro.exe s3://mycard/koishipro/server/ygopro.exe
only:
- server
...@@ -1617,7 +1617,7 @@ void Game::LoadConfig() { ...@@ -1617,7 +1617,7 @@ void Game::LoadConfig() {
*/ */
#endif #endif
#ifndef YGOPRO_COMPAT_MYCARD #ifndef YGOPRO_COMPAT_MYCARD
SaveConfig(); //SaveConfig();
#endif #endif
} }
} }
......
Subproject commit 293e533c28e4f1870444f6071643b81e1c28e639 Subproject commit 53052e1e1e2bfcc77146dc451da24ad585e24baf
...@@ -33,9 +33,9 @@ end ...@@ -33,9 +33,9 @@ end
libdirs { "/usr/local/lib" } libdirs { "/usr/local/lib" }
configuration "macosx" configuration "macosx"
defines { "LUA_USE_MACOSX", "DBL_MAX_10_EXP=+308", "DBL_MANT_DIG=53" } defines { "LUA_USE_MACOSX", "DBL_MAX_10_EXP=+308", "DBL_MANT_DIG=53", "GL_SILENCE_DEPRECATION" }
includedirs { "/usr/local/include", "/usr/local/include/*" } includedirs { "/usr/local/include/event2", "/usr/local/include/freetype2", "/usr/local/opt/sqlite3/include" }
libdirs { "/usr/local/lib", "/usr/X11/lib" } libdirs { "/usr/local/lib", "/usr/local/opt/sqlite3/lib" }
buildoptions { "-stdlib=libc++" } buildoptions { "-stdlib=libc++" }
links { "OpenGL.framework", "Cocoa.framework", "IOKit.framework" } links { "OpenGL.framework", "Cocoa.framework", "IOKit.framework" }
...@@ -54,9 +54,7 @@ end ...@@ -54,9 +54,7 @@ end
configuration { "Release", "vs*" } configuration { "Release", "vs*" }
optimize "Speed" optimize "Speed"
flags { "LinkTimeOptimization" } flags { "LinkTimeOptimization" }
if not os.ishost("macosx") then
staticruntime "On" staticruntime "On"
end
disablewarnings { "4244", "4267", "4838", "4577", "4819", "4018", "4996", "4477", "4091", "4828", "4800" } disablewarnings { "4244", "4267", "4838", "4577", "4819", "4018", "4996", "4477", "4091", "4828", "4800" }
configuration { "Release", "not vs*" } configuration { "Release", "not vs*" }
......
Subproject commit adeaf7f471ecd2aefd88dc895ed2f1d09dafc3c2 Subproject commit 7b721c6472ec5adfbfb3ef14c952bf02a1cd5f35
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