Update README.md

This commit is contained in:
James Coon 2016-01-10 11:40:14 -07:00
parent 70bf298e8b
commit a53c879848

View File

@ -4,41 +4,51 @@ OCEmu - OpenComputers Emulator
Installation Installation
------------ ------------
Needs luafilesystem, utf8, and luaffi. Needs lua-5.2, luafilesystem, utf8, luaffi, and SDL2.
luasocket is optional but is required for the Internet Component and higher precision timing. luasocket is optional but is required for the Internet Component and higher precision timing.
luasec is optional but is required for HTTPS. luasec is optional but is required for HTTPS.
**Ubuntu**
``` ```
luarocks-5.2 install luafilesystem apt-get install lua5.2 liblua5.2-dev libsdl2-dev subversion
luarocks-5.2 install utf8 ```
luarocks-5.2 install luasocket Install a versioned luarocks for 5.2 as described in: http://stackoverflow.com/a/20359102
luarocks-5.2 install luasec ```
git clone https://github.com/gamax92/luaffi.git # Download and unpack the latest luarocks from: http://luarocks.org/releases
cd luaffi ./configure --lua-version=5.2 --lua-suffix=5.2 --versioned-rocks-dir
make make build
sudo cp ffi.so /appropriate/path/for/lua/libraries/ sudo make install
```
Follow the luarocks steps below.
# OpenComputer's lua source code is not provided, if you have svn then use the provided Makefile **Mac**
# If you hate svn, manually download assets/loot, assets/lua, and assets/unifont.hex into src/
```
Mac users can get up and running quickly by using [brew](http://brew.sh/). Mac users can get up and running quickly by using [brew](http://brew.sh/).
Brew installs luarocks as part of the lua package. Brew installs luarocks as part of the lua package.
``` ```
#run this before the luarocks install steps above # Run this before the luarocks install steps below
brew install lua brew install lua
brew install sdl2 brew install sdl2
``` ```
At this point, follow the luarock steps above. Then build luaffi as instructed. Then: Follow the luarocks steps below.
**Lua Libraries**
``` ```
#at the time of this writing, the path is for version 5.2 luarocks-5.2 install luafilesystem
sudo cp ffi.so /usr/local/lib/lua/5.2/ luarocks-5.2 install utf8
luarocks-5.2 install luasocket
luarocks-5.2 install luasec
luarocks-5.2 install --server=http://luarocks.org/dev luaffi
# OpenComputer's lua source code is not provided, if you have svn then use the provided Makefile
# If you hate svn, manually download assets/loot, assets/lua, and assets/unifont.hex into src/
``` ```
**Windows**
Windows users will have to manually compile everything, as luarocks seems to hate MSYS2/Cygwin Windows users will have to manually compile everything, as luarocks seems to hate MSYS2/Cygwin
The provided script ```msys2_setup_ocemu.sh``` will automated the compiling process for Windows, run it in [MSYS2](https://msys2.github.io/) The provided script ```msys2_setup_ocemu.sh``` will automated the compiling process for Windows, run it in [MSYS2](https://msys2.github.io/)
@ -50,15 +60,13 @@ Running
Launch boot.lua with lua5.2, and provided everything is installed, you'll have a working Emulator. OCEmu stores its files in $HOME/.ocemu or %APPDATA%\\.ocemu, whichever happens to exist first. Launch boot.lua with lua5.2, and provided everything is installed, you'll have a working Emulator. OCEmu stores its files in $HOME/.ocemu or %APPDATA%\\.ocemu, whichever happens to exist first.
``` ```
cd src/ cd src
lua boot.lua lua boot.lua
``` ```
If you want to use a custom path (for example, for running multiple machines with unique filesystems) you can specify the machine path as an argument to boot.lua:
If you want to use a custom path (for example, for running multiple machines with unique filesystems) you can specify the machine path as an argument to boot.lua.
``` ```
cd src/ cd src
lua boot.lua /path/to/my/emulated/machine_a lua boot.lua /path/to/my/emulated/machine_a
``` ```