Search code examples
luainstallationself-containedluarocks

Self Contained installation luarocks on Windows


I want to create self contained installation with luarocks that contain lua installation plus some lua and Dll files I added to the library.

In other word I have one lua appender that I want to add to the logging folder, and two dll files that I want to add to lua Clibs.

I looked to the luarocks documentation I couldn't find how I can do this part

Thank you in advance


Solution

  • The install script for the current LuaRocks version (2.2.0) has a /SELFCONTAINED option (/FORCECONFIG might also be of interest, and you probably want to remove the "user" tree from config.lua).

    Where you put your extra library files has nothing to do with LuaRocks. As long as the Lua binary can find them, everything is ok. The default package.path contains the directory of the Lua executable, so this would be a reasonable place to put your extra files (don't forget the necessary subdirectories, e.g. logging).