Commit 311efed5 authored by nanahira's avatar nanahira

Merge branch 'master' into develop

parents 9e2fe8e3 5c0348f9
...@@ -472,21 +472,15 @@ jobs: ...@@ -472,21 +472,15 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
name: name:
- macos-13-intel - macos-15-intel
# - macos-13-arm-cross-compile-static-link - macos-15-universal-static-link
- macos-13-universal-static-link
- macos-15-arm - macos-15-arm
# - macos-15-intel-cross-compile-static-link # - macos-15-intel-cross-compile-static-link
# - macos-15-universal-static-link
include: include:
- name: macos-13-intel - name: macos-15-intel
os: macos-13 os: macos-15-intel
# - name: macos-13-arm-cross-compile-static-link - name: macos-15-universal-static-link
# os: macos-13 os: macos-15
# cross-build-arm: true
# static-link: true
- name: macos-13-universal-static-link
os: macos-13
cross-build-intel: true cross-build-intel: true
cross-build-arm: true cross-build-arm: true
static-link: true static-link: true
...@@ -495,11 +489,6 @@ jobs: ...@@ -495,11 +489,6 @@ jobs:
# - name: macos-15-intel-cross-compile-static-link # - name: macos-15-intel-cross-compile-static-link
# os: macos-15 # os: macos-15
# cross-build-intel: true # 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 # static-link: true
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
......
...@@ -79,6 +79,9 @@ build ...@@ -79,6 +79,9 @@ build
/premake4.exe /premake4.exe
/premake5* /premake5*
/premake5.exe /premake5.exe
/*.so
/*.dll
/*.dylib
# others # others
*.log *.log
......
No preview for this file type
...@@ -99,7 +99,16 @@ inline FILE* mywfopen(const wchar_t* filename, const char* mode) { ...@@ -99,7 +99,16 @@ inline FILE* mywfopen(const wchar_t* filename, const char* mode) {
#include <irrlicht.h> #include <irrlicht.h>
extern unsigned short PRO_VERSION; #if defined(_MSC_VER)
# define SHARE_VERSION __declspec(selectany)
#else
# define SHARE_VERSION __attribute__((weak))
#endif
extern "C" {
SHARE_VERSION uint16_t PRO_VERSION = 0x1362;
}
extern unsigned int enable_log; extern unsigned int enable_log;
extern bool exit_on_return; extern bool exit_on_return;
extern bool auto_watch_mode; extern bool auto_watch_mode;
......
...@@ -92,10 +92,9 @@ bool DataManager::LoadDB(irr::io::IReadFile* reader) { ...@@ -92,10 +92,9 @@ bool DataManager::LoadDB(irr::io::IReadFile* reader) {
spmembuffer_t* mem = (spmembuffer_t*)std::calloc(sizeof(spmembuffer_t), 1); spmembuffer_t* mem = (spmembuffer_t*)std::calloc(sizeof(spmembuffer_t), 1);
spmemvfs_env_init(); spmemvfs_env_init();
mem->total = mem->used = reader->getSize(); 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->read(mem->data, mem->total);
reader->drop(); reader->drop();
(mem->data)[mem->total] = '\0';
bool ret{}; bool ret{};
if (spmemvfs_open_db(&db, "temp.db", mem) != SQLITE_OK) if (spmemvfs_open_db(&db, "temp.db", mem) != SQLITE_OK)
ret = Error(db.handle); ret = Error(db.handle);
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
#include <regex> #include <regex>
#include <thread> #include <thread>
unsigned short PRO_VERSION = 0x1362;
namespace ygo { namespace ygo {
Game* mainGame; Game* mainGame;
...@@ -218,7 +216,7 @@ bool Game::Initialize() { ...@@ -218,7 +216,7 @@ bool Game::Initialize() {
SetWindowsIcon(); SetWindowsIcon();
//main menu //main menu
wchar_t strbuf[256]; 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 = env->addWindow(irr::core::rect<irr::s32>(370, 200, 650, 415), false, strbuf);
wMainMenu->getCloseButton()->setVisible(false); wMainMenu->getCloseButton()->setVisible(false);
btnLanMode = env->addButton(irr::core::rect<irr::s32>(10, 30, 270, 60), wMainMenu, BUTTON_LAN_MODE, dataManager.GetSysString(1200)); btnLanMode = env->addButton(irr::core::rect<irr::s32>(10, 30, 270, 60), wMainMenu, BUTTON_LAN_MODE, dataManager.GetSysString(1200));
......
...@@ -8,9 +8,12 @@ project "YGOPro" ...@@ -8,9 +8,12 @@ project "YGOPro"
files { "*.cpp", "*.h", "CGUISkinSystem/*.cpp", "CGUISkinSystem/*.h", "CXMLRegistry/*.cpp", "CXMLRegistry/*.h" } files { "*.cpp", "*.h", "CGUISkinSystem/*.cpp", "CGUISkinSystem/*.h", "CXMLRegistry/*.cpp", "CXMLRegistry/*.h" }
includedirs { "../ocgcore" } includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "cspmemvfs", LUA_LIB_NAME, "sqlite3", "irrlicht", "freetype", "event" } links { "ocgcore", "clzma", "cspmemvfs", "sqlite3", "irrlicht", "freetype", "event" }
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 } libdirs { LUA_LIB_DIR }
end end
...@@ -107,7 +110,12 @@ project "YGOPro" ...@@ -107,7 +110,12 @@ project "YGOPro"
filter "system:linux" filter "system:linux"
links { "GL", "X11", "Xxf86vm", "dl", "pthread" } links { "GL", "X11", "Xxf86vm", "dl", "pthread" }
linkoptions { "-fopenmp", "-static-libstdc++", "-static-libgcc" } linkoptions { "-fopenmp" }
if USE_DYNAMIC then
linkoptions { "-Wl,-rpath=./" }
else
linkoptions { "-static-libstdc++", "-static-libgcc" }
end
if USE_AUDIO and AUDIO_LIB == "irrklang" then if USE_AUDIO and AUDIO_LIB == "irrklang" then
links { "IrrKlang" } links { "IrrKlang" }
linkoptions{ IRRKLANG_LINK_RPATH } linkoptions{ IRRKLANG_LINK_RPATH }
......
This diff is collapsed.
...@@ -20,3 +20,6 @@ project "lua" ...@@ -20,3 +20,6 @@ project "lua"
filter "system:linux" filter "system:linux"
defines { "LUA_USE_LINUX" } defines { "LUA_USE_LINUX" }
if USE_DYNAMIC then
pic "On"
end
...@@ -25,6 +25,9 @@ MINIAUDIO_BUILD_OPUS_VORBIS = os.istarget("windows") ...@@ -25,6 +25,9 @@ MINIAUDIO_BUILD_OPUS_VORBIS = os.istarget("windows")
-- BUILD_IRRKLANG is impossible because irrKlang is not open source -- BUILD_IRRKLANG is impossible because irrKlang is not open source
IRRKLANG_PRO = false IRRKLANG_PRO = false
IRRKLANG_PRO_BUILD_IKPMP3 = false IRRKLANG_PRO_BUILD_IKPMP3 = false
-- ocgcore dynamic
OCGCORE_DYNAMIC = false
USE_DYNAMIC = false
-- Read settings from command line or environment variables -- Read settings from command line or environment variables
...@@ -85,6 +88,7 @@ newoption { trigger = 'build-ikpmp3', category = "YGOPro - irrklang - ikpmp3", d ...@@ -85,6 +88,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-arm", category = "YGOPro", description = "Compile for Apple Silicon Mac" }
newoption { trigger = "mac-intel", category = "YGOPro", description = "Compile for Intel 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" }
-- koishipro specific -- koishipro specific
...@@ -356,18 +360,12 @@ if os.istarget("macosx") then ...@@ -356,18 +360,12 @@ if os.istarget("macosx") then
end end
end end
function getGlibcVersion() if GetParam("ocgcore-dynamic") then
local output = os.outputof("getconf GNU_LIBC_VERSION") OCGCORE_DYNAMIC = true
local major, minor, patch = output:match("glibc (%d+)%.(%d+)%.?(%d*)") end
if major and minor then
major = tonumber(major)
minor = tonumber(minor)
patch = tonumber(patch) or 0
return (major << 16) | (minor << 8) | patch
end
return 0 if OCGCORE_DYNAMIC or USE_AUDIO and AUDIO_LIB=='irrklang' and not IRRKLANG_PRO then
USE_DYNAMIC = true
end end
workspace "YGOPro" workspace "YGOPro"
......
...@@ -16,8 +16,8 @@ VALUE "InternalName", "KoishiPro" ...@@ -16,8 +16,8 @@ VALUE "InternalName", "KoishiPro"
VALUE "LegalCopyright", "Copyright (C) 2023 Nanahira" VALUE "LegalCopyright", "Copyright (C) 2023 Nanahira"
VALUE "OriginalFilename", "ygopro.exe" VALUE "OriginalFilename", "ygopro.exe"
VALUE "ProductName", "KoishiPro" VALUE "ProductName", "KoishiPro"
VALUE "FileVersion", "Memes" VALUE "FileVersion", "Synthetic"
VALUE "ProductVersion", "Memes" VALUE "ProductVersion", "Synthetic"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
......
...@@ -829,6 +829,7 @@ ...@@ -829,6 +829,7 @@
!setname 0x66 战士 ウォリアー !setname 0x66 战士 ウォリアー
!setname 0x1066 音响战士 音響戦士 !setname 0x1066 音响战士 音響戦士
!setname 0x2066 磁石战士 マグネット・ウォリアー !setname 0x2066 磁石战士 マグネット・ウォリアー
!setname 0x6066 磁石战士Σ 磁石の戦士Σ
#setname 0x67 钢铁 アイアン #setname 0x67 钢铁 アイアン
#setname 0x68 铁皮 ブリキ #setname 0x68 铁皮 ブリキ
!setname 0x69 圣刻 聖刻 !setname 0x69 圣刻 聖刻
...@@ -1040,7 +1041,7 @@ ...@@ -1040,7 +1041,7 @@
!setname 0xfd 星杯 !setname 0xfd 星杯
!setname 0xfe 星遗物 星遺物 !setname 0xfe 星遗物 星遺物
!setname 0xff 幻透翼 クリアウィング !setname 0xff 幻透翼 クリアウィング
!setname 0x100 化学结合 ボンディング !setname 0x100 结合术 ボンディング
!setname 0x101 码语者 コード・トーカー !setname 0x101 码语者 コード・トーカー
!setname 0x102 弹丸 ヴァレット !setname 0x102 弹丸 ヴァレット
!setname 0x103 幻变骚灵 オルターガイスト !setname 0x103 幻变骚灵 オルターガイスト
...@@ -1282,3 +1283,6 @@ ...@@ -1282,3 +1283,6 @@
!setname 0x1d4 纠罪巧 糾罪巧 !setname 0x1d4 纠罪巧 糾罪巧
!setname 0x1d5 杀手级调整曲 キラーチューン !setname 0x1d5 杀手级调整曲 キラーチューン
!setname 0x1d6 树熊 コアラ !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