From 6a191cce0af0056ecde69efe1679a084aadd810c Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 28 Feb 2014 08:26:39 +0100 Subject: Fixed compatibility with ZeroBraneStudio and LuaRocks. Lua now compiles into lua51.dll and there's a lua5.1.dll that acts as a export-forwarding proxy to lua51.dll. --- MCServer/lua5.1.dll | Bin 0 -> 6722 bytes lib/lua/CMakeLists.txt | 6 +++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 MCServer/lua5.1.dll diff --git a/MCServer/lua5.1.dll b/MCServer/lua5.1.dll new file mode 100644 index 000000000..cca0bcb25 Binary files /dev/null and b/MCServer/lua5.1.dll differ diff --git a/lib/lua/CMakeLists.txt b/lib/lua/CMakeLists.txt index 4babae9b2..db112d557 100644 --- a/lib/lua/CMakeLists.txt +++ b/lib/lua/CMakeLists.txt @@ -47,8 +47,12 @@ if (WIN32) ) endif() + set_target_properties(lua PROPERTIES OUTPUT_NAME "lua51") + # NOTE: The DLL for each configuration is stored at the same place, thus overwriting each other. - # This is known, however such behavior is needed for LuaRocks - they always load "lua.dll" + # This is known, however such behavior is needed for LuaRocks - they always load "lua5.1.dll" or "lua51.dll" + # We make it work by compiling to "lua51.dll" and providing a proxy-DLL "lua5.1.dll" + # See http://lua-users.org/wiki/LuaProxyDllFour for details else() add_library(lua ${SOURCE}) endif() -- cgit v1.2.3