Installation
Rock
You can install OiL through LuaRocks using the following command.
luarocks install oil
Binaries
If you just want to use OiL in a Microsoft Windows platform then use one of the following binary packages below:
-
Executables and Demos
[win32]
This package includes the Lua stand-alone interpreter, all C libraries required by OiL already compiled, and all OiL's implementation as Lua scripts so they can be edited and dynamically loaded in the Lua interpreter. This package also includes all OiL demos. Use this package to try OiL out and study its implementation and demos. -
Pre-Compiled Libraries
[vc6]
[vc7]
[vc8]
[dll6]
[dll7]
[dll8]
This package includes pre-compiled libraries of OiL and all its required libraries (LOOP, LuaIDL, and LuaSocket). The DLL version of these libraries can be installed in the Lua path for C libraries (see Lua's manual) and dynamically loaded in the Lua's stand-alone interpreter. Use this package to install OiL in a environment that already have Lua installed. -
Pre-Loading Library
[vc6]
[vc7]
[vc8]
[dll6]
[dll7]
[dll8]
This package includes a library that can be linked into an application to pre-load the full OiL implementation. For an example of the use of this package, see demorun
included in the source package). Use this package to embed OiL in applications.
Source
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:Building from Source
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 |
Installing from Source
After you built OiL, you can choose one of the installation procedures described below.
- Standard
Installs the Lua files and C libraries of modules that compose OiL. This option is useful for playing with OiL implementation, because you will be able to modify its implementation by changing the Lua files.$ make install
- Pre-Compiled
Installs a set of libraries containing all modules that compose OiL implementation already pre-compiled. This option is useful for users that don't intend to make changes in OiL implementation.$ make install-precomp
- Pre-Loading
Installs a single library containing all C libraries and Lua files pre-compiled for preloading into embedded Lua applications. This option is useful for developers that intend to include OiL in other applications by linking into a single file. See demo 'run' for more details.$ make install-preload
Environment setup
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.