User Tools

Site Tools


client:client_compiling

Building the Crossfire Client

This page provides information on building the GTKv2 client from source. Instructions for compiling the server are on a separate page.

Dependencies

The following dependencies are required to compile the client:

  • autoconf - automatic configure script builder
  • automake - Tool for generating GNU Standards-compliant Makefiles
  • cmake - cross-platform, open-source make system
  • flex - A fast lexical analyzer generator
  • gcc - GNU C compiler
  • libgd-tools - GD command line tools and example code
  • libgtk2.0-0 - GTK+ graphical user interface library
  • libgtk2.0-dev - Development files for the GTK+ library
  • libpng3 - PNG library - runtime
  • libtool - Generic library support script
  • make - An utility for Directing compilation
  • perl - Larry Wall's Practical Extraction and Report Language

The following (optional) dependencies are used for metaserver support:

  • libcurl3 - easy-to-use client-side URL transfer library (OpenSSL flavour)
  • libcurl4-openssl-dev - development files and documentation for libcurl (OpenSSL flavour)

The following (optional) dependencies are used for additional rendering modes:

  • libglade2-0 - library to load .glade files at runtime
  • libglade2-dev - development files for libglade
  • libsdl1.2-dev - Simple DirectMedia Layer development files
  • libsdl-image1.2-dev - Image loading library for Simple DirectMedia Layer 1.2, development files

Other (optional) dependencies:

  • cmake-curses-gui - curses based user interface for CMake (ccmake)
  • libsdl-mixer1.2-dev - Mixer library for Simple DirectMedia Layer 1.2, development files
  • lua5.1 - Simple, extensible, embeddable programming language

(Optional) To download source code for compiling the client:

  • subversion - Advanced version control system

As a quick reference for Debian and Ubuntu related distributions:

sudo apt-get install autoconf automake cmake flex gcc libgd-tools libgtk2.0-0 libgtk2.0-dev libpng3 libtool make perl libcurl3 libcurl4-openssl-dev libglade2-0 libglade2-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev lua5.1 subversion  

As a quick reference for openSUSE 64bit:

yast -i autoconf automake flex gcc libcurl4 libcurl-devel libSDL-devel libgda-tools libSDL_image-1_2-0 libSDL_image-devel libgtk-2_0-0 libglade-2_0-0 libglade2-devel libSDL2-2_0-0 libSDL2-devel libSDL_mixer-1_2-0 libSDL_mixer-devel libtool make subversion

Note: For x86_64 systems, do not mix 64-bit and 32-bit libraries unless it cannot be helped. For example, libsvn0 is a 32-bit library, but lib64svn0 is the 64-bit equivalent. The build process may fail in the linkage stage if a 32-bit library is linked during a 64-bit build.

Debian 8.1

Need to add contrib and non-free to sources.list

Need to add the following to sources.list as well:

deb http://http.us.debian.org/debian jessie main contrib non-free

For more details, see Example sources.list over at the Debian Wiki

The following dependencies are required to compile the client:

  • autoconf - automatic configure script builder
  • automake - Tool for generating GNU Standards-compliant Makefiles
  • cmake - cross-platform, open-source make system
  • flex - fast lexical analyzer generator
  • gcc - GNU C compiler
  • libgd-tools - GD command line tools and example code
  • libgtk2.0-0 - GTK+ graphical user interface library
  • libgtk2.0-dev - development files for the GTK+ library
  • libpng12-dev - PNG library - development
  • libtool - Generic library support script
  • make - utility for directing compilation
  • libcurl3 - easy-to-use client-side URL transfer library (OpenSSL flavour)
  • libcurl4-openssl-dev - development files and documentation for libcurl (OpenSSL flavour) *
  • libglade2-dev - development files for libglade
  • libsdl1.2-dev - Simple DirectMedia Layer development files
  • libsdl-image1.2-dev - Image loading library for Simple DirectMedia Layer 1.2, development files
  • libsdl-mixer1.2-dev - Mixer library for Simple DirectMedia Layer 1.2, development files
  • lua5.1 - Simple, extensible, embeddable programming language
  • subversion - Advanced version control system

A quick reference for Debian 8.1:

apt-get install autoconf automake cmake flex gcc libgd-tools libpng12-dev libtool make libcurl3 libcurl4-openssl-dev libglade2-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev lua5.1 subversion

Ubuntu 16.10 (Yakkety Yak)

Required dependencies to compile the GTK-v2 client for Ubuntu 16.10 (Yakkety Yak).

  • autoconf - automatic configure script builder
  • automake - Tool for generating GNU Standards-compliant Makefiles
  • cmake - cross-platform, open-source make system
  • flex - fast lexical analyzer generator
  • gcc - GNU C compiler
  • libgd-tools - GD command line tools and example code
  • libgtk2.0-0 - GTK+ graphical user interface library
  • libgtk2.0-dev - development files for the GTK+ library
  • libpng-dev - PNG library - development (version 1.6)
  • libtool - Generic library support script
  • make - utility for directing compilation
  • perl - Larry Wall's Practical Extraction and Report Language
  • libcurl3 - easy-to-use client-side URL transfer library (OpenSSL flavour)
  • libcurl4-openssl-dev - development files and documentation for libcurl (OpenSSL flavour)
  • libglade2-0 - library to load .glade files at runtime
  • libglade2-dev - development files for libglade
  • libsdl1.2-dev - Simple DirectMedia Layer development files
  • libsdl-image1.2-dev - Image loading library for Simple DirectMedia Layer 1.2, development files
  • libsdl-mixer1.2-dev - Mixer library for Simple DirectMedia Layer 1.2, development files
  • lua5.1 - Simple, extensible, embeddable programming language
  • subversion - Advanced version control system

As a quick reference:

sudo apt install autoconf automake cmake flex gcc libgd-tools libgtk2.0-0 libpng-dev libtool make perl libcurl3 libcurl4-openssl-dev libglade2-0 libglade2-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev lua5.1 subversion

Download Source

  • Trunk contains the newest features and development for the game
  • Branch contains the most recent “stable” version of the game
  • Tags is an official & stable release of the game

IMPORTANT - One should be consistent with what is checked out; meaning use all trunk server & archetypes & maps or branches/1.x server & archetypes & maps or tags/1.71.0 server & archetypes & maps otherwise a strong risk of failure due to incompatibilities exists (broken maps, missing graphics, etc.)

The follow steps may be used to download the client source files to your computer.

Trunk

$ svn co http://svn.code.sf.net/p/crossfire/code/client/trunk client.svn

Branch

These steps have you download branches/1.12

$ svn co http://svn.code.sf.net/p/crossfire/code/client/branches/1.12 client.svn

Tag

Here's how to download Tag using the 1.71.0 release as an example

$ svn co http://svn.code.sf.net/p/crossfire/code/client/tags/1.71.0 client.svn

Using CMake

Briefly, change to the source directory and execute the following commands:

$ mkdir build; cd build
$ cmake ..
$ make
$ sudo make install

If you would like to change the compile-time default options, run ccmake instead of cmake.

$ mkdir build; cd build
$ ccmake ..
$ make
$ sudo make install

To compile with debugging symbols, add -g -O0 to CMAKE_CFLAGS.

$ mkdir build; cd build
$ cmake -g -O0 ..
$ make
$ sudo make install

Client Launch

To launch the client under different desktop environments:

  • XFCE - launch client through the Application Menu → Games
  • LXDE - Run command, then enter in crossfire-client-gtk2
client/client_compiling.txt · Last modified: 2017/03/31 00:45 by leaf