In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Changes

Jump to navigation Jump to search
138 bytes removed ,  19:19, 29 November 2013
removed outdated stuff and updated download links for new version
Line 2: Line 2:  
| image      =  
 
| image      =  
 
| title      = Lua
 
| title      = Lua
 +
| version    = 5.1.5-wii-1
 
| type        = ported library
 
| type        = ported library
| author      = [[User:Feesh!|Feesh]]
+
| licence    = MIT
| download    = http://feesh.braingravy.co.uk/archives/lua-wii.tar.bz2
+
| maintainer  = [[User:Carstene1ns|carstene1ns]]
 +
| contributor = [[User:Feesh!|Feesh]],[[User:Owen|Owen]]
 +
| download    = https://github.com/carstene1ns/lua51-wii/releases/download/v5.1.5-wii-1/lua-5.1.5-wii-1.zip
 +
| source      = https://github.com/carstene1ns/lua51-wii/archive/v5.1.5-wii-1.zip
 
}}
 
}}
   Line 11: Line 15:  
== Usage ==
 
== Usage ==
   −
The source code comes with a functioning example. To use the example, you need to copy the 'test.lua' to the root of your SD card, then run the lua.elf, either from Wiiload, the HBC menu, or (possibly- not tested yet) any other homebrew bootloader.
+
Extract release download archive to your $DEVKITPRO/libogc folder.
   −
== Build ==
+
Include lua headers in your source files, eg:
Go to  lua\lua-5.1.3 and type <br/>
+
  #include "lua.h"
make local <br/>
+
  #include "lauxlib.h"
copy liblua.a to your lib directory and lauxlib.h lua.h  lua.hpp  luaconf.h  lualib.h to your include/lua directory <br/>
+
  #include "lualib.h"
add -llua to your makefile LIBS '''before lib math''' (-lm) because Lua depends on it (lmathlib.o and lvm.o objects). <br/>
  −
<br/>
  −
note: If using the devkitpro release 19+, the toolchain executable has been rename from gekko to eabi, the src/makefile CC variable line 12 should be edited, as <br/>
  −
it override the CC environement variable. <br/>
  −
<br/>
  −
You may also change the line 19 to: <br/>
  −
MYCFLAGS=-I$(DEVKITPRO)/libogc/include <br/>
  −
as the fat lib is most likely to be part of libogc rather than devkitppc include dir<br/>
     −
[[User:TheDrev|TheDrev]] 12:03, 9 April 2010 (UTC)
+
Add -llua to your LIBS in Makefile before -lm
 +
 
 +
If you need file system access, use an external library (for example libfat)
 +
and initalize it before trying to access any files.
 +
 
 +
== Build ==
 +
 
 +
Be sure DevkitPPC and libogc is installed and $DEVKITPRO is an exported variable.
 +
 
 +
Then the usual
 +
 
 +
cd /to/lua51-wii/dir
 +
make -j <number of processor cores/threads> (eg. -j2)
 +
 
 +
will build the library and
 +
 
 +
make install
 +
 
 +
will install library and header files in your DevkitPro installation folder.
    
== Reasons To Use Lua ==
 
== Reasons To Use Lua ==
Line 32: Line 46:  
To poke at a few popular uses of Lua; Lua was used in World of Warcraft for the GUI, in Farcry for the console system and all of the programmed user materials in Gmod(the famous retail HL2 sandbox mod) are made with it. It's been used in a bunch of open source game engines because it is simple to use and pretty versatile.
 
To poke at a few popular uses of Lua; Lua was used in World of Warcraft for the GUI, in Farcry for the console system and all of the programmed user materials in Gmod(the famous retail HL2 sandbox mod) are made with it. It's been used in a bunch of open source game engines because it is simple to use and pretty versatile.
   −
== Bugs ==
+
== TODO / BUGS / Limitations ==
    +
* Add proper Wii thread support
 +
* Add proper time support (in testing)
 +
* The stand-alone-interpreter and bytecode-compiler are not build.
 +
* Launching external programs (system()) will likely never work
 
* FAT system needs to be initialized by the user before calling any file loading functions (such as luaL_dofile(...)).  
 
* FAT system needs to be initialized by the user before calling any file loading functions (such as luaL_dofile(...)).  
    
== Source ==
 
== Source ==
   −
The only major changes to the source code were removing functions related to launching system executables and getting the system's time. Other small changes were made to the file manipulation functions- they try to initialize FAT before use but it is recommended you do this yourself! The makefile might need some configuration to reflect your development environment.
+
The only major changes to the source code were removing functions related to launching system executables.
   −
== Alternate download ==
+
== Alternate download for old version 5.1.3 ==
 
* Feesh's server seems down at the moment, a mirror can downloaded from [http://www.box.com/s/n5dmlncn0dicbsx4b16i here] (its not exactly a mirror copy but it should work) [[User:Owen|Owen]] 09:31, 22 March 2012 (CET)
 
* Feesh's server seems down at the moment, a mirror can downloaded from [http://www.box.com/s/n5dmlncn0dicbsx4b16i here] (its not exactly a mirror copy but it should work) [[User:Owen|Owen]] 09:31, 22 March 2012 (CET)
 
* If you'd just like the development files they can be found [http://www.2shared.com/file/-2meQZx6/lua-wii.html here].
 
* If you'd just like the development files they can be found [http://www.2shared.com/file/-2meQZx6/lua-wii.html here].
15

edits

Navigation menu