User Tools

Site Tools


client:client_compiling

This is an old revision of the document!


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.

Quick Start

To build with the default options, change to the source directory and run:

  $ mkdir build && cd build/
  $ cmake ..
  $ make
  # make install

To build with minimal dependencies, use this CMake command instead:

  $ cmake -DLUA=OFF -DMETASERVER2=OFF -DOPENGL=OFF -DSDL=OFF -DSOUND=OFF ..

To build with debugging symbols:

  $ cmake -DCMAKE_BUILD_TYPE=Debug ..

Use ccmake instead of cmake to change these options and more interactively.

Dependencies

  • C compiler supporting C99
  • CMake
  • GTK+ 2
  • libpng
  • Perl

Optional:

  • libcurl (for metaserver support)
  • Lua 5 (for client-side Lua scripting)
  • OpenGL (gl, glu, glx) (for OpenGL rendering)
  • SDL, SDL_image (for SDL rendering)
  • SDL_mixer (for sound support)

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

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

Fedora 25

A quick reference for Fedora 25 using the command line interface:

sudo dnf install cmake gtk2-devel libcurl-devel SDL_image SDL_image-devel SDL_mixer SDL_mixer-devel subversion vala

Fedora 26

A quick reference for Fedora 26 using the command line interface:

sudo dnf install cmake gtk2-devel libcurl-devel SDL_image SDL_image-devel SDL_mixer SDL_mixer-devel subversion vala

Linux Mint 18.1 (Serena)

Command Line Interface (CLI)

A quick reference for Linux Mint 18.1 (Serena) using command line interface:

sudo apt install cmake libcurl4-openssl-dev libglade2-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libgtk2.0-dev subversion valac

Linux Mint 18.2 (Sonya)

Command Line Interface (CLI)

A quick reference for Linux Mint 18.2 (Sonya) using command line interface:

sudo apt install cmake libcurl4-openssl-dev libglade2-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libgtk2.0-dev subversion valac

Installing on Linux Mint using Synaptic

Synaptic package manager is used to manage installation, update and removal of software.

  • To open package manager in Mate: Click Menu, lower left corner, the Package Manager.
  • To open in Cinnamon: Click Menu , then Administration, then Package Manager.
  • In XFCE: Click Menu, then System, then Synaptic Package Manager
  • In KDE: Menu, then Applications, then Settings, then Package Manager

Once open, click Reload in the menu bar. Use the Quick Filter box to search for package names or descriptions. You will need to install the following packages:

  • cmake
  • libcurl4-openssl-dev
  • libglade2-dev
  • libsdl1.2-dev
  • libsdl-image1.2-dev
  • libsdl-mixer1.2-dev
  • libgtk2.0-dev
  • subversion
  • valac

OpenSUSE Leap 42.3

A quick reference for OpenSUSE Leap 42.3

sudo zypper install cmake gcc gtk2-devel libcurl-devel libSDL_image-devel libSDL_mixer-devel subversion vala

Ubuntu 14.04 LTS (Trusty Tahr)

A quick reference for Ubuntu 14.04 LTS (Trusty Tahr):

sudo apt-get install cmake libcurl4-openssl-dev libglade2-0 libglade2-dev libpng12-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev subversion valac

Ubuntu 16.04 LTS (Xenial Xerus)

A quick reference for Ubuntu 16.04 (Xenial Xerus):

sudo apt-get install cmake libcurl4-openssl-dev libglade2-0 libglade2-dev libpng12-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev subversion valac

Ubuntu 17.04 (Zesty Zapus)

A quick reference for Ubuntu 17.04 (Zesty Zapus):

sudo apt-get install cmake libcurl4-openssl-dev libglade2-0 libglade2-dev libpng12-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev subversion valac

Obtaining the 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.72.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.72.0 release as an example

$ svn co http://svn.code.sf.net/p/crossfire/code/client/tags/1.72.0 client.svn
client/client_compiling.1506579709.txt.gz · Last modified: 2017/09/28 01:21 by leaf