Commit f4f5e9aa authored by nanahira's avatar nanahira

Merge branch 'server' into lmopen

parents ecc0ddab fb86b0f9
......@@ -472,21 +472,15 @@ jobs:
fail-fast: false
matrix:
name:
- macos-13-intel
# - macos-13-arm-cross-compile-static-link
- macos-13-universal-static-link
- macos-15-intel
- macos-15-universal-static-link
- macos-15-arm
# - macos-15-intel-cross-compile-static-link
# - macos-15-universal-static-link
include:
- name: macos-13-intel
os: macos-13
# - name: macos-13-arm-cross-compile-static-link
# os: macos-13
# cross-build-arm: true
# static-link: true
- name: macos-13-universal-static-link
os: macos-13
- name: macos-15-intel
os: macos-15-intel
- name: macos-15-universal-static-link
os: macos-15
cross-build-intel: true
cross-build-arm: true
static-link: true
......@@ -495,11 +489,6 @@ jobs:
# - name: macos-15-intel-cross-compile-static-link
# os: macos-15
# cross-build-intel: true
# static-link: true
# - name: macos-15-universal-static-link
# os: macos-15
# cross-build-intel: true
# cross-build-arm: true
# static-link: true
runs-on: ${{ matrix.os }}
......
......@@ -79,6 +79,9 @@ build
/premake4.exe
/premake5*
/premake5.exe
/*.so
/*.dll
/*.dylib
# others
*.log
......
......@@ -62,7 +62,7 @@ after_build:
- mv ../script ygopro/
- cd ygopro
- mkdir gframe
- cp -rf ../../gframe/game.cpp gframe/ # Toss game.cpp in for version detection
- cp -rf ../../gframe/config.h gframe/ # Toss config.h in for version detection
# - cp -rf config_build config
- cd ../..
......
No preview for this file type
......@@ -101,7 +101,20 @@ inline FILE* mywfopen(const wchar_t* filename, const char* mode) {
#include <irrlicht.h>
#endif
extern unsigned short PRO_VERSION;
#ifdef YGOPRO_SERVER_MODE
#define SHARE_VERSION constexpr
#else
#if defined(_MSC_VER)
# define SHARE_VERSION __declspec(selectany)
#else
# define SHARE_VERSION __attribute__((weak))
#endif
#endif
extern "C" {
SHARE_VERSION uint16_t PRO_VERSION = 0x1362;
}
extern unsigned int enable_log;
extern bool exit_on_return;
extern bool auto_watch_mode;
......
......@@ -112,10 +112,9 @@ bool DataManager::LoadDB(irr::io::IReadFile* reader) {
spmembuffer_t* mem = (spmembuffer_t*)std::calloc(sizeof(spmembuffer_t), 1);
spmemvfs_env_init();
mem->total = mem->used = reader->getSize();
mem->data = (char*)std::malloc(mem->total + 1);
mem->data = (char*)std::malloc(mem->total);
reader->read(mem->data, mem->total);
reader->drop();
(mem->data)[mem->total] = '\0';
bool ret{};
if (spmemvfs_open_db(&db, "temp.db", mem) != SQLITE_OK)
ret = Error(db.handle);
......
......@@ -29,8 +29,6 @@ namespace irr {
#include <thread>
#include "myfilesystem.h"
unsigned short PRO_VERSION = 0x1362;
namespace ygo {
Game* mainGame;
......@@ -273,7 +271,7 @@ bool Game::Initialize() {
SetWindowsIcon();
//main menu
wchar_t strbuf[256];
myswprintf(strbuf, L"KoishiPro %X.0%X.%X EatemUp", (PRO_VERSION & 0xf000U) >> 12, (PRO_VERSION & 0x0ff0U) >> 4, PRO_VERSION & 0x000fU);
myswprintf(strbuf, L"KoishiPro %X.0%X.%X Synthetic", (PRO_VERSION & 0xf000U) >> 12, (PRO_VERSION & 0x0ff0U) >> 4, PRO_VERSION & 0x000fU);
wMainMenu = env->addWindow(irr::core::rect<irr::s32>(370, 200, 650, 415), false, strbuf);
wMainMenu->getCloseButton()->setVisible(false);
btnLanMode = env->addButton(irr::core::rect<irr::s32>(10, 30, 270, 60), wMainMenu, BUTTON_LAN_MODE, dataManager.GetSysString(1200));
......
......@@ -28,7 +28,7 @@ end
defines { "SERVER_PRO3_SUPPORT" }
end
includedirs { "../ocgcore" }
links { "ocgcore", "clzma", LUA_LIB_NAME, "sqlite3", "event" }
links { "ocgcore", "clzma", "sqlite3", "event" }
if SERVER_ZIP_SUPPORT then
defines { "SERVER_ZIP_SUPPORT" }
links { "irrlicht", "cspmemvfs" }
......@@ -50,10 +50,13 @@ project "ygopro"
files { "*.cpp", "*.h" }
includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "cspmemvfs", LUA_LIB_NAME, "sqlite3", "irrlicht", "freetype", "event" }
links { "ocgcore", "clzma", "cspmemvfs", "sqlite3", "irrlicht", "freetype", "event" }
end
if not OCGCORE_DYNAMIC then
links { LUA_LIB_NAME }
end
if not BUILD_LUA then
if not BUILD_LUA and not OCGCORE_DYNAMIC then
libdirs { LUA_LIB_DIR }
end
......@@ -163,7 +166,11 @@ end
filter "system:linux"
links { "dl", "pthread" }
linkoptions { "-static-libstdc++", "-static-libgcc" }
if USE_DYNAMIC then
linkoptions { "-Wl,-rpath=./" }
else
linkoptions { "-static-libstdc++", "-static-libgcc" }
end
if not SERVER_MODE then
links { "GL", "X11", "Xxf86vm" }
linkoptions { "-fopenmp" }
......
This diff is collapsed.
......@@ -8,10 +8,6 @@ project "lua"
if not GetParam("no-lua-safe") then
removefiles { "src/linit.c" }
end
if SERVER_PRO3_SUPPORT then
defines { "LUA_USE_LONGJMP" }
end
filter "configurations:Debug"
defines { "LUA_USE_APICHECK" }
......@@ -24,3 +20,6 @@ project "lua"
filter "system:linux"
defines { "LUA_USE_LINUX" }
if USE_DYNAMIC then
pic "On"
end
......@@ -25,6 +25,9 @@ MINIAUDIO_BUILD_OPUS_VORBIS = os.istarget("windows")
-- BUILD_IRRKLANG is impossible because irrKlang is not open source
IRRKLANG_PRO = false
IRRKLANG_PRO_BUILD_IKPMP3 = false
-- ocgcore dynamic
OCGCORE_DYNAMIC = false
USE_DYNAMIC = false
SERVER_MODE = true
SERVER_ZIP_SUPPORT = false
......@@ -92,6 +95,7 @@ newoption { trigger = 'build-ikpmp3', category = "YGOPro - irrklang - ikpmp3", d
newoption { trigger = "mac-arm", category = "YGOPro", description = "Compile for Apple Silicon Mac" }
newoption { trigger = "mac-intel", category = "YGOPro", description = "Compile for Intel Mac" }
newoption { trigger = "ocgcore-dynamic", category = "YGOPro - ocgcore", description = "Build ocgcore as dynamic library" }
newoption { trigger = "server-mode", category = "YGOPro - server", description = "" }
newoption { trigger = "server-zip-support", category = "YGOPro - server", description = "" }
......@@ -401,18 +405,12 @@ if os.istarget("macosx") then
end
end
function getGlibcVersion()
local output = os.outputof("getconf GNU_LIBC_VERSION")
local major, minor, patch = output:match("glibc (%d+)%.(%d+)%.?(%d*)")
if major and minor then
major = tonumber(major)
minor = tonumber(minor)
patch = tonumber(patch) or 0
return (major << 16) | (minor << 8) | patch
end
if GetParam("ocgcore-dynamic") then
OCGCORE_DYNAMIC = true
end
return 0
if OCGCORE_DYNAMIC or USE_AUDIO and AUDIO_LIB=='irrklang' and not IRRKLANG_PRO then
USE_DYNAMIC = true
end
workspace "YGOPro"
......@@ -430,6 +428,10 @@ workspace "YGOPro"
ApplyBoolean(boolOption)
end
if SERVER_PRO3_SUPPORT then
defines { "LUA_USE_LONGJMP" }
end
filter "system:windows"
systemversion "latest"
startproject "YGOPro"
......
Subproject commit 1ab065ebcec1d99f33fa91c067985cd8dd57baa1
Subproject commit 864b7ef22fdcf68570a488d1834cae9086a63b5e
......@@ -829,6 +829,7 @@
!setname 0x66 战士 ウォリアー
!setname 0x1066 音响战士 音響戦士
!setname 0x2066 磁石战士 マグネット・ウォリアー
!setname 0x6066 磁石战士Σ 磁石の戦士Σ
#setname 0x67 钢铁 アイアン
#setname 0x68 铁皮 ブリキ
!setname 0x69 圣刻 聖刻
......@@ -1040,7 +1041,7 @@
!setname 0xfd 星杯
!setname 0xfe 星遗物 星遺物
!setname 0xff 幻透翼 クリアウィング
!setname 0x100 化学结合 ボンディング
!setname 0x100 结合术 ボンディング
!setname 0x101 码语者 コード・トーカー
!setname 0x102 弹丸 ヴァレット
!setname 0x103 幻变骚灵 オルターガイスト
......@@ -1282,3 +1283,6 @@
!setname 0x1d4 纠罪巧 糾罪巧
!setname 0x1d5 杀手级调整曲 キラーチューン
!setname 0x1d6 树熊 コアラ
!setname 0x1d7 艾克莉西娅 エクレシア
!setname 0x1d8 耀圣 エルフェンノーツ
!setname 0x1d9 磁力 マグネット
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