mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-26 16:23:17 +00:00
226 lines
7.6 KiB
Plaintext
226 lines
7.6 KiB
Plaintext
Prerequisites:
|
|
|
|
You'll need to have these libraries (with equivalent devel versions) to build Wesnoth:
|
|
|
|
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
|
|
boost_iostreams >= 1.33.0
|
|
boost_regex >= 1.33.0
|
|
|
|
You will need the following tools:
|
|
|
|
python >=2.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 . SCons can be found
|
|
at http://www.scons.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
|
|
|
|
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 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 [EPREFIX/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 [PREFIX/lib]
|
|
--includedir=DIR N/A
|
|
--oldincludedir=DIR N/A
|
|
--datarootdir=DIR N/A
|
|
--datadir=DIR datadir=DIR [PREFIX/share]
|
|
--infodir=DIR N/A
|
|
--localedir=DIR localedir=DIR [PREFIX/share/locale]
|
|
--mandir=DIR mandir=DIR [PREFIX/share/man]
|
|
--docdir=DIR docdir=DIR [PREFIX/share/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 debug=yes
|
|
--enable-profile profile=yes
|
|
--enable-tests (See --help documentation on choice of targets)
|
|
--enable-static static=yes
|
|
--disable-python python=no
|
|
--enable-python-install N/A
|
|
--enable-lite N/A
|
|
--enable-tinygui gui=tiny
|
|
--enable-smallgui gui=small
|
|
--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] datadir=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
|
|
|
|
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
|
|
|