This is an old revision of the document!
This page provides information on building the GTKv2 client from the source code. Instructions for compiling the server are on a separate page.
One of the first steps is to install the required dependencies, listed by Linux distribution, from below.
The second step is to obtain the GTKv2 Client source code and sound files via git.
The third step is to setup and compile the client.
Also this page includes instructions on how to update your local client installation and recompile the source code for those changes.
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.
A quick reference for Arch Linux using the command line interface:
sudo pacman -S cmake git gtk2 sdl_image sdl_mixer sdl2_mixer vala
Instructions creation date: 2023-September-1
Last tested date: 2024-May-1
A quick reference for Debian 10 (Buster):
sudo apt install cmake git libcurl4-openssl-dev libgtk2.0-dev libsdl1.2-dev libsdl2-mixer-dev libsdl-image1.2-dev libsdl-mixer1.2-dev pkg-config valac
Instructions creation date: 2023-September-1
Last tested date: 2024-May-1
A quick reference for Debian 11 (Bullseye):
sudo apt install cmake git libcurl4-openssl-dev libgtk2.0-dev libsdl1.2-dev libsdl2-mixer-dev libsdl-image1.2-dev libsdl-mixer1.2-dev pkg-config valac
Instructions creation date: 2023-September-1
Last tested date: 2023-September-1
A quick reference for Debian 12 (Bookworm):
sudo apt install cmake git libcurl4-openssl-dev libgtk2.0-dev libsdl1.2-dev libsdl2-mixer-dev libsdl-image1.2-dev libsdl-mixer1.2-dev pkg-config valac
Instructions creation date: 2023-September-1
Last tested date: 2023-September-1
A quick reference for Devuan Beowulf 3.1:
sudo apt install cmake git libcurl4-openssl-dev libgtk2.0-dev libsdl1.2-dev libsdl2-mixer-dev libsdl-image1.2-dev libsdl-mixer1.2-dev pkg-config valac
Instructions creation date: 2024-May-1
Last tested date: 2024-May-1
A quick reference for Devuan Chimaera 4.0:
sudo apt install cmake git libcurl4-openssl-dev libgtk2.0-dev libsdl1.2-dev libsdl2-mixer-dev libsdl-image1.2-dev libsdl-mixer1.2-dev pkg-config valac
Instructions creation date: 2023-September-1
Last tested date: 2024-May-1
A quick reference for Devuan Daedalus 5.0:
sudo apt install cmake git libcurl4-openssl-dev libgtk2.0-dev libsdl1.2-dev libsdl2-mixer-dev libsdl-image1.2-dev libsdl-mixer1.2-dev pkg-config valac
Instructions creation date: 2024-May-01
Last tested date: 2024-May-03
A quick reference for Fedora 37 using the command line interface:
sudo dnf install cmake git gtk2-devel libcurl-devel make SDL_image SDL_image-devel SDL_mixer SDL_mixer-devel SDL2_mixer-devel vala
Instructions creation date: 2023-September-01
Last tested date: 2024-May-04
A quick reference for Fedora 38 using the command line interface:
sudo dnf install cmake git gtk2-devel libcurl-devel make SDL_image SDL_image-devel SDL_mixer SDL_mixer-devel SDL2_mixer-devel vala
Instructions creation date: 2023-September-01
Last tested date: 2023-May-05
A quick reference for Fedora 39 using the command line interface:
sudo dnf install cmake git gtk2-devel libcurl-devel make SDL_image SDL_image-devel SDL_mixer SDL_mixer-devel SDL2_mixer-devel vala
Instructions creation date: 2023-September-18
Last tested date: 2024-May-05
A quick reference for Fedora 40 using the command line interface:
sudo dnf install cmake git gtk2-devel libcurl-devel make SDL_image SDL_image-devel SDL_mixer SDL_mixer-devel SDL2_mixer-devel vala
Instructions creation date: 2024-April-25
Last tested date: 2024-April-25
A quick reference for Linux Mint 20 (Ulyana) using command line interface:
sudo apt install cmake git libcurl4-openssl-dev libglade2-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libgtk2.0-dev valac
Instructions creation date: 2023-September-15
Last tested date: 2024-May-05
A quick reference for Linux Mint 20.1 (Ulyssa) using command line interface:
sudo apt install cmake git libcurl4-openssl-dev libglade2-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl2-mixer-dev libgtk2.0-dev valac
Instructions creation date: 2023-September-18
Last tested date: 2024-May-06
A quick reference for Linux Mint 20.2 (Uma) using command line interface:
sudo apt install cmake git libcurl4-openssl-dev libglade2-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl2-mixer-dev libgtk2.0-dev valac
Instructions creation date: 2023-September-18
Last tested date: 2024-May-08
A quick reference for Linux Mint 20.3 (Una) using command line interface:
sudo apt install cmake git libcurl4-openssl-dev libglade2-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl2-mixer-dev libgtk2.0-dev valac
Instructions creation date: 2023-September-20
Last tested date: 2024-May-08
A quick reference for Linux Mint 21 (Vanessa) using command line interface:
sudo apt install cmake git libcurl4-openssl-dev libglade2-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl2-mixer-dev libgtk2.0-dev valac
Instructions creation date: 2023-September-20
Last tested date: 2023-May-08
A quick reference for Linux Mint 21.1 (Vera) using command line interface:
sudo apt install cmake git libcurl4-openssl-dev libglade2-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl2-mixer-dev libgtk2.0-dev valac
Instructions creation date: 2023-September-20
Last tested date: 2024-May-08
A quick reference for Linux Mint 21.2 (Victoria) using command line interface:
sudo apt install cmake git libcurl4-openssl-dev libglade2-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl2-mixer-dev libgtk2.0-dev valac
Instructions creation date: 2023-September-21
Last tested date: 2024-May-08
A quick reference for Linux Mint Debian Debian Edition 6:
sudo apt install cmake git libcurl4-openssl-dev libgtk2.0-dev libsdl1.2-dev libsdl2-mixer-dev libsdl-image1.2-dev libsdl-mixer1.2-dev pkg-config valac
Instructions creation date: 2023-September-28
Last tested date: 2024-May-08
- use with caution, package list has not been tested for a very long time
Synaptic package manager is used to manage installation, update and removal of software.
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:
A quick reference for Manjaro using command line interface:
sudo pacman -S cmake gcc git gtk2 make sdl_image sdl_mixer sdl2_mixer vala
Instructions creation date: 2023-September-21
Last tested date: 2024-February-21
A quick reference for OpenSUSE Leap 15.5
sudo zypper install cmake gcc git gtk2-devel libcurl-devel libSDL_image-devel libSDL_mixer-devel libSDL2-devel libSDL2_mixer-devel make vala
Instructions creation date: 2023-September-24
Last tested date: 2024-May-1
A quick reference for OpenSUSE Tumbleweed
sudo zypper install cmake gcc git gtk2-devel libcurl-devel libSDL_image-devel libSDL_mixer-devel SDL2_mixer-devel make vala
Instructions creation date: 2023-September-24
Last tested date: 2024-May-1
NOTE: the first client launch after compile may result in a warning about UI dialogs not being available. Exit the client and try launching again.
A quick reference for Pop!_OS 22.04 LTS:
sudo apt install cmake git libcurl4-openssl-dev libglade2-dev libsdl2-mixer-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libgtk2.0-dev valac
Instructions creation date: 2023-September-25
Last tested date: 2023-September-25
The dependency and instructions for the listed versions of Ubuntu includes or applies to all eight of the different flavours including:
A quick reference for Ubuntu 20.04 (Focal Fossa):
sudo apt install cmake git libcurl4-openssl-dev libglade2-dev libsdl2-mixer-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libgtk2.0-dev valac
Instructions creation date: 2023-August-30
Last tested date: 2023-August-30
A quick reference for Ubuntu 22.04 (Jammy Jellyfish):
sudo apt install cmake git libcurl4-openssl-dev libglade2-dev libsdl2-mixer-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libgtk2.0-dev valac
Instructions creation date: 2023-September-29
Last tested date: 2023-September-29
A quick reference for Ubuntu 23.10 (Mantic Minotaur) using the command line interface:
sudo apt install cmake git libcurl4-openssl-dev libglade2-dev libsdl2-mixer-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libgtk2.0-dev valac
Instructions creation date: 2023-September-26
Last tested date: 2024-February-9
A quick reference for Ubuntu 24.04 (Noble Numbat) using the command line interface:
sudo apt install cmake git libcurl4-openssl-dev libglade2-dev libsdl2-mixer-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libgtk2.0-dev valac
Instructions creation date: 2024-April-26
Last tested date: 2024-April-26
The following steps may be used to download the client source files to your computer. Just pick one option between Master or Tag. Master is the recommended option.
$ git clone https://git.code.sf.net/p/crossfire/crossfire-client crossfire-crossfire-client
Here's how to download Tag using the 1.75.2 release as an example
$ git clone -b v1.75.2 https://git.code.sf.net/p/crossfire/crossfire-client crossfire-crossfire-client
See instructions below for obtaining game sounds for the client.
To build with the default options, change to the recently downloaded or pulled client source directory (i.e., /home/<username>/crossfire-crossfire-client):
cd crossfire-crossfire-client/
Confirm that you are in the correct directory with the pwd command, and it should look like this:
$ pwd /home/<username>/crossfire-crossfire-client
Run git pull to download the game sounds and automatically save them in the directory that the client needs:
$ git clone https://git.code.sf.net/p/crossfire/crossfire-sounds sounds
The first time you compile, you will need create a directory called build - but after this initial time, the directory creation is not necessary.
$ mkdir build
Change (or cd) in to the build directory:
$ cd build
Double check the file path with the pwd command:
$ pwd /home/<username>/crossfire-crossfire-client/build
Now run the cmake command - or check the other options below; this step is using the default cmake command from inside the build directory:
$ cmake ..
You should see numerous lines of text scroll by. If an problems are encountered in this step, it will be listed in this output.
From inside the build directory, run the make command:
$ make
Once again, you should see numerous lines of text scroll by. If this step was successful, you will see the following text:
[100%] Built target crossfire-client-gtk2
Any errors or problems encountered, please reach out to the Crossfire development team and community via IRC, Discord, or Mailing Lists. IRC and Discord will have the fastest turn around time and interaction.
And one more step, running make install from within the build directory, this step requires sudo access or to be run with root access rights:
$ sudo make install
or
# make install
You should see numerous lines of scrolling text again for this step. If all goes well, you should be returned back to your regular shell prompt and no text indicating errors or problems.
Now to launch the client - a desktop shortcut should have been automatically created so the client should appear in the Application Menu. (i.e., Activities → Search → Crossfire Client)
Other ways to launch the client using the command line:
From within the directory crossfire-crossfire-client:
$ ./gtk-v2/src/crossfire-client-gtk2
From your home directory:
$ ./crossfire-crossfire-client/build/gtk-v2/src/crossfire-client-gtk2
Optional options:
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 ..
To install in a custom location (autotools –prefix):
$ cmake -DCMAKE_INSTALL_PREFIX=/path/to/where/you/want ..
Use ccmake instead of cmake to change these options and more interactively.
Steps for updating the client code and sound files use the git pull command.
Change (cd) in to the the client directory that was created in the earlier steps.
$ cd crossfire-crossfire-client/
To confirm, the path to this folder looks like this:
$ pwd /home/<username>/crossfire-crossfire-client
Now run the git pull command:
$ git pull
IF there are no updates, you will see the following:
$ git pull Already up to date.
If updates are available, they will be automatically downloaded for you.
Now, check and see if there are any updates to the sound files:
$ cd sounds/
Check for updates with the git pull command:
$ git pull Already up to date.
If updates are available, they will be automatically downloaded for you.
Now change (cd) to the build directory (this directory was manually created during the first compile process for the client):
$ cd ../build/
Confirm you are in the correct directory with the pwd command:
$ pwd /home/<username>/crossfire-crossfire-client/build
Now run the cmake command:
$ cmake ..
You should see numerous lines of text scroll by. If an problems are encountered in this step, it will be listed in this output.
From inside the build directory, run the make command:
$ make
Once again, you should see numerous lines of text scroll by. If this step was successful, you will see the following text:
[100%] Built target crossfire-client-gtk2
Any errors or problems encountered, please reach out to the Crossfire development team and community via IRC, Discord, or Mailing Lists. IRC and Discord will have the fastest turn around time and interaction.
And one more step, running make install from within the build directory, this step requires sudo access or to be run with root access rights:
$ sudo make install
or
# make install
You should see numerous lines of scrolling text again for this step. If all goes well, you should be returned back to your regular shell prompt and no text indicating errors or problems.
Using Ubuntu as a live example:
sudo apt install cmake git libcurl4-openssl-dev libglade2-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libgtk2.0-dev valac git clone https://git.code.sf.net/p/crossfire/crossfire-client crossfire-crossfire-client cd crossfire-crossfire-client/ git clone https://git.code.sf.net/p/crossfire/crossfire-sounds sounds mkdir build cd build/ cmake .. make sudo make install
Now launch the client (i.e., Activities → Search → Crossfire Client)