Commit 301750a2 authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:Fluorohydride/ygopro into new-premake

parents ee767854 11c4309c
Pipeline #11718 failed
......@@ -2,18 +2,29 @@
set -x
set -o errexit
TARGET_YGOPRO_BINARY_PATH=./ygopro-platforms/ygopro-platform-$TARGET_ARCH
export YGOPRO_LIBEVENT_STATIC_PATH=$PWD/libevent-stable
TARGET_YGOPRO_BINARY_PATH=./ygopro-platforms/ygopro-platform-$TARGET_PLATFORM
export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include
export EVENT_LIB_DIR=$PWD/libevent-stable/lib
export IRRLICHT_INCLUDE_DIR=$PWD/irrlicht/include
export IRRLICHT_LIB_DIR=$PWD/irrlicht
git submodule update --init
./premake5 gmake --cc=clang
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
make config=release -j4
cd ..
mkdir ygopro-platforms
mv bin/release/ygopro.app $TARGET_YGOPRO_BINARY_PATH
mv bin/release/YGOPro.app $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
install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib $TARGET_YGOPRO_BINARY_PATH
strip $TARGET_YGOPRO_BINARY_PATH
......@@ -12,16 +12,15 @@ mat_common:
stage: prepare
tags:
- linux
script:
# lua
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/lua-5.3.5.tar.gz | tar zfx -
- mv lua-5.3.5/src lua
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/lua-5.3.6.tar.gz | tar zfx -
- mv lua-5.3.6 lua
# sqlite3
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/sqlite-autoconf-3360000.tar.gz | tar zfx -
- mv sqlite-autoconf-3360000 sqlite3
# freetype
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/freetype-2.10.4.tar.gz | tar zfx -
- mv freetype-2.10.4 freetype
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/freetype-2.11.1.tar.gz | tar zfx -
- mv freetype-2.11.1 freetype
# premake
- cp -rf premake/* .;
artifacts:
......@@ -52,7 +51,7 @@ mat_linux:
script:
- apt update; apt -y install git wget tar
- git clone --depth=1 https://code.mycard.moe/mycard/irrlicht-new irrlicht
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-alpha14-linux.tar.gz | tar zfx -
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-beta1-linux.tar.gz | tar zfx -
- env PROCESSOR_COUNT=$(nproc) ./.ci/libevent-prebuild.sh
artifacts:
paths:
......@@ -99,7 +98,7 @@ mat_macos:
- linux
script:
- apt update; apt -y install wget tar
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-alpha14-macosx.tar.gz | tar zfx -
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-beta1-macosx.tar.gz | tar zfx -
- mkdir irrlicht
- cd irrlicht
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/irrlicht-mycard-mac.tar.gz | tar zfx -
......@@ -116,11 +115,11 @@ mat_windows:
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
- wget https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-beta1-windows.zip
- 7z x -y premake-5.0.0-beta1-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
- mv libevent-2.0.22-stable event
# irrlicht
- git clone --depth=1 https://code.mycard.moe/mycard/irrlicht-new irrlicht
artifacts:
......@@ -151,7 +150,7 @@ exec_windows:
script:
- git submodule update --init
- bash -c 'cp -rf premake/* .'
- '.\premake5.exe vs2019'
- '.\premake5.exe vs2019 --irrklang-pro'
- 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:
......@@ -174,11 +173,14 @@ exec_linux:
- git submodule update --init
- mkdir lib
- cp -rf irrklang/bin/linux-gcc-64/libIrrKlang.so ./lib/
- env YGOPRO_LIBEVENT_STATIC_PATH=$PWD/libevent-stable ./premake5 gmake
# - cp -rf irrklang/bin/linux-gcc-64/ikpMP3.so ./lib/
- export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include
- export EVENT_LIB_DIR=$PWD/libevent-stable/lib
- ./premake5 gmake --build-freetype --build-sqlite --build-irrlicht --build-ikpmp3 --irrklang-pro
- cd build
- make config=release -j$(nproc)
- cd ..
- mv bin/release/ygopro .
- mv bin/release/YGOPro ./ygopro
- strip ygopro
artifacts:
paths:
......@@ -204,7 +206,6 @@ exec_macos_platform_x86:
- mat_macos_platform_x86
variables:
TARGET_ARCH: x86
USE_IRRKLANG: "1"
exec_macos_platform_m1:
extends: ._exec_macos_platform
......@@ -214,7 +215,6 @@ exec_macos_platform_m1:
- mat_macos_platform_m1
variables:
TARGET_ARCH: m1
YGOPRO_TARGET_ARM: '1'
exec_macos:
stage: combine
......
......@@ -1703,7 +1703,6 @@ void Game::ShowCardInfo(int code, bool resize) {
if(!dataManager.GetData(code, &cd))
memset(&cd, 0, sizeof(CardData));
imgCard->setImage(imageManager.GetTexture(code, true));
imgCard->setScaleImage(true);
if(cd.alias != 0 && (cd.alias - code < CARD_ARTWORK_VERSIONS_OFFSET || code - cd.alias < CARD_ARTWORK_VERSIONS_OFFSET))
myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(cd.alias), cd.alias);
else myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code);
......@@ -1923,9 +1922,7 @@ void Game::initUtils() {
}
void Game::ClearTextures() {
matManager.mCard.setTexture(0, 0);
imgCard->setImage(imageManager.tCover[0]);
scrCardText->setVisible(false);
imgCard->setScaleImage(true);
ClearCardInfo(0);
btnPSAU->setImage();
btnPSDU->setImage();
for(int i=0; i<=4; ++i) {
......
project "clzma"
kind "StaticLib"
files { "**.c", "**.h" }
files { "*.c", "*.h" }
include "lzma/."
include "spmemvfs/."
project "YGOPro"
kind "WindowedApp"
files { "*.cpp", "*.h", "CGUISkinSystem/*.cpp", "CGUISkinSystem/*.h", "CXMLRegistry/*.cpp", "CXMLRegistry/*.h" }
includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "cspmemvfs", LUA_LIB_NAME, "sqlite3", "irrlicht", "freetype", "event" }
if BUILD_IKPMP3 then
links { "ikpmp3" }
end
if BUILD_EVENT then
includedirs { "../event/include" }
else
includedirs { EVENT_INCLUDE_DIR }
libdirs { EVENT_LIB_DIR }
end
if BUILD_IRRLICHT then
includedirs { "../irrlicht/include" }
else
includedirs { IRRLICHT_INCLUDE_DIR }
libdirs { IRRLICHT_LIB_DIR }
end
if BUILD_FREETYPE then
includedirs { "../freetype/include" }
else
includedirs { FREETYPE_INCLUDE_DIR }
libdirs { FREETYPE_LIB_DIR }
end
if BUILD_SQLITE then
includedirs { "../sqlite3" }
else
includedirs { SQLITE_INCLUDE_DIR }
libdirs { SQLITE_LIB_DIR }
end
if USE_IRRKLANG then
defines { "YGOPRO_USE_IRRKLANG" }
includedirs { IRRKLANG_INCLUDE_DIR }
if not IRRKLANG_PRO then
libdirs { IRRKLANG_LIB_DIR }
end
end
filter "system:windows"
defines { "_IRR_WCHAR_FILESYSTEM" }
files "ygopro.rc"
libdirs { "$(DXSDK_DIR)Lib/x86" }
if USE_IRRKLANG then
links { "irrKlang" }
if IRRKLANG_PRO then
defines { "IRRKLANG_STATIC" }
links { "ikpmp3" }
filter { "not configurations:Debug" }
libdirs { IRRKLANG_PRO_RELEASE_LIB_DIR }
filter { "configurations:Debug" }
libdirs { IRRKLANG_PRO_DEBUG_LIB_DIR }
filter {}
end
end
links { "opengl32", "ws2_32", "winmm", "gdi32", "kernel32", "user32", "imm32" }
filter "not action:vs*"
buildoptions { "-std=c++14", "-fno-rtti" }
filter "not system:windows"
links { "event_pthreads", "dl", "pthread" }
filter "system:macosx"
links { "z" }
defines { "GL_SILENCE_DEPRECATION" }
if MAC_ARM then
buildoptions { "--target=arm64-apple-macos12" }
linkoptions { "-arch arm64" }
end
if USE_IRRKLANG then
links { "irrklang" }
end
filter "system:linux"
linkoptions { "-static-libstdc++", "-static-libgcc" }
links { "GL", "X11", "Xxf86vm" }
if USE_IRRKLANG then
links { "IrrKlang" }
linkoptions { IRRKLANG_LINK_RPATH }
end
project "cspmemvfs"
kind "StaticLib"
files { "**.c", "**.h" }
files { "*.c", "*.h" }
configuration "windows"
if BUILD_SQLITE then
includedirs { "../../sqlite3" }
configuration "not windows"
if BUILD_SQLITE then
includedirs { "../../sqlite3" }
end
end
......@@ -8,5 +8,6 @@ project "event"
"evmap.c", "log.c", "evutil.c", "evutil_rand.c", "strlcpy.c", "signal.c",
"event_tagging.c", "http.c", "evdns.c", "evrpc.c" }
configuration "windows"
filter "system:windows"
prebuildcommands { "xcopy /E /Y $(ProjectDir)..\\event\\WIN32-Code $(ProjectDir)..\\event\\include" }
files { "win32select.c", "evthread_win32.c", "buffer_iocp.c", "event_iocp.c", "bufferevent_async.c" }
......@@ -21,7 +21,6 @@ project "freetype"
"src/base/ftpfr.c",
"src/base/ftstroke.c",
"src/base/ftsynth.c",
"src/base/ftsystem.c",
"src/base/fttype1.c",
"src/base/ftwinfnt.c",
"src/bdf/bdf.c",
......@@ -37,13 +36,17 @@ project "freetype"
"src/psnames/psmodule.c",
"src/raster/raster.c",
"src/sfnt/sfnt.c",
"src/sdf/sdf.c",
"src/smooth/smooth.c",
"src/truetype/truetype.c",
"src/type1/type1.c",
"src/type42/type42.c",
"src/winfonts/winfnt.c" }
configuration "windows"
files { "builds/windows/ftdebug.c" }
configuration "not windows"
files { "src/base/ftdebug.c" }
filter "system:windows"
files { "builds/windows/ftsystem.c",
"builds/windows/ftdebug.c" }
filter "not system:windows"
files { "src/base/ftsystem.c",
"src/base/ftdebug.c" }
This diff is collapsed.
This diff is collapsed.
project "lua"
kind "StaticLib"
files { "**.cc", "**.cpp", "**.c", "**.h" }
excludes { "lua.c", "luac.c" }
configuration "vs*"
buildoptions { "/TP" }
configuration "not vs*"
buildoptions { "-x c++" }
project "lua"
kind "StaticLib"
files { "src/*.c", "src/*.h", "src/*.hpp" }
removefiles { "src/lua.c", "src/luac.c" }
filter "action:vs*"
buildoptions { "/TP" }
filter "not action:vs*"
buildoptions { "-x c++" }
filter "system:bsd"
defines { "LUA_USE_POSIX" }
filter "system:macosx"
defines { "LUA_USE_MACOSX" }
filter "system:linux"
defines { "LUA_USE_LINUX" }
This diff is collapsed.
......@@ -267,6 +267,7 @@
!system 1190 加入手卡
!system 1191 送去墓地
!system 1192 除外
!system 1193 回到卡组
#menu
!system 1200 联机模式
!system 1201 单人模式
......
#config file
#nickname & gamename should be less than 20 characters
use_d3d = 0
use_image_scale = 1
pro_version = 4946
antialias = 2
errorlog = 3
nickname = Nanahira
gamename = Game
lastcategory = OCG
lastdeck = wws
textfont = ./fonts/simhei.ttf 14
numfont = ./fonts/arial.ttf
serverport = 7911
lasthost = tiramisu.mycard.moe
lastport = 7911
automonsterpos = 0
autospellpos = 0
randompos = 0
autochain = 0
waitchain = 0
mute_opponent = 0
mute_spectators = 0
use_lflist = 1
default_lflist = 0
default_rule = 0
hide_setname = 0
hide_hint_button = 0
#control_mode = 0: Key A/S/D/R Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons
control_mode = 0
draw_field_spell = 1
separate_clear_button = 1
#auto_search_limit >= 0: Start search automatically when the user enters N chars
auto_search_limit = 2
#search_multiple_keywords = 0: Disable. 1: Search mutiple keywords with separator " ". 2: with separator "+"
search_multiple_keywords = 1
search_regex = 1
ignore_deck_changes = 0
default_ot = 1
enable_bot_mode = 1
bot_deck_path = ./windbot/Decks
quick_animation = 1
auto_save_replay = 0
draw_single_chain = 1
prefer_expansion_script = 1
ask_mset = 1
window_maximized = 0
window_width = 1402
window_height = 806
resize_popup_menu = 0
enable_sound = 1
enable_music = 0
#Volume of sound and music, between 0 and 100
sound_volume = 100
music_volume = 100
music_mode = 1
enable_pendulum_scale = 1
skin_index = -1
locale = default
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