Skip to content

Add Effil, Lua multithreading library to Morrowind.

License

Notifications You must be signed in to change notification settings

longod/effil-mw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Effil-MW

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.

Known Issues

On LuaJIT (Not only in MWSE)

  • 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 call yield or do some meaningful processing in a thread.

On MWSE

  • 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.

Manual build on Windows

  1. Setup
    1. Install latest of Visual Studio
      • require cmake
    2. git submodule update --init --recursive
  2. Build LuaJIT used in MWSE
    1. vcvars32.bat
      • C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32.bat
    2. cd src/MWSE/deps/LuaJIT/src
    3. msvcbuild.bat
  3. Build Effil
    1. cd src/effil
    2. mkdir build
    3. cd build
    4. cmake .. -A Win32 -DLUA_INCLUDE_DIR="../../src/MWSE/deps/LuaJIT/src" -DLUA_LIBRARY="../../src/MWSE/deps/LuaJIT/src/lua*.lib"
    5. cmake --build . --target effil --config Release -- -m
  4. Copy into MWSE
    1. Copy "effil.dll" to "Data Files/MWSE/lib"

About

Add Effil, Lua multithreading library to Morrowind.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages