You can install OiL through LuaRocks using the following command.
luarocks install oil
If you just want to use OiL in a Microsoft Windows platform then use one of the following binary packages below:
run
included in the source package).
Use this package to embed OiL in applications.
OiL is provided as free software under the terms of the MIT license, which are the same terms of the Lua's license. You can download the OiL package from the following link. The package below also contains the source code of LOOP and LuaSocket libraries.
See also:OiL is almost entirely written in Lua, however it requires some supporting libraries written in C.
Therefore, to install OiL, you need to compile this libraries.
To do such, you must first read and edit the config
file included in the source package.
For your convenience, the package includes some pre-configured compilation options for platforms Linux, Solaris and MacOS X. If you want to use one of these configurations, use one of the following commands before the installation.
Linux: | $ make linux |
Solaris: | $ make solaris |
MacOS X: | $ make macosx |
After you built OiL, you can choose one of the installation procedures described below.
$ make install
$ make install-precomp
$ make install-preload
In order to load OiL package in the Lua stand-alone interpreter, you must add the paths where you installed OiL and LuaSocket to the LUA_PATH
and LUA_CPATH
environment variables. For example, if you installed Lua files of OiL and LuaSocket (see INSTALL_LMOD
macro in file config
) into directory /usr/local/share/lua/5.1/
then LUA_PATH
must be set to:
LUA_PATH=";;/usr/local/share/lua/5.1/?.lua"
A similar approach is used for the LUA_CPATH
environment variable. Supose you have installed the C libraries of OiL and LuaSocket (see INSTALL_CMOD
macro in file config
) into directory /usr/local/lib/lua/5.1/
then LUA_CPATH
must be set to:
LUA_CPATH=";;/usr/local/lib/lua/5.1/?.so"
For further information on the use of LUA_PATH
and LUA_CPATH
environment variable, check the Lua manual.