Difference between revisions of "CompilingWesnoth"

From The Battle for Wesnoth Wiki
m (Compiling: added example of --with-preferences-dir)
(Prerequisites)
Line 33: Line 33:
 
You can also get them from Freshmeat at
 
You can also get them from Freshmeat at
 
http://freshmeat.net/projects/wesnoth -> Dependencies -> Download links
 
http://freshmeat.net/projects/wesnoth -> Dependencies -> Download links
 +
 +
For Ubuntu Breezy Badger (5.10) the following will satisfy those dependencies.
 +
apt-get libsdl1.2 libsdl-image1.2 libsdl-mixer1.2 libsdl-net1.2 gettext libfreetype6
 +
 +
For Ubuntu Dapper Drake (6.06) the following will satisfy those dependencies
 +
apt-get libsdl1.2debian-all libsdl-image1.2 libsdl-mixer1.2 libsdl-net1.2 gettext libfreetype6
  
 
==  Sourcecode  ==
 
==  Sourcecode  ==

Revision as of 13:28, 9 June 2006

[edit]Compiling Wesnoth

Platforms
Tools

Compiling Wesnoth

This page covers compilation on a Unix-like system. See also:

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.

Prerequisites

You need to have the development packages of these libraries to build Wesnoth. You will also need the runtime packages to actually run Wesnoth.

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

For Ubuntu Breezy Badger (5.10) the following will satisfy those dependencies.

apt-get libsdl1.2 libsdl-image1.2 libsdl-mixer1.2 libsdl-net1.2 gettext libfreetype6

For Ubuntu Dapper Drake (6.06) the following will satisfy those dependencies

apt-get libsdl1.2debian-all libsdl-image1.2 libsdl-mixer1.2 libsdl-net1.2 gettext libfreetype6

Sourcecode

You can get it here:

Compiling

First untar the package:

$ tar xfzv wesnoth-1.x.tar.gz

then

$ 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

$ ./autogen.sh

Once you have unpacked the source and uninstalled the old version,

$ ./configure

(you might want extra arguments to configure, for instance to build the map editor or to install with prefix). Finally, compile with

$ make

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

- If you would like to keep a version separated from other versions you could:

$ ./configure --prefix=/opt/games/wesnoth-dev --with-preferences-dir=/opt/games/wesnoth-dev/prefs

Installing

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

See also