server: export ygol_engine_version; the Windows gate is 334

TICKET-388. ygol_engine_version() returns the string the build was given (build/windows.ps1 -Version, env YGOL_ENGINE_VERSION into a define by gframe/premake5.lua), "local" when none; static storage, no allocation. One new export, so the Windows export gate moves 333 -> 334 and the changelog gets its Unreleased row, all in this commit.

Verified: build -Version v0.0.1 prints exports: 334 (expected 334); ctypes call prints v0.0.1.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
donnyandClaude Fable 5.1 committed 2026-10-14 22:38:18 -07:00
1 parent c51ea6b4ed
commit 173df5d8e6
5 files changed
+22 -4

No files matched your search

+2
View File
@@ -25,6 +25,8 @@ if SERVER_MODE then
if SERVER_PRO3_SUPPORT then
files { "gframe.h", "serverapi.cpp", "serverapi.h" }
defines { "SERVER_PRO3_SUPPORT" }
-- [YGOL] ygol_engine_version() returns this; the build script sets it from -Version
defines { "YGOL_ENGINE_VERSION=" .. (os.getenv("YGOL_ENGINE_VERSION") or "local") }
end
if SERVER_ZIP_SUPPORT then
+9
View File
@@ -51,4 +51,13 @@ namespace ygo {
YGOSERVER_API void stop_server() {
NetServer::StopServer();
}
#ifndef YGOL_ENGINE_VERSION
#define YGOL_ENGINE_VERSION local
#endif
#define YGOL_STRINGIZE_(x) #x
#define YGOL_STRINGIZE(x) YGOL_STRINGIZE_(x)
YGOSERVER_API const char* ygol_engine_version() {
static const char version[] = YGOL_STRINGIZE(YGOL_ENGINE_VERSION);
return version;
}
}
+2
View File
@@ -21,6 +21,8 @@
namespace ygo {
YGOSERVER_API int start_server(const char* args);
YGOSERVER_API void stop_server();
// [YGOL] the version the build was given (build/windows.ps1 -Version), "local" when none; static storage, never freed
YGOSERVER_API const char* ygol_engine_version();
}
#endif // !SERVERAPI_H