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..31793a33182 100644 --- a/vendor/lua/premake5.lua +++ b/vendor/lua/premake5.lua @@ -1,5 +1,6 @@ -project "Lua_Server" +project "Lua" language "C++" + kind "StaticLib" targetname "lua5.1" warnings "Off" @@ -14,50 +15,3 @@ project "Lua_Server" "src/**.c", "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