-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathINSTALL
83 lines (59 loc) · 2.94 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
1. Dependencies
---------------
Requires libglib2.0-dev, ctags, openssl, cmake, libwebsockets4.3.3, npm, libjson-c-dev
on debian 12-
`apt-get install gcc libglib2.0-dev exuberant-ctags openssl cmake npm libjson-c-dev libsqlite3-dev pkg-config`
1.a Libwebsockets
-----------------
Libwesockets in debian 11 is the wrong version, and in debian 12
doesn't have the required options compiled in. So, you've got to get the code
from https://libwebsockets.org/repo/libwebsockets and rebuild it.
Note that for the cmake step....
# -DLWS_IPV6=ON because in deb 11 at least, that wasn't the default.
# -DLWS_WITHOUT_EXTENSIONS=0 enables permessage deflate, and IS REQUIRED by LociTerm
# -DLWS_WITH_LIBUV=ON to enable libuv loop timers, and IS REQUIRED by LociTerm
# -DLWS_WITH_EVENT_LIBS=ON to enable event libraries, and IS REQUIRED by LociTerm
# -DCMAKE_BUILD_TYPE=DEBUG will make a debug image of libwebsockets. Not normally used.
cd ~/othercode
git clone --branch v4.3.3 https://libwebsockets.org/repo/libwebsockets
cd libwebsockets
mkdir build
cd build
cmake -DLWS_IPV6=ON -DLWS_WITH_ZLIB=ON -DLWS_WITHOUT_EXTENSIONS=OFF -DLWS_WITH_LIBUV=ON -DLWS_WITH_EVENT_LIBS=ON ..
make
sudo make install
Tue Mar 11 12:48:46 AM EDT 2025
NOTE, libwebsockets main is working again as of commit
ef4a85d0e14270e83ce74213a0b4bb53e29a07be. I mostly use the main branch. -jsj
2. Building LOciTerm
--------------------
cd into the directory where you found this INSTALL file.
LociTerm will install into /usr/local by default. If you want it somewhere
else, edit the makefile. (you may also have to edit lociterm.service use the
correct paths)
To build type "make".
The makefile will run npm to install the packages required by the client, build
the lociterm javascript client files, and then locid proxy binary.
Assuming all went well...
The build will place a test launcher into the top level directory that uses a
set of default server options. Try running "./lociterm" to test launching
lociterm on port 4500. The launcher should also open a new browser window or
tab to the correct url. Lociterm will try to connect to a default game running
on localhost 4000.
If that worked, great!
To install lociterm on the system, do "make install".
"make certs" to make some self signed ones if you don't have real ones.
"make systemd" to make locid run as lociterm.service at boot time.
Edit the locid.conf file (installed as /usr/local/etc/locid.conf by default)
and edit any parameters as described in the config file.
3. Proxy rules for apache2
--------------------------
Apache2 can be configured to make LociTerm's webserver available under a normal looking apache url.
To add proxy rules to apache2:
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule .* "wss://localhost:4005%{REQUEST_URI}" [P]
ProxyPass /lociterm https://localhost:4005/
ProxyPassReverse /lociterm https:///localhost:4005/
ProxyRequests off