forked from freeciv/freeciv-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
160 lines (98 loc) · 4.85 KB
/
README
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
THE FREECIV.NET PROJECT - http://www.freeciv.net
------------------------------------------------
Freeciv.net is an open-source turn-based strategy game. It’s built entirely in HTML5
and features in-depth game-play and a wide variety of game modes and options. Your goal is
to build cities, collect resources, organize your government, and build an army, with the
ultimate goal of creating the best civilization. You can play online against other players
(multiplayer) or play by yourself against the computer.
This is yet another rewrite of the Freeciv web client, which
will make it possible to play Freeciv in your web browser.
Freeciv.net is is free and open source software. The Freeciv C server is released under
the GNU General Public License, while the Freeciv.net web client is released
under the GNU Affero General Public License. See LICENSE.txt for details.
Contact: Andreas Røsdal - andrearo@pvv.ntnu.no
Overview
--------
The Freeciv Web client consists of these components:
* freeciv - a fork of the main Freeciv C client and server.
* freeciv-proxy - a HTTP proxy which allows web client users
to connect to Freeciv civservers. The proxy is a HTTP and WebSocket
server, and proxy between web browsers and civservers.
* freeciv-web - a Java web application for the Freeciv web client.
This application is a AJAX application which consists of HTML,
Javascript, images and JSP files which make up the application
viewed in each user's web browser.
* freeciv-img-extract - extracts the images of the Freeciv tileset,
and generates a version for the web. This produces a tileset PNG
and Javascript. Run this to sync with the upstream Freeciv SVN
repository.
* publite2 - a simple way to launch multiple civservers.
* freeciv-music - contains music which can be played during the game.
System Requirements
-------------------
- Resin 4.0.18 - http://www.caucho.com/
- Java 1.6.0 SDK - http://java.sun.com/javase/downloads/index.jsp
- Python 2.7 - http://www.python.org/
- Python Imaging Library (PIL) - http://www.pythonware.com/products/pil/
(required for freeciv-img-extract)
- Mysql 5.0.x - http://www.mysql.com/
- Maven 2 - http://maven.apache.org/download.html
- Probably some Linux distribution.
- Firefox
- Firebug for debugging - http://getfirebug.com/
- Closure Compiler - http://code.google.com/intl/nb/closure/compiler/
(Bundled in source code, no need to download.)
- curl-7.19.7 - http://curl.haxx.se/
- OpenSSL - http://www.openssl.org/
- nginx 1.0.0 - http://nginx.org/
- pngcrush, required for freeciv-img-extract. http://pmt.sourceforge.net/pngcrush/
- TornadIO2 - https://github.com/MrJoes/tornadio2
- Tornado 2.1.1 - http://www.tornadoweb.org/
- GLib 2.16.0 or newer - http://ftp.gnome.org/pub/GNOME/sources/glib/2.16/
- Jansson 2.1.1 - http://www.digip.org/jansson/
Compiling and running the Freeciv Web client
---------------------------------
To compile and run Freeciv.net on Ubuntu,
1. Checkout Freeciv.net from github to ~/freeciv-build
2. Update username/password and run: ~/freeciv-build/freeciv.net-bootstrap.sh
On other Linux distributions, follow this installation procedure:
0. Checkout Freeciv.net from github to ~/freeciv-build
1. Install the system requirements.
2. Create mysql database called 'freecivmetaserver'
Import mysql dump into a MySQL database from: /publite2/mysqldump.sql.bz2
3. Build and configure freeciv-web.
- Edit /freeciv-web/src/main/webapp/freecivmetaserve/php_code/settings.php.dist,
rename this file to settings.php, and update values for fcdb_username and fcdb_pw
to your MySQL username and password.
- Edit /freeciv-web/src/main/webapp/WEB-INF/resin-web.xml.dist, rename this
file to resin-web.xml, and update the values for your MySQL database.
- Run 'build.sh' in the freeciv-web directory
4. Compile and install Freeciv. This involves running the following commands:
cd freeciv
./autogen.sh --enable-client=no
make
make install (as root user)
Create the Freeciv savegame directory: /mnt/savegames
and make it writeable by the user running publite.
5. Start resin with these commands:
cd ~/freeciv-build/resin/bin
./resin.sh start
6. Start publite2:
Run publite2_single.py in the publite2 directory.
7. Run the freeciv-proxy:
Run run.sh in the freeciv-proxy directory.
To debug, check the proxy debugging page:
http://localhost/civ/status
http://localhost:8082/civ/status
8. Start nginx on port 80 as root.
9. Start the web client in your browser:
Point your web browser to http://localhost/
10. Continue to play the game.
FIXME: Had to add -lssl when compiling server...
Also:
Set ulimit -n 65535 in /etc/profile
and add some TCP/IP tuning in /etc/sysctrl.conf
Developers interested in Freeciv.net
------------------------------------
If you want to contibute to Freeciv.net, see the TODO file for
some tasks you can work on.