-
-
Notifications
You must be signed in to change notification settings - Fork 8
LuaDist Support Windows, Linux, MacOS
LuaDist can be downloaded from here, however, here is a direct download link LuaDist 0.2.2 + batteries 0.9.8.
A little on LuaDist:
- Installs libs to
luadist/lib/lua/*
- Most installed libs are either .lua or .dll files
- Suggested naming convention for the load .dll seems to be
core.dll
- Sometimes two
luadist install package
commands need to be issued for packages to actually install - Downloaded source files are not retained
- CMake is a strict dependency
- Not all modules work out of the box except with lua51 and LuaJIT
- LuaDist is an
.exe
and there is nothing to be done with making luaw support it except package location
In order to attempt to use LuaDist packages, you will need to add the libs path to LUA_CPATH
and LUA_PATH
. Here is a little explanation. I recommend using a shell script, as you can also append more to it as you go... like library repository switching. You should add @lua_path_cpaths.bat
as LUA_INIT environment variable then, as it will execute that file automatically for you. ALTHOUGH, you can change where it installs things, which defeats the purpose of reusing modules if its a local-to-the-project install
You must use luadist or luarocks for all your package needs. LuaConsole has no in-house support for actually downloading packages.
@echo off
setx LUA_PATH C:\LuaDist\lib\lua\?.lua;%LUA_PATH%
setx LUAC_PATH C:\LuaDist\lib\lua\?.dll;%LUA_CPATH%
(Guessing where you installed LuaDist, assuming /usr/local/bin
and /usr/local/lib)
export LUA_PATH=/usr/local/lib/lua/?.lua:$LUA_PATH
export LUA_CPATH=/usr/local/lib/lua/?.so:$LUA_CPATH
NOTE: You can always execute things from different directories in luadist\lib\lua
by appending the folders to the module name with periods. Example: require("socket.core")
, which loads something like luadist\lib\lua>>\socket\core.dll<<