LuaJIT binaries (frontend, static library, dynamic library).
GCC flags -msse -msse2
were added for 32bit platforms.
!\..\..\?.lua;!\..\..\?\init.lua
was added to the default package.path in luaconf.h. This allows luapower modules to be found regardless of what the current directory is, making the distribution portable.
The default package.cpath
was also modified from !\?.dll
to !\clib\?.dll
. This is to distinguish between Lua/C modules and other binary dependencies.
Windows looks for dependent dlls in the directory of the executable first, and that's where the luapower dlls are, so isolation from system libraries is acheived automatically in this case.
For Linux and OSX, luajit is a shell wrapper script that sets LD_LIBRARY_PATH, LUA_PATH and LUA_CPATH to acheive the same effect and assure isolation from system libraries.
The above solves the problem of finding Lua modules and binary dependencies relative to the directory of the executable, and independent of the directory the script was started in.
To get the location of the running script, as opposed to that of the luajit executable, use glue.bin.
To add more paths to package.path and package.cpath at runtime, use glue.luapath and glue.cpath.