Compare commits

...

3 Commits

Author SHA1 Message Date
Tixx 43e86a1e22 Change to luajit 2026-02-19 22:08:06 +01:00
Tixx 70fc8436ed Remove lua version lock 2026-01-18 23:32:54 +01:00
Tixx 6f196aca64 Decrease likelyhood of lua stack corruption (#462)
Decreases the likelyhood of lua stack corruption.

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2026-01-18 21:56:31 +01:00
4 changed files with 9 additions and 11 deletions
+6 -3
View File
@@ -80,14 +80,15 @@ set(PRJ_SOURCES
src/ChronoWrapper.cpp
)
find_package(Lua REQUIRED)
# fix for sol2
find_path(LUAJIT_INCLUDE_DIR lua.hpp PATH_SUFFIXES luajit)
# set the source file containing main()
set(PRJ_MAIN src/main.cpp)
# set the source file containing the test's main
set(PRJ_TEST_MAIN test/test_main.cpp)
# set include paths not part of libraries
set(PRJ_INCLUDE_DIRS ${LUA_INCLUDE_DIR})
set(PRJ_INCLUDE_DIRS ${LUAJIT_INCLUDE_DIR})
# set compile features (e.g. standard version)
set(PRJ_COMPILE_FEATURES cxx_std_20)
# set #defines (test enable/disable not included here)
@@ -105,9 +106,11 @@ set(PRJ_LIBRARIES
libzip::zip
OpenSSL::SSL OpenSSL::Crypto
CURL::libcurl
${LUA_LIBRARIES}
lua51
)
link_directories(${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib)
# add dependency find_package calls and similar here
find_package(fmt CONFIG REQUIRED)
find_package(OpenSSL REQUIRED)
+1 -2
View File
@@ -260,8 +260,7 @@ void TConsole::Command_Version(const std::string& cmd, const std::vector<std::st
Application::Console().WriteRaw("Platform: " + platform);
Application::Console().WriteRaw("Server: v" + Application::ServerVersionString());
std::string lua_version = fmt::format("Lua: v{}.{}.{}", LUA_VERSION_MAJOR, LUA_VERSION_MINOR, LUA_VERSION_RELEASE);
Application::Console().WriteRaw(lua_version);
Application::Console().WriteRaw(LUA_RELEASE);
std::string openssl_version = fmt::format("OpenSSL: v{}.{}.{}", OPENSSL_VERSION_MAJOR, OPENSSL_VERSION_MINOR, OPENSSL_VERSION_PATCH);
Application::Console().WriteRaw(openssl_version);
}
+1 -1
View File
@@ -65,7 +65,7 @@ TEST_CASE("TLuaEngine ctor & dtor") {
void TLuaEngine::operator()() {
RegisterThread("LuaEngine");
// lua engine main thread
beammp_infof("Lua v{}.{}.{}", LUA_VERSION_MAJOR, LUA_VERSION_MINOR, LUA_VERSION_RELEASE);
beammp_infof(LUA_RELEASE);
CollectAndInitPlugins();
Application::SetSubsystemStatus("LuaEngine", Application::Status::Good);
+1 -5
View File
@@ -15,16 +15,12 @@
"rapidjson",
"sol2",
"curl",
"lua"
"luajit"
],
"overrides": [
{
"name": "sol2",
"version": "3.3.1"
},
{
"name": "lua",
"version": "5.3.5#6"
}
],
"builtin-baseline": "5bf0c55239da398b8c6f450818c9e28d36bf9966"