Commit 23c1291c authored by Nanahira's avatar Nanahira Committed by GitHub

use liblua5.4 for --lua-deb (#29)

* use liblua5.4 for --lua-deb

* updates
parent f520f2a3
......@@ -137,7 +137,7 @@ exec_debian:
- mat_linux
- mat_submodules
script:
- apt update; apt -y install git build-essential liblua5.3-dev libsqlite3-dev libevent-dev
- apt update; apt -y install git build-essential liblua5.4-dev libsqlite3-dev libevent-dev
- premake5 gmake --lua-deb
- cd build
- make config=release -j$(nproc)
......
......@@ -39,7 +39,7 @@ newoption { trigger = "no-build-lua", category = "YGOPro - lua", description = "
newoption { trigger = "lua-include-dir", category = "YGOPro - lua", description = "", value = "PATH" }
newoption { trigger = "lua-lib-dir", category = "YGOPro - lua", description = "", value = "PATH" }
newoption { trigger = "lua-lib-name", category = "YGOPro - lua", description = "", value = "NAME", default = LUA_LIB_NAME }
newoption { trigger = "lua-deb", category = "YGOPro - lua", description = "" }
newoption { trigger = "lua-deb", category = "YGOPro - lua", description = "Use Debian lua package" }
newoption { trigger = "build-event", category = "YGOPro - event", description = "" }
newoption { trigger = "no-build-event", category = "YGOPro - event", description = "" }
......@@ -174,9 +174,22 @@ end
if GetParam("lua-deb") then
BUILD_LUA = false
LUA_LIB_DIR = "/usr/lib/x86_64-linux-gnu"
LUA_LIB_NAME = "lua5.3-c++"
LUA_INCLUDE_DIR = "/usr/include/lua5.3"
local lua_versions = { "5.4", "5.3" }
local lua_version = nil
for _, version in ipairs(lua_versions) do
local lua_lib_dir = os.findlib("lua" .. version .. "-c++")
if lua_lib_dir then
print("Found lua " .. version .. " at " .. lua_lib_dir)
lua_version = version
LUA_LIB_DIR = lua_lib_dir
break
end
end
if not lua_version then
error("Lua library not found. Please install lua by command 'sudo apt -y install liblua5.4-dev'")
end
LUA_LIB_NAME = "lua" .. lua_version .. "-c++"
LUA_INCLUDE_DIR = path.join("/usr/include", "lua" .. lua_version)
end
if GetParam("build-event") then
......
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