User Tools

Site Tools


client:client_compiling

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
client:client_compiling [2019/05/25 01:50]
leaf List package dependencies for Fedora 30 GTKv2 client
client:client_compiling [2023/08/30 17:33]
leaf [Ubuntu 20.04 (Focal Fossa)] Add creation date and last test date
Line 2: Line 2:
 This page provides information on building the GTKv2 client from source. Instructions for [[server:​server_compiling|compiling the server]] are on a separate page. This page provides information on building the GTKv2 client from source. Instructions for [[server:​server_compiling|compiling the server]] are on a separate page.
  
-===== Quick Start =====+One of the first steps is to install the required dependencies,​ listed by Linux distribution,​ from below.
  
-To build with the default options, change to the source directory and run: 
  
-    $ mkdir build && cd build/ +===== General ​Dependencies =====
-    $ 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   * C compiler supporting C99
   * CMake   * CMake
Line 29: Line 11:
   * libpng   * libpng
   * Perl   * Perl
- 
-Optional: 
   * libcurl (for metaserver support)   * libcurl (for metaserver support)
   * Lua 5 (for client-side Lua scripting)   * Lua 5 (for client-side Lua scripting)
Line 38: Line 18:
  
 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. 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.
 +
 +===== Linux Distribution Specifics =====
  
 ==== Arch Linux ==== ==== Arch Linux ====
  
 A quick reference for Arch Linux using the command line interface: ​ A quick reference for Arch Linux using the command line interface: ​
-  sudo pacman -S cmake sdl_image sdl_mixer ​subversion ​vala+  sudo pacman -S cmake git sdl_image sdl_mixer vala
  
  
-==== Debian 8 (Jessie) ==== 
  
-A quick reference for Debian 8 (Jessie): 
-  apt-get install cmake libcurl4-openssl-dev libgtk2.0-dev libpng3 libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev pkg-config subversion valac 
-==== Debian 9 (Stretch) ==== 
  
-A quick reference for Debian 9 (Stretch):​ +==== Debian ​====
-  apt install cmake libcurl4-openssl-dev libgtk2.0-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev pkg-config subversion valac +
-==== Fedora 25 ====+
  
-A quick reference for Fedora 25 using the command line interface:​ +==== Debian 10 (Buster) ====
-  sudo dnf install cmake gtk2-devel libcurl-devel SDL_image SDL_image-devel SDL_mixer SDL_mixer-devel subversion vala+
  
 +A quick reference for Debian 10 (Buster):
 +  apt install cmake git libcurl4-openssl-dev libgtk2.0-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev pkg-config valac
  
-==== 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 
  
-==== Fedora 27 ==== 
  
-A quick reference for Fedora 27 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 28 ==== 
  
-A quick reference for Fedora 28 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 29 ==== 
  
-A quick reference for Fedora 29 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 30 ==== 
  
-A quick reference for Fedora 30 using the command line interface: 
-  sudo dnf install cmake gtk2-devel libcurl-devel make SDL_image SDL_image-devel SDL_mixer SDL_mixer-devel subversion vala 
-==== Linux Mint 17.3 (Rosa) ==== 
  
-=== Command Line Interface (CLI) === 
  
-A quick reference for Linux Mint 17.3 (Rosa) using command line interface:+==== Fedora ====
  
-  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+==== Fedora 37 ====
  
-==== Linux Mint 18 (Sarah) ​====+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 vala 
 +   
 +==== Fedora 38 ====
  
-=== Command Line Interface (CLI) ===+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 vala
  
-A quick reference for Linux Mint 18 (Sara) 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.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 
-  ​ 
-==== Linux Mint 18.3 (Sylvia) ==== 
  
-=== Command Line Interface (CLI) === 
  
-A quick reference for Linux Mint 18.3 (Sylvia) 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 19 (Tara) ​====+==== Linux Mint ====
  
-=== Command Line Interface ​(CLI) ===+==== Linux Mint 20 (Ulyana====
  
-A quick reference for Linux Mint 19 (Tara) using command line interface:​ +A quick reference for Linux Mint 20 (Ulyana) 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 +  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
-   +
-==== Linux Mint 19.1 (Tessa) ==== +
- +
-=== Command Line Interface (CLI) === +
- +
-A quick reference for Linux Mint 19.1 (Tessa) 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 === === Installing on Linux Mint using Synaptic ===
Line 146: Line 86:
  
   * cmake   * cmake
 +  * git
   * libcurl4-openssl-dev   * libcurl4-openssl-dev
   * libglade2-dev ​   * libglade2-dev ​
Line 152: Line 93:
   * libsdl-mixer1.2-dev   * libsdl-mixer1.2-dev
   * libgtk2.0-dev   * libgtk2.0-dev
-  * subversion 
   * valac   * valac
  
 +==== Manjaro ====
 +
 +=== Manjaro ===
 +
 +A quick reference for Manjaro using command line interface:
 +  sudo pacman -S cmake gcc git make pkg-config sdl_image sdl_mixer vala
 +  ​
 +==== OpenSUSE ====
  
 ==== OpenSUSE Leap 42.3 ==== ==== OpenSUSE Leap 42.3 ====
  
 A quick reference for 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+  sudo zypper install cmake gcc git gtk2-devel libcurl-devel libSDL_image-devel libSDL_mixer-devel vala
   ​   ​
 ==== OpenSUSE Tumbleweed ==== ==== OpenSUSE Tumbleweed ====
  
 A quick reference for OpenSUSE Tumbleweed A quick reference for OpenSUSE Tumbleweed
-  sudo zypper install cmake gcc gtk2-devel libcurl-devel libSDL_image-devel libSDL_mixer-devel ​subversion ​vala+  sudo zypper install cmake gcc git gtk2-devel libcurl-devel libSDL_image-devel libSDL_mixer-devel vala 
  
-==== Ubuntu ​14.04 LTS (Trusty Tahr) ====+==== Ubuntu ====
  
-A quick reference ​for Ubuntu ​14.04 LTS (Trusty Tahr)+The dependency and instructions ​for the listed versions of Ubuntu ​includes or applies to all eight of the different flavours including
-  ​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+  ​* Kubuntu 
 +  * Lubuntu 
 +  * Ubuntu Budgie 
 +  * Ubuntu Kylin 
 +  * Ubuntu Mate 
 +  * Ubuntu Studio 
 +  * Ubuntu Unity 
 +  * Xubuntu
  
-==== 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 
   ​   ​
-==== Ubuntu 17.10 (Artful Aardvark) ==== 
  
-A quick reference for Ubuntu 17.10 (Artful Aardvark): + 
-  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+ 
   ​   ​
-==== Ubuntu 18.04 LTS (Bionic Beaver) ==== 
  
-A quick reference for Ubuntu ​18.04.2 LTS (Bionic Beaver): +==== Ubuntu 20.04 (Focal Fossa) ==== 
-  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+ 
 +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
   ​   ​
-==== Ubuntu 18.10 (Cosmic Cuttlefish) ====+Instructions creation date: 2023-August-30
  
-A quick reference for Ubuntu 18.10 (Cosmic Cuttlefish): +Last tested date2023-August-30
-  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+
   ​   ​
-==== Ubuntu ​19.04 (Disco Dingo) ====+==== Ubuntu ​22.04 (Jammy Jellyfish) ==== 
 + 
 +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 
 + 
 +==== Ubuntu 23.04 (Lunar Lobster) ==== 
 + 
 +A quick reference for Ubuntu 23.04 (Lunar Lobster): 
 +  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
  
-A quick reference for Ubuntu 19.04 (Disco Dingo): 
-  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 
 ===== Obtaining the Source ===== ===== Obtaining the Source =====
-  * [[Trunk]] ​contains the newest features and development for the game +  * Master ​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   * 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 following steps may be used to download the client source files to your computer.
  
-The follow steps may be used to download the client source files to your computer.+=== Master === 
 +  $ git clone https://git.code.sf.net/​p/​crossfire/​crossfire-client crossfire-crossfire-client
  
-=== Trunk === 
-  $ svn co http://​svn.code.sf.net/​p/​crossfire/​code/​client/​trunk client.svn 
  
-=== Branch ​=== +=== Tag === 
-These steps have you download ​branches/1.12+Here's how to download ​Tag using the 1.75.2 release as an example
  
-  $ svn co http://svn.code.sf.net/​p/​crossfire/​code/client/​branches/​1.12 ​client.svn+  $ git clone -b v1.75.2 https://git.code.sf.net/​p/​crossfire/​crossfire-client ​crossfire-crossfire-client 
 +  
 +FIXME - git pull sounds 
 +===== Compile Instructions =====
  
-=== Tag === +To build with the default options, change to the recently downloaded or pulled client source directory (i.e., /​home/<​username>/​crossfire-crossfire-client):​ 
-Here's how to download Tag using the 1.72.0 release as an example+ 
 +    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) 
 + 
 + 
 +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. 
 + 
 +===== Updating ​the Client and Sound Files ===== 
 + 
 +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. 
 + 
 + 
 +===== Live Example ===== 
 + 
 +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
  
-  $ svn co http://​svn.code.sf.net/​p/​crossfire/​code/​client/tags/1.72.0 client.svn+Now launch the client ​(i.e., Activities -> Search -> Crossfire Client)
client/client_compiling.txt · Last modified: 2024/05/15 12:19 by leaf