Install on Windows
A separate IDE called "SciTE" was developed for the Windows environment and can be downloaded from https://code.google.com/p/luaforwindows/ section.
Run the downloaded executable to install Lua IDE.
Since it's an IDE, you can use it to create and build Lua code.
If you are interested in installing Lua in command line mode, you need to install MinGW or Cygwin, then compile and install Lua in Windows.
install on linux
To download and build Lua, use the following commands −
$wget http://www.lua.org/ftp/lua-5.2.3.tar.gz $tar zxf lua-5.2.3.tar.gz $cd lua-5.2.3 $make linux test
For installation on other platforms like aix, ansi, bsd, generic linux, mingw, posix, solaris, etc. by substituting Linux in make Linux, use the corresponding platform name for testing.
The endless tutorial has a helloWorld.lua in Lua, as shown below -
print("Hello World!")
Now, a Lua file called helloWorld.lua can be built and run by cd'ing to the folder containing the file and then using the following command:
$lua helloWorld
You can see the following output.
hello world
Install on Mac OS X
To build/test Lua in Mac OS X, use the following command -
$curl -R -O http://www.lua.org/ftp/lua-5.2.3.tar.gz $tar zxf lua-5.2.3.tar.gz $cd lua-5.2.3 $make macosx test
There is a helloWorld.lua in Lua as follows −
print("Hello World!")
Now, you can cd into the folder containing the file and use the following commands to build and run a Lua file called helloWorld.lua:
$lua helloWorld
The endless tutorial can see the following output -
hello world