2014-01-01 14:11:40 -05:00
|
|
|
===== RLGWebD =====
|
|
|
|
|
|
|
|
|
|
RLGWebD is a node.js app that enables playing roguelike games in the
|
|
|
|
|
browser. It is intended to be compatible with dgamelaunch.
|
|
|
|
|
|
|
|
|
|
Node
|
|
|
|
|
---
|
|
|
|
|
RLGWebD currently works with Node v0.10.
|
|
|
|
|
|
|
|
|
|
It requires the 'posix', 'pty.js', and 'websocket' modules.
|
|
|
|
|
|
|
|
|
|
Installation
|
|
|
|
|
---
|
2014-03-09 16:15:42 -07:00
|
|
|
RLGWebD expects to be run in a chroot used by dgamelaunch, and it makes
|
2014-01-01 14:11:40 -05:00
|
|
|
some assumptions about the configuration. It expects the dgamelaunch
|
|
|
|
|
playground to be at /dgldir inside the chroot. It expects the
|
|
|
|
|
in-progress files to be in /dgldir/inprogress/<gamename>. RLGWebD
|
|
|
|
|
creates in-progress files in those locations, and dgamelaunch must be
|
|
|
|
|
patched to prevent it from deleting them.
|
|
|
|
|
|
|
|
|
|
It needs the devpts filesystem mounted inside the chroot. This can be
|
|
|
|
|
done with a line in /etc/fstab like the following:
|
|
|
|
|
devpts CHROOT/dev/pts devpts newinstance,ptmxmode=666 0 0
|
|
|
|
|
|
|
|
|
|
It creates a socket in the filesystem which is used to control the
|
|
|
|
|
server.
|
|
|
|
|
|
2014-03-09 16:15:42 -07:00
|
|
|
The following files need to be copied into CHROOT/var/www:
|
|
|
|
|
about.html
|
|
|
|
|
bell.svg
|
2015-01-14 15:32:21 -05:00
|
|
|
index.html
|
2014-03-09 16:15:42 -07:00
|
|
|
options.html
|
|
|
|
|
options.js
|
|
|
|
|
rlgterm.js
|
|
|
|
|
style-rlg.css
|
|
|
|
|
termemu.js
|
|
|
|
|
termemu-keys.js
|
|
|
|
|
tty.css
|
|
|
|
|
|
2014-01-01 14:11:40 -05:00
|
|
|
sqlickrypt
|
|
|
|
|
---
|
|
|
|
|
RLGWebD uses a separate program written in C to operate on the
|
|
|
|
|
dgamelaunch user database. Compile this with:
|
|
|
|
|
cc -o sqlickrypt sqlickrypt.c -lcrypt -lsqlite3
|
|
|
|
|
|
|
|
|
|
The binary should be placed in /bin inside the chroot. It requires
|
|
|
|
|
libcrypt and libsqlite3 to be installed in the chroot. Depending on
|
|
|
|
|
your system, these may have other dependencies. Make sure to check by
|
|
|
|
|
running ldd.
|
|
|
|
|
|
|
|
|
|
sqlickrypt needs /dev/urandom to exist in the chroot. Run as root:
|
|
|
|
|
mknod CHROOT/dev/urandom c 1 9
|
|
|
|
|
|
2015-01-14 15:32:21 -05:00
|
|
|
dglwatcher
|
|
|
|
|
---
|
|
|
|
|
RLGWebD uses another C program to monitor the inprogress directories, because
|
|
|
|
|
Node's fs.watch() can't distinguish between file creation and deletion.
|
|
|
|
|
|
|
|
|
|
Compile with
|
|
|
|
|
cc -o dglwatcher dglwatcher.c
|
|
|
|
|
and copy into CHROOT/bin.
|
|
|
|
|
|
|
|
|
|
Starting and stopping RLGWebD
|
2014-01-01 14:11:40 -05:00
|
|
|
---
|
|
|
|
|
Run the 'rlgwebd' shell script as root.
|
|
|
|
|
|
|
|
|
|
Stop by passing 'stop' as an argument. (This requires socat to be
|
|
|
|
|
installed.)
|
2014-03-09 16:15:42 -07:00
|
|
|
|
|
|
|
|
webtty
|
|
|
|
|
---
|
|
|
|
|
webtty.js is a Node app which uses the terminal emulator to run a shell. It
|
|
|
|
|
includes NO SECURITY WHATSOEVER and should only be used for testing the
|
|
|
|
|
terminal emulator. Copy index-sh.html to index.html before running it.
|