forked from wesnoth/wesnoth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
285 lines (216 loc) · 8.91 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
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
Contents:
1. Prerequisites
2. Common instructions
3. Scons build
4. CMake build
5. Autotools build
1. Prerequisites:
You'll need to have these libraries (with equivalent devel versions) to build Wesnoth:
boost_iostreams >= 1.33.0
boost_regex >= 1.33.0
libfontconfig >= 2.4.2
libpango (with cairo backend) >= 1.14.8
libsdl >= 1.2.7
libsdl-image >= 1.2 (with png support)
libsdl-mixer >= 1.2 (with Vorbis support)
libsdl-net
libsdl-ttf >= 2.0.8
libz
There are currently three ways to build wesnoth:
* The old autotools system
* scons
* cmake (still incomplete, but most stuff works)
2. Common steps:
In the future, autotools will probably be replaced with either scons or cmake.
Once scons and cmake are complete all build systems will be evaluated and
one build system will be chosen as the official build system.
SDL* libraries can be found at: http://www.libsdl.org
libfreetype can be found at: http://www.freetype.org
Python can be found at: http://www.python.org
Pango can be found at: http://www.pango.org/
The boost libraries can be found at: http://www.boost.org
You will also need to have a working installation of GNU gettext to build the
translations.
Note: It has been reported (see https://gna.org/bugs/index.php?10326)
that under gcc 3.3.6 you need to turn off optimizations or you will
get a build that doesn't work for multiplayer. We recommend building
with gcc 4.
If you see lots of messages like "Type 'svnversion --help' for usage.",
you have a Subversion client installed but it is not implementing the
-n option of svnversion. Time to update it.
Source-code:
You can get it here:
http://www.wesnoth.org/downloads
Compiling:
First untar the package:
$ tar xfjv wesnoth-x.y.z.tar.bz2
then
$ cd wesnoth-x.y.z
3. Scons build
SCons can be found at http://www.scons.org/ .
Simply type 'scons' in the top-level directory to build the game and
editor. It is possible to select individual targets by naming them as
scons arguments, including wesnothd (the Wesnoth multiplayer server)
and campaignd (the campaign server).
scons takes a prefix= argument that says where to install the game
and its data. The prefix defaults to /usr/local; for production builds
you may want to set prefix=/usr.
The target 'all' is equivalent to 'wesnoth wesnoth_editor cutter
exploder wesnothd campaignd'.
So, for example, this builds game, editor, and campaign server,
enabling debugging on all:
scons build=debug wesnoth wesnoth_editor campaignd
To build wesnothd:
scons server_uid=<user> server_group=<group> wesnothd
where <user> and <group> are valid on your system. A wesnothd
subdirectory will be created under /var/run owned by
<user>:<group>. This is relevant if you want to be able to communicate
with wesnothd through a FIFO or named socket. You have to run
wesnothd with the user specified while configuring in order for it to
work. You can also specify the FIFO directory directly by using
fifodir=<directory>.
If you want to install several versions of wesnoth you should use the
prefsdir= parameter to get distinct preferences directories. The
default is '.wesnoth'.
Installation productions 'install', 'install-wesnoth_editor',
'install-wesnothd' and 'install-campaignd' are available.
A plain 'install' installs all binary executables that exist -- so
'scons install' after a plain 'scons' installs game and editor, but
after 'scons all' it will install all binaries.
Notes on scons for autotools users
The scons build process works in a different way than configure. It runs
in one step, checking your configuration amnd building, rather than (as
autotools does) generating makefiles to be run later. So not all autotools
options have exact scons equivalents.
But here is a translation key, autotools configure options on the left
and scons command-line options on the right. Defaults are given in square
brackets, and are the same as those for corresponding configure options.
Configure options with no scons equivalents are marked N/A
Configuration:
-h, --help --help
--help=short N/A
--help=recursive N/A
-V, --version -v, --version
-q, --quiet, --silent -Q
--cache-file=FILE N/A
-C, --config-cache N/A
-n, --no-create -n, --no-create, --just-print, --dry-run, --recon
--srcdir=DIR N/A
Installation directories:
--prefix=PREFIX prefix=PREFIX [/usr/local]
--exec-prefix=EPREFIX N/A
Fine tuning of the installation directories:
--bindir=DIR bindir=DIR [bin]
--sbindir=DIR N/A
--libexecdir=DIR N/A
--sysconfdir=DIR N/A
--sharedstatedir=DIR N/A
--localstatedir=DIR N/A
--libdir=DIR libdir=DIR [lib]
--includedir=DIR N/A
--oldincludedir=DIR N/A
--datarootdir=DIR datarootdir=DIR [share]
--datadir=DIR datadir=DIR [$datarootdir/$datadirname]
--infodir=DIR N/A
--localedir=DIR localedir=DIR [$datarootdir/locale]
--mandir=DIR mandir=DIR [$datarootdir/man]
--docdir=DIR docdir=DIR [$datarootdir/doc/wesnoth]
--htmldir=DIR N/A
--dvidir=DIR N/A
--pdfdir=DIR N/A
--psdir=DIR N/A
Program names:
--program-prefix=PREFIX N/A
--program-suffix=SUFFIX program_suffix=SUFFIX
--program-transform-name=PROGRAM N/A
X features:
--x-includes=DIR N/A
--x-libraries=DIR N/A
System types:
--build=BUILD N/A
--host=HOST N/A
--target=TARGET N/A
Optional Features:
--disable-FEATURE N/A (but see instances below)
--enable-FEATURE[=ARG] N/A (but see instances below)
--disable-nls nls=no
--disable-dependency-tracking N/A
--enable-dependency-tracking N/A
--disable-rpath N/A
--enable-debug build=debug
--enable-profile build=profile
--enable-tests (See --help documentation on choice of targets)
--enable-static static=yes
--enable-python-install N/A
--enable-lite N/A
--enable-tinygui gui=tiny
--enable-optipng N/A
--enable-lowmem lowmem=yes
--disable-game (See --help documentation on choice of targets)
--enable-server (See --help documentation on choice of targets)
--enable-campaign-server (See --help documentation on choice of targets)
--enable-editor (See --help documentation on choice of targets)
--enable-tools (See --help documentation on choice of targets)
--enable-dummy-locales dummy_locales=yes
--enable-internal-data internal_data=yes
--enable-raw-sockets raw_sockets=yes
--disable-desktop-entry desktop_entry=no
--disable-sdltest N/A
Optional Packages:
--with-PACKAGE[=ARG] N/A
--without-PACKAGE N/A
--with-gnu-ld N/A
--with-libiconv-prefix[=DIR] N/A
--without-libiconv-prefix N/A
--with-libintl-prefix[=DIR] N/A
--without-libintl-prefix N/A
--with-datadir-name[=DIR] datadirname=DIR
--with-localedir[=DIR] localedir=DIR
--with-fifodir fifodir=DIR
--with-server-uid server_uid=ID
--with-server-gid server_gid=ID
--without-fribidi fribidi=no
--with-preferences-dir prefsdir=DIR
--with-icondir[=DIR] icondir=DIR
--with-desktopdir[=DIR] desktopdir=DIR
--with-x N/A
--with-freetype-prefix=PFX N/A
--with-freetype-exec-prefix=PFX N/A
--with-boost=DIR boostdir=DIR boostlibdir=DIR boost_suffix=suffix(e.g. -gcc41-mt-1_35)
4. CMake build
To build with cmake, you need cmake >= 2.4-patch 8 . You can get cmake at
http://www.cmake.org .
There are two ways to build wesnoth with cmake: Inside the source tree or outside.
Out of source builds have the advantage that you can have builds with different options
from one source directory.
To build wesnoth out of source:
$ mkdir build && cd build
$ cmake ..
$ make
$ make install
To build wesnoth in the source directory:
$ cmake .
$ make
$ make install
To change build options, you can either pass the options on the command line:
$ cmake .. -DOPTION=value
or use the ccmake frontend which displays all options with their cached values.
$ ccmake ..
Build options:
!TODO!
Use "ccmake .." to view a list of all build options with help texts.
Debug builds:
Set CMAKE_BUILD_TYPE to "debug"
5. Autotools build
The .tar.bz2 file is distributed with a working set of configure files. They
are not in the SVN repository. Consequently, if you are building from
SVN, you will need autoconf (>= 2.60) and automake (>= 1.9). Run './autogen.sh'
then to generate the configure files.
$ ./configure
$ make
$ make install
as usual. See './configure --help' for all available options.
You should clean your existing wesnoth release build first with:
$ make distclean
If you want to clean your wesnoth SVN build do:
$ make maintainer-clean