mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-28 05:25:07 +00:00
112 lines
3.3 KiB
Plaintext
112 lines
3.3 KiB
Plaintext
Prerequisites:
|
|
|
|
You'll need to have these libraries (with equivalent devel versions) to build Wesnoth:
|
|
|
|
libsdl1.2.7
|
|
libsdl-image1.2 (with png support)
|
|
libsdl-mixer1.2 (with Vorbis support)
|
|
libsdl-net
|
|
libsdl-ttf2.0.8
|
|
libz
|
|
boost_iostreams >= 1.33.0
|
|
boost_regex >= 1.33.0
|
|
|
|
You will need the following tools:
|
|
|
|
python2.4
|
|
scons
|
|
|
|
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 .
|
|
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.
|
|
|
|
Sourcecode:
|
|
|
|
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
|
|
|
|
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 debug=yes 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 the deprecated autotools build:
|
|
|
|
The autotools build machinery is deprecated, unsupported, and will be
|
|
removed in a future release. You will need autoconf (>= 2.60) and
|
|
automake (>= 1.9). Run './autogen.sh' to generate the configure
|
|
files. Then
|
|
|
|
$ ./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
|
|
|