mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-27 16:39:29 +00:00
README rewrite
This commit is contained in:
parent
5888ee3810
commit
f118baa37c
1 changed files with 71 additions and 10 deletions
81
README.md
81
README.md
|
|
@ -1,25 +1,86 @@
|
||||||
# ctrµLua
|
# ctrµLua
|
||||||
|

|
||||||
Everything is in the Wiki.
|
|
||||||
|
|
||||||
Warning: the 'u' in the repo's name is a 'µ', not a 'u'.
|
Warning: the 'u' in the repo's name is a 'µ', not a 'u'.
|
||||||
|
|
||||||
|
### Users part
|
||||||
|
|
||||||
|
#### How to install
|
||||||
|
|
||||||
|
* Download ctruLua.zip from the [releases](https://github.com/ctruLua/ctruLua/releases) (for something stable) or the [CI server](http://ci.reuh.tk/ctrulua) (for more features)
|
||||||
|
* Unzip it on your SD card, in a folder inside your homebrews folder; if you use HBL, extract it in `/3ds/ctrulua/`
|
||||||
|
* Put some scripts wherever you want, just remember where
|
||||||
|
* Launch CtrµLua from your homebrew launcher
|
||||||
|
* Use the shell to run your scripts
|
||||||
|
|
||||||
|
### Homebrewers part
|
||||||
|
|
||||||
#### Builds 
|
#### Builds 
|
||||||
|
|
||||||
* Most recent working build: [here](http://ci.reuh.tk/ctrulua/builds/latest/artifacts/ctruLua.3dsx) (warning: only tested with Citra, sometimes on real hardware).
|
* Most recent working build: [ctruLua.3dsx](http://ci.reuh.tk/ctrulua/builds/latest/artifacts/ctruLua.3dsx)
|
||||||
* See http://ci.reuh.tk/ctrulua for all the builds.
|
* See [http://ci.reuh.tk/ctrulua](http://ci.reuh.tk/ctrulua) for all the builds.
|
||||||
|
|
||||||
|
#### Hello world
|
||||||
|
|
||||||
|
```Lua
|
||||||
|
local ctr = require("ctr")
|
||||||
|
local gfx = require("ctr.gfx")
|
||||||
|
local hid = require("ctr.hid")
|
||||||
|
|
||||||
|
while ctr.run() do
|
||||||
|
hid.read()
|
||||||
|
local keys = hid.keys()
|
||||||
|
if keys.held.start then break end
|
||||||
|
|
||||||
|
gfx.start(gfx.TOP)
|
||||||
|
gfx.text(2, 2, "Hello, world !")
|
||||||
|
gfx.stop()
|
||||||
|
|
||||||
|
gfx.render()
|
||||||
|
end
|
||||||
|
```
|
||||||
|
This script will print "Hello, world !" on the top screen, and will exit if the user presses Start.
|
||||||
|
This is the "graphical" version; there's also a text-only version, based on the console:
|
||||||
|
```Lua
|
||||||
|
local ctr = require("ctr")
|
||||||
|
local gfx = require("ctr.gfx")
|
||||||
|
local hid = require("ctr.hid")
|
||||||
|
|
||||||
|
gfx.console()
|
||||||
|
print("Hello, world !")
|
||||||
|
|
||||||
|
while ctr.run() do
|
||||||
|
hid.read()
|
||||||
|
local keys = hid.keys()
|
||||||
|
if keys.held.start then break end
|
||||||
|
|
||||||
|
gfx.render()
|
||||||
|
end
|
||||||
|
|
||||||
|
gfx.disableConsole()
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Lua API Documentation
|
||||||
|
|
||||||
|
* An online version of the documentation can be found [here](http://reuh.tk/ctrulua)
|
||||||
|
* To build the documentation, run `make build-doc-html` (requires [LDoc](https://github.com/stevedonovan/LDoc)).
|
||||||
|
|
||||||
|
### Developers part
|
||||||
|
|
||||||
#### Build instructions
|
#### Build instructions
|
||||||
|
|
||||||
* Setup your environment as shown here : http://3dbrew.org/wiki/Setting_up_Development_Environment
|
* Setup your environment as shown here : http://3dbrew.org/wiki/Setting_up_Development_Environment
|
||||||
* Clone this repository and run the command `make build-all` to build all the dependencies.
|
* Clone this repository and run the command `make build-all` to build all the dependencies.
|
||||||
* If you only made changes to ctrµLua, run `make` to rebuild ctµLua without rebuilding all the dependencies.
|
* If you only made changes to ctrµLua, run `make` to rebuild ctrµLua without rebuilding all the dependencies.
|
||||||
|
|
||||||
May not work under Windows.
|
May not work under Windows.
|
||||||
|
|
||||||
#### Lua API Documentation
|
### Credits
|
||||||
|
|
||||||
* An online version of the documentation can be found here : http://reuh.tk/ctrulua
|
* __Smealum__ and everyone who worked on the ctrulib: [https://github.com/smealum/ctrulib](https://github.com/smealum/ctrulib)
|
||||||
* To build the documentation, run `make build-doc` (requires [LDoc](https://github.com/stevedonovan/LDoc)).
|
* __Xerpi__ for the [sf2dlib](https://github.com/xerpi/sf2dlib), [sftdlib](https://github.com/xerpi/sftdlib) and [sfillib](https://github.com/xerpi/sfillib)
|
||||||
|
* __All the [Citra](https://citra-emu.org/) developers__
|
||||||
#### Based on ctrulib by smealum: [https://github.com/smealum/ctrulib](https://github.com/smealum/ctrulib)
|
* __Everyone who worked on [DevKitARM](http://devkitpro.org/)__
|
||||||
|
* __Nothings__ for the [stb](https://github.com/nothings/stb) libs
|
||||||
|
* Everyone who worked on the other libs we use
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue