lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I   use   just   that.   I   use  lua_init  env  variable  to  set  my
pakage.loaders/searchrs.   I   use   strings   for   pakage.path   like
`*\share\?.lua;lua*\share\?.lua;lua-*\share\?.lua`.  Where  `*` is lib
name  which calculate as first part in require argument. This does not
works  for  some modules like `mime` from luasocket or `re` from lpeg.
for  such  modules  i  have table to associate them with library. Also
my loadrs update %PATH% env variable for current process. So I have
separate directory for library which contain `share` dir with all
modules,  `test`  dir  with  tests,  `doc`  dir with documentation and
`path`  dir with external deps (e.g. libuv.dll for lluv or zmq.dll for
lzmq). `path` adds to process env %path% variable just before loading lua
module.  So  you  can use specific version for lua module. E.g. I have
several  openssl  in  my  %PATH%  but  lua module have to use specific

Thank you! I didn't know about LUA_INIT. Thank you for sharing your methodology. I will setup my environment similarly.