mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 06:15:32 +00:00
Add new paths for native & lua libs
If you want to add the native lib you should place it to {PATH_TO_MOD}/lib/ for external Lua libs: {PATH_TO_MOD}/lib/lua/
This commit is contained in:
parent
7b3e487f91
commit
61f7ad2f76
1 changed files with 9 additions and 1 deletions
|
@ -196,7 +196,15 @@ int main(int argc, char *argv[])
|
|||
setenv("AMXFILE", moddir.c_str(), 1);
|
||||
setenv("MOD_DIR", moddir.c_str(), 1); // hack for lua
|
||||
|
||||
setenv("LUA_PATH", Utils::convertPath(plugin_home + "/scripts/?.lua" + ";" + plugin_home + "/scripts/?.t").c_str(), 1);
|
||||
setenv("LUA_PATH", Utils::convertPath(plugin_home + "/scripts/?.lua" + ";"
|
||||
+ plugin_home + "/scripts/?.t" + ";"
|
||||
+ plugin_home + "/lib/lua/?.lua" + ";"
|
||||
+ plugin_home + "/lib/lua/?.t").c_str(), 1);
|
||||
#ifdef _WIN32
|
||||
setenv("LUA_CPATH", Utils::convertPath(plugin_home + "/lib/?.dll").c_str(), 1);
|
||||
#else
|
||||
setenv("LUA_CPATH", Utils::convertPath(plugin_home + "/lib/?.so").c_str(), 1);
|
||||
#endif
|
||||
|
||||
for (auto plugin : plugins)
|
||||
Script::LoadScript(plugin.c_str(), plugin_home.c_str());
|
||||
|
|
Loading…
Reference in a new issue