This page covers compilation on a Unix-like system. See also:
- Compiling Wesnoth on Windows
- Compiling Wesnoth on Mac OS X
- Wesnoth on Linux PDAs
- Compiling Wesnoth on SuSE -For install on SuSE 10.0
Forcemstr has cross compiled for Windows using the free mingw32 tools, running under Linux.
Here's documentation of another cross compilation attempt: CompilingWesnoth/CrossCompiling
For detailed instructions and full prerequisites, please consult the current INSTALL file in the source code.
You need to have the development packages of these libraries to build Wesnoth. You will also need the runtime packages to actually run Wesnoth.
- libsdl1.2 ( http://www.libsdl.org ) (SDL >= 1.2.7 strongly recommended)
- libsdl-image1.2 (with PNG support) ( http://www.libsdl.org/projects/SDL_image )
- libsdl-mixer1.2 (with Vorbis support) ( http://www.libsdl.org/projects/SDL_mixer )
- libsdl-net ( http://www.libsdl.org/projects/SDL_net )
- libintl (and other libraries found in gettext package) ( http://www.gnu.org/software/gettext/gettext.html )
- (only Wesnoth 0.8.5 or older) libsdl-ttf2.0 ( http://www.libsdl.org/projects/SDL_ttf )
- (newer than Wesnoth 0.8.5) libfreetype2 ( http://www.freetype.org )
The various SDL libraries can be found at http://www.libsdl.org
You can also get them from Freshmeat at http://freshmeat.net/projects/wesnoth -> Dependencies -> Download links
You can get it here:
First untar the package:
$ tar xfzv wesnoth-1.x.tar.gz
$ cd wesnoth-1.x
If you have an older install, first uninstall that by typing:
$ make uninstall
(It's possible that you'll need root privileges to uninstall. To do this, check the Installing section.)
If you have downloaded from svn run autogen.sh
Once you have unpacked the source and uninstalled the old version,
(you might want extra arguments to configure, for instance to build the map editor or to install with prefix). Finally, compile with
Note: Users compiling SVN sources should 'make clean' before 'make' after any tree update.
- You can pass certain options to configure by the way, see the following example:
$ ./configure --prefix=/opt/games/wesnoth-1.1.4 --enable-editor
Become superuser, so that you have permission to install.
$ su Password: /*doesn't show*/
Now that you have permission, install it.
# make install
or for smaller binaries,
# make install-strip