From 0146808fbfe9d4b05cbca4de8bf99bfb586b82c8 Mon Sep 17 00:00:00 2001 From: G-Moris Date: Mon, 23 Feb 2026 17:36:34 +0300 Subject: [PATCH 1/2] Update --- Client/loader/Main.h | 2 - .../mods/deathmatch/logic/lua/CLuaManager.cpp | 1 - Client/mods/deathmatch/premake5.lua | 2 +- Server/mods/deathmatch/logic/CGame.cpp | 15 ------ Server/mods/deathmatch/premake5.lua | 2 +- vendor/lua/premake5.lua | 49 +------------------ 6 files changed, 4 insertions(+), 67 deletions(-) diff --git a/Client/loader/Main.h b/Client/loader/Main.h index 56ad748234b..6aa5926abe6 100644 --- a/Client/loader/Main.h +++ b/Client/loader/Main.h @@ -22,14 +22,12 @@ #ifdef MTA_DEBUG #define MTA_EXE_NAME "Multi Theft Auto_d.exe" #define MTA_DLL_NAME "core_d.dll" - #define CHECK_DM_LUA_NAME "mods\\deathmatch\\lua5.1c_d.dll" #define CHECK_DM_CLIENT_NAME "mods\\deathmatch\\Client_d.dll" #define LOADER_PROXY_DLL_NAME "mtasa_d.dll" #define MAETRO32_DLL_NAME "maetro32_d.dll" #else #define MTA_EXE_NAME "Multi Theft Auto.exe" #define MTA_DLL_NAME "core.dll" - #define CHECK_DM_LUA_NAME "mods\\deathmatch\\lua5.1c.dll" #define CHECK_DM_CLIENT_NAME "mods\\deathmatch\\Client.dll" #define LOADER_PROXY_DLL_NAME "mtasa.dll" #define MAETRO32_DLL_NAME "maetro32.dll" diff --git a/Client/mods/deathmatch/logic/lua/CLuaManager.cpp b/Client/mods/deathmatch/logic/lua/CLuaManager.cpp index e97f802e612..b7b26f08446 100644 --- a/Client/mods/deathmatch/logic/lua/CLuaManager.cpp +++ b/Client/mods/deathmatch/logic/lua/CLuaManager.cpp @@ -33,7 +33,6 @@ CLuaManager::CLuaManager(CClientGame* pClientGame) #ifdef NDEBUG #error "NDEBUG should not be defined" #endif - assert(luaX_is_apicheck_enabled()); // Load the C functions LoadCFunctions(); diff --git a/Client/mods/deathmatch/premake5.lua b/Client/mods/deathmatch/premake5.lua index 07718d237f5..174d7e57068 100644 --- a/Client/mods/deathmatch/premake5.lua +++ b/Client/mods/deathmatch/premake5.lua @@ -10,7 +10,7 @@ project "Client Deathmatch" defines { "LUNASVG_BUILD", "LUA_USE_APICHECK", "SDK_WITH_BCRYPT" } links { - "Lua_Client", "pcre", "json-c", "ws2_32", "portaudio", "zlib", "cryptopp", "libspeex", "blowfish_bcrypt", "lunasvg", + "Lua", "pcre", "json-c", "ws2_32", "portaudio", "zlib", "cryptopp", "libspeex", "blowfish_bcrypt", "lunasvg", "../../../vendor/bass/lib/bass", "../../../vendor/bass/lib/bass_fx", "../../../vendor/bass/lib/bassmix", diff --git a/Server/mods/deathmatch/logic/CGame.cpp b/Server/mods/deathmatch/logic/CGame.cpp index 84deaf29b2f..88419f565d8 100644 --- a/Server/mods/deathmatch/logic/CGame.cpp +++ b/Server/mods/deathmatch/logic/CGame.cpp @@ -702,21 +702,6 @@ bool CGame::Start(int iArgumentCount, char* szArguments[]) // Encrypt crash dumps for uploading HandleCrashDumpEncryption(); -// Check Windows server is using correctly compiled Lua dll -#ifndef MTA_DEBUG - #ifdef WIN32 - HMODULE hModule = LoadLibrary("lua5.1.dll"); - // Release server should not have this function - PVOID pFunc = static_cast(GetProcAddress(hModule, "luaX_is_apicheck_enabled")); - FreeLibrary(hModule); - if (pFunc) - { - CLogger::ErrorPrintf("Problem with Lua dll\n"); - return false; - } - #endif -#endif - // Read some settings m_pACLManager->SetFileName(m_pMainConfig->GetAccessControlListFile().c_str()); const SString strServerIP = m_pMainConfig->GetServerIP(); diff --git a/Server/mods/deathmatch/premake5.lua b/Server/mods/deathmatch/premake5.lua index 78e1c708292..1ad15bd3b23 100644 --- a/Server/mods/deathmatch/premake5.lua +++ b/Server/mods/deathmatch/premake5.lua @@ -35,7 +35,7 @@ project "Deathmatch" defines { "SDK_WITH_BCRYPT" } links { - "Lua_Server", "sqlite", "ehs", "cryptopp", "pme", "pcre", "json-c", "zip", "glob", "zlib", "blowfish_bcrypt", + "Lua", "sqlite", "ehs", "cryptopp", "pme", "pcre", "json-c", "zip", "glob", "zlib", "blowfish_bcrypt", } vpaths { diff --git a/vendor/lua/premake5.lua b/vendor/lua/premake5.lua index 45445374763..a6eb7a55a2c 100644 --- a/vendor/lua/premake5.lua +++ b/vendor/lua/premake5.lua @@ -1,4 +1,4 @@ -project "Lua_Server" +project "Lua" language "C++" targetname "lua5.1" warnings "Off" @@ -15,49 +15,4 @@ project "Lua_Server" "src/**.h", } - defines { "LUA_BUILD_AS_DLL" } - - filter "system:windows" - kind "SharedLib" - targetdir(buildpath("server/mods/deathmatch")) - - filter "system:not windows" - kind "StaticLib" - - filter {"system:windows", "platforms:x64"} - targetdir(buildpath("server/x64")) - - filter {"system:windows", "platforms:arm"} - targetdir(buildpath("server/arm")) - - filter {"system:windows", "platforms:arm64"} - targetdir(buildpath("server/arm64")) - - -if os.target() == "windows" then - project "Lua_Client" - language "C++" - kind "SharedLib" - targetname "lua5.1c" - targetdir(buildpath("mods/deathmatch")) - - vpaths { - ["Headers"] = "**.h", - ["Sources"] = "**.c", - ["*"] = "premake5.lua" - } - - files { - "premake5.lua", - "src/**.c", - "src/**.h", - } - - defines { - "LUA_USE_APICHECK", - "LUA_BUILD_AS_DLL" - } - - filter "platforms:not x86" - flags { "ExcludeFromBuild" } -end + kind "StaticLib" From ffeee794f9b99aa379811718a83b97ce39ff1893 Mon Sep 17 00:00:00 2001 From: G-Moris Date: Tue, 24 Feb 2026 21:19:50 +0300 Subject: [PATCH 2/2] Fix style --- vendor/lua/premake5.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vendor/lua/premake5.lua b/vendor/lua/premake5.lua index a6eb7a55a2c..31793a33182 100644 --- a/vendor/lua/premake5.lua +++ b/vendor/lua/premake5.lua @@ -1,5 +1,6 @@ project "Lua" language "C++" + kind "StaticLib" targetname "lua5.1" warnings "Off" @@ -14,5 +15,3 @@ project "Lua" "src/**.c", "src/**.h", } - - kind "StaticLib"