Login
or
register
LuaRocks
Versioned Components For Lua
Overview
Home Page
Mailing list
Browse rocks
Links
Download
Download
Installing on Unix
Installing on Windows
Release history
License
Documentation
Documentation
File formats
Development
Feedback
Installation instructions for Windows
Anonymous users must enter
captcha
below.
Page Parameters
Page Name (for URL)
Page Title
Show Advanced Options
Category
Don't put anything here
Prototype
Don't put anything here
Page Content
The LuaRocks package for Windows is an all-in-one package which includes everything you need to run LuaRocks, including helper binaries and a Lua interpreter. (You can use your own Lua interpreter if you already have one installed, see below.) The package includes an installer script, <tt>INSTALL.BAT</tt>, which provides a number of options for customizing your installation. Run <tt>INSTALL /?</tt> for details. == The default settings == The default settings are suitable for installing LuaRocks globally in your system while allowing both system-wide and per-user sets of rocks. Non-priviledged accounts will be able to install their own rocks in their %APPDATA% directory, and administrator accounts can install rocks that will be available for everyone. By default LuaRocks will install itself in c:\LuaRocks\''version'', and will use c:\LuaRocks\config.lua as a default path for the configuration file. The default system-wide rocks trees is configured as c:\LuaRocks\rocks, and per-user rocks install at %APPDATA%/luarocks/rocks/. Command-line scripts provided by rocks will be installed in c:\LuaRocks\bin or %APPDATA%/luarocks/bin/, respectively. The user may then add these directories to their %PATH% variable. == Making a system-wide repository == All paths described above can be overridden with flags in the INSTALL.BAT script, or entries in the configuration file. {| cellpadding=5px | /P ''dir'' || Where to install. Default is c:\LuaRocks\''version'' |------------------------------------------------------------------------- | /CONFIG ''dir'' || Location where the config file should be installed. Default is c:\LuaRocks |------------------------------------------------------------------------- | /TREE ''dir'' || Root of the local tree of installed rocks. Default is c:\LuaRocks |------------------------------------------------------------------------- | /SCRIPTS ''dir'' || Where to install scripts installed by rocks. Default is TREE/bin. |------------------------------------------------------------------------- | /L || Install LuaRocks' own copy of Lua even if detected. |------------------------------------------------------------------------- | /LUA ''dir'' || Location where Lua is installed - e.g. c:\lua\5.1\ |------------------------------------------------------------------------- | /INC ''dir'' || Location of Lua includes - e.g. c:\lua\5.1\include |------------------------------------------------------------------------- | /LIB ''dir'' || Location of Lua libraries -e.g. c:\lua\5.1\lib |------------------------------------------------------------------------- | /BIN ''dir'' || Location of Lua executables - e.g. c:\lua\5.1\bin |------------------------------------------------------------------------- | /FORCECONFIG || Use a single config location. Do not use the LUAROCKS_CONFIG variable or the user's home directory. Useful to avoid conflicts when LuaRocks is embedded within an application. |------------------------------------------------------------------------- | /F || Remove installation directory if it already exists. |} After installation, a default config file called config.lua will be installed at the directory defined by /CONFIG. For further configuration of LuaRocks paths, see the [Config file format]. == Making a self-contained installation == Another option is to install LuaRocks in a self-contained manner. This is an interesting alternative when shipping an application which uses third-party modules. Bundling them as rocks reduces maintenance overhead and allows the user to perform updates. In this scenario, it is not desired to have the user's (or the system's) configuration affect the self-contained LuaRocks install, in case the user or the system also have different LuaRocks installations. For this reason, the INSTALL.BAT script allows to hardcode the location of a configuration file. For example, the compilation process of a package bundling LuaRocks could do something like this: SET PREFIX=C:\mypackage INSTALL /P %PREFIX% /CONFIG %PREFIX%\luarocks The copy of LuaRocks installed in C:\mypackage will ignore customization schemes such as the %LUAROCKS_CONFIG% environment variable and will only use C:\mypackage\luarocks\config.lua. An interesting option in those cases is for the application to provide in its configuration file an URL for their own rocks repository, so they can have control over updates to be performed. Continuing the previous example, luarocks\config.lua could contain something like this: repositories = { "http://www.mypackage.org/rocks/" } == Picking the Lua interpreter == LuaRocks can use its own Lua interpreter provided by the LuaBinaries project, and will do so by default if it fails to find your Lua installation automatically. If you want to use your own interpreter, you can pass its path using the /LUA variable (or /BIN, /LIB and /INC explicitly, if you have a custom directory structure). When looking for an interpreter, it will also try to figure out the name of the Lua binary (lua.exe, lua5.1.exe). This is set in the <code>lua_interpreter</code> variable in the configuration file. If you want to use an alternative name to the interpreter, you can set that variable in your configuration file directly. == Next steps == Once LuaRocks is installed, learn more about [[Using LuaRocks|using LuaRocks]]. ---- == Installing over "Lua for Windows" == <i>Need some information on this too....</i> <references/>
Don't put anything here
Don't put anything here
About this Edit
Minor Edit
Edit Summary
Don't put anything here
Don't put anything here
Powered by
Sputnik
|
XHTML 1.1