Add Effil, Lua multithreading library to Morrowind.
Currently, it is confirmed to work on MWSE.
It has not been confirmed to work on OpenMW, but I guess it is technically possible.
- Frequent accesses to the same object between threads will cause resource leaks. This frequency is such that they read and write while in a busy loop with each other. Generally, such processing should be avoided in multi-threading.
- A thread in a real busy loop cannot be terminated by
cancel
. Should callyield
or do some meaningful processing in a thread.
- MWSE-specific functions and userdata cannot be called within a thread. This includes implicitly custom processes such as
print
. - Although the detailed conditions are unknown, it seems that type conversions that do not match the
effil
type may cause resource leaks.
- Setup
- Install latest of Visual Studio
- require cmake
- git submodule update --init --recursive
- Install latest of Visual Studio
- Build LuaJIT used in MWSE
- vcvars32.bat
- C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32.bat
- cd src/MWSE/deps/LuaJIT/src
- msvcbuild.bat
- vcvars32.bat
- Build Effil
- cd src/effil
- mkdir build
- cd build
- cmake .. -A Win32 -DLUA_INCLUDE_DIR="../../src/MWSE/deps/LuaJIT/src" -DLUA_LIBRARY="../../src/MWSE/deps/LuaJIT/src/lua*.lib"
- cmake --build . --target effil --config Release -- -m
- Copy into MWSE
- Copy "effil.dll" to "Data Files/MWSE/lib"