SlySven wrote: ↑
Tue Dec 22, 2020 3:33 am
Mudlet will (and whatever Lua interpreter you are using should) consider the LUA_PATH
(Lua script modules) and LUA_CPATH
(C binary library modules) environmental variables as places where they will locate for the libraries/modules that Lua and Luarocks provide that are asked for when you do a require "moduleName"
in your lua scripts.
I did manage to get luarocks installed on windows, i then managed to get the luamqtt compiled and installed
(i also needed to install luabitop?)
At this point i was able to run the luamqtt in the lua interpreter in my command prompt, after adding the LUA_PATH from luarocks path --bin manually in the command prompt.
I am still struggling with paths for mudlet though...
Launching Mudlet, its package.path and cpath was purely Mudlet folders, none of the luarocks folders. (at this point my machine did not have a LUA_PATH variable)
If i set the LUA_PATH system environment variable to the output of luarocks path --bin then Mudlet will only use this path, and not the mudlet APPDATA paths.
At this point i am guessing i need to somehow make mudlet aware of the luarocks path without replacing the full LUA_PATH.
(i assume not having the mudlet folders in the package.path is bad...)
(this was mighty easier in linux
, well learning something new is good, and i still think enabling mqtt for cross profile communication (and telegram integration) will be awesome
package.path (without LUA_PATH set)
Code: Select all
package.path (with LUA_PATH set to output of luarocks path --bin)
Code: Select all
config\mudlet\profiles\offline\?\init.lua;C:\Program Files (x86)\LuaRocks\lua\?.lua;C:\Program
Files (x86)\LuaRocks\lua\?\init.lua;.\?.lua;C:\Program Files (x86)\LuaRocks\?.lua;C:\Program Files
(x86)\LuaRocks\systree/share/lua/5.1/?.lua;C:\Program Files (x86)\LuaRocks\systree/share/lua/5.
Edit: added outputs of package.path