Next: Extra maps, Previous: Getting the game, Up: User's manual

### 2.3 Installation

This section covers installation from source. Other ways of installing the program are not described here.

#### 2.3.1 Requirements

All these libraries are mandatory to compile the game. Liquid War 6 won't compile, let alone run, without them. Some of them could probably be replaced by equivalent tools, but this would certainly require a programming effort and some changes in Liquid War 6 source code.

- GCC. Liquid War 6 does require the GNU C Compiler to build, while other compilers might be able to build the game, this is untested.
- Gomp. Liquid War 6 uses OpenMP `#pragma` directives, this should help the game run faster on SMP systems.
- GNU Make. Liquid War 6 might and certainly does use GNU Make extensions.
- GNU C library. Sounds obvious, but you need a standard C library. It happens that glibc has some rather usefull extensions (yes, as of 2006, some vendors continue to offer C libraries without `snprintf`...) and Liquid War 6 might use them. In a general manner, Liquid War 6 is part of and designed for GNU. You might however manage to compile it with limited libc support, this is the case with mingw32 for instance but, do it at your own risk.
- Perl. Some Makefile commands require Perl. You don't need any Perl devel packages, and you can probably use any Perl 5.x version, since no fancy recent feature of Perl is used. Just plain Perl.
- Guile. Possibly the most required library, since Liquid War 6 is a scheme program which uses a set of functions coded in standard C. You need at least Guile 1.8.
- GNU MP. GMP is a free library for arbitrary precision arithmetic, required by Guile.
- ltdl. This library, which comes with libtool, provides a portable alternative to `dlopen` and `dlclose`. Check that you have a `/usr/include/ltdl.h` file, or install the corresponding package.
- zlib. Required by other libraries, but can also be used directly by Liquid War 6 to compress network messages for instance.
- expat. Used to read and write XML files, which contain constants and configuration data.
- libpng. Liquid War 6 uses libpng to read levels (maps), not to speak of other optional libraries (SDL and the rest) who need it themselves.
- libjpeg. Maps can also be provided as jpeg files, so libjpeg is required as well.
- SQLite 3. Used to handle the list of available servers.

#### 2.3.2 Optional libraries

While all these libraries are theorically optional (the game will successfully compile without them), you'll obviously need, for instance, one graphics backend. Otherwise, you'll simply have no display. This is not acceptable. As of today, one can reasonnably consider all SDL-related libraries are required. The rest is truely optional.

- ncurses. Required by readline, needs to be there otherwise readline might not be detected properly on some systems.
- GNU readline. Used to handle input on the console. Console is not absolutely mandatory, but it's a must-have if you want to hack the game. Console unavailable does not mean you won't get anything on stdout but, the interactive script shell just won't work.
- GTK+. Used to display error/critical messages, so that users who launch the game by clicking on a icon (that is, not from the console) are still visually informed of important messages.
- Mesa. This library provides an API similar to OpenGL and enables 2-D and 3-D drawing.
- SDL. SDL is used to set up a working OpenGL environnement, and handle input (mouse and keyboard).
- SDL_image. This SDL extension is used to read textures and other graphics from disk.
- FreeType 2. This library is required by SDL_ttf, to draw fonts.
- SDL_ttf. This SDL extension is used to draw fonts. It is UTF-8 enabled.
- libcsound. While this tool is not used yet, it is meant to be the final sound backend, as CSounds offers great power to the composer, enabling truely dynamically generated sound & music. For now Liquid War 6 tries to detect csound 4 but as the mainstream stable release is now 5 an update is needed. It will probably be updated/fixed (Liquid War 6 using csounds 5) some day, for now you can safely *not* install csound on your system and enjoy all the possibilities of the game.
- SDL_mixer. This SDL extension is used to allow dynamic mixing of sounds, and it also provides a builtin `OGG/Vorbis` file renderer.
- libcURL. Used to handle HTTP requests, the idea being not to re-invent the wheel but use a robust standards-compliant generic library.

#### 2.3.3 Installing requirements using RPM/DEB packages

You might find it convenient not to install all the requirements from source, but use your favorite GNU/Linux distribution packages.

On an RPM based GNU/Linux system, a typical command (tested with Fedora 15 “Lovelock”) could be:

         yum install \
         make gcc glibc glibc-devel binutils \
         libgomp \
         guile guile-devel gmp gmp-devel \
         libtool libtool-ltdl libtool-ltdl-devel \
         zlib zlib-devel expat expat-devel \
         libpng libpng-devel libjpeg libjpeg-devel \
         sqlite sqlite-devel \
         ncurses ncurses-devel readline readline-devel \
         libGL libGL-devel libGLU libGLU-devel \
         SDL SDL-devel SDL_image SDL_image-devel \
         SDL_mixer SDL_mixer-devel \
         freetype freetype-devel SDL_ttf SDL_ttf-devel \
         libcurl libcurl-devel \
         perl lcov global valgrind graphviz gv texinfo-tex \
         gtk2-devel rpm-build

On a DEB package based GNU/Linux system this command (tested with Debian 6.0 “squeeze”) would be:

         apt-get install \
         make gcc libc6 libc6-dev binutils \
         libgomp1 \
         guile-1.8 guile-1.8-dev guile-1.8-libs libgmp3c2 libgmp3-dev \
         libtool libltdl7 libltdl-dev \
         zlib1g zlib1g-dev libexpat1 libexpat1-dev \
         libpng12-0 libpng12-dev libjpeg8 libjpeg-dev \
         libsqlite3-0 libsqlite3-dev \
         libncurses5 libncurses5-dev libreadline6 libreadline6-dev \
         libgl1-mesa-glx libgl1-mesa-dri libgl1-mesa-dev libglu1-mesa libglu1-mesa-dev \
         libsdl1.2debian libsdl1.2-dev libsdl-image1.2 libsdl-image1.2-dev \
         libsdl-mixer1.2 libsdl-mixer1.2-dev \
         libfreetype6 libfreetype6-dev libsdl-ttf2.0-0 libsdl-ttf2.0-dev \
         libcurl4-gnutls-dev \
         perl lcov global valgrind graphviz gv \
         texinfo texlive-base texlive-generic-extra \
         libgtk2.0-dev debhelper

Note that those requirements really depend on the exact distribution you have, package names may vary from one to another.

#### 2.3.4 Compiling

Liquid War 6 uses GNU Automake, Autoconf and GNU Libtool.

Once all the requirements are installed, run:

         ./configure
         make
         make install

Liquid War 6 supports the standard `./configure --prefix=/my/path` option (in fact, it supports much more than that) so you can install the game in any directory. You do not need to be `root` to install Liquid War 6.