User Tools

Site Tools


server:server_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
server:server_compiling [2017/09/15 20:48]
saru Added quick command for rebuilding archetypes.
server:server_compiling [2024/02/27 00:03] (current)
leaf [Requirements] Update notes on checking Python3 installation version
Line 1: Line 1:
 ====== Compiling the Crossfire Server ====== ====== Compiling the Crossfire Server ======
  
-This document describes how to build and install the Crossfire server from source. Instructions for [[client:​client_compiling|building the client]] are on a separate page.+This document describes how to build and install the Crossfire server from source. ​\\ 
 +Instructions for [[:client:​client_compiling|building the client]] are on a separate page.
  
 ===== *Nix Compile Guide ===== ===== *Nix Compile Guide =====
  
-==== Requirements ==== +==== Requirements ====
  
 It's likely that many of these packages (listed alphabetically) are already installed on your system, but this list is a way to make sure.  It's important to have all the right packages in place **before** attempting any builds or compiles. It's likely that many of these packages (listed alphabetically) are already installed on your system, but this list is a way to make sure.  It's important to have all the right packages in place **before** attempting any builds or compiles.
Line 13: Line 14:
     * m4 - a macro processing language (required by flex)     * m4 - a macro processing language (required by flex)
   * gcc - The GNU C compiler   * gcc - The GNU C compiler
 +  * g++ - the GNU C++ compiler, supporting C++14 or later
 +  * git - fast, scalable, distributed revision control system
 +  * libgd-dev - GD Graphics Library (development version)
   * libgd-tools - GD command line tools and example code   * libgd-tools - GD command line tools and example code
-    * libgd2-noxpm - GD Graphics Library version 2 (without XPM support) (required by libgd-tools) 
-  * libgd2-xpm-dev - GD Graphics Library version 2 (development version) 
   * libtool - Generic library support script   * libtool - Generic library support script
   * make - The GNU version of the "​make"​ utility   * make - The GNU version of the "​make"​ utility
-  * python-dev - header files and a static library for Python (default+  * python3-dev - header files and a static library for Python (default)
-  * subversion - advanced version control system (aka. svn) +
-      * libapr0 - the Apache Portable Runtime (required by subversion) +
-      * libsvn0 - shared libraries used by Subversion (aka. svn) (required by subversion)+
  
 As a quick reference: As a quick reference:
  
-  sudo apt-get install automake flex gcc libgd-tools libgd2-xpm-dev libtool make python-dev subversion+  sudo apt-get install automake flex gcc g++ git libgd-dev ​libgd-tools ​libtool make python3-dev
  
 === Python Scripting === === Python Scripting ===
  
-A special note about installing python. The package listed above, **python-dev**, should install the necessary packages to enable many of the in-game features (ship transportation,​ guilds, post office, et al.) to work.+A special note about installing python. The package listed above, **python3-dev**, should install the necessary packages to enable many of the in-game features (ship transportation,​ guilds, post office, et al.) to work.
  
 However, if python related features are not working, then installing python depends on your choice of Linux distro. However, if python related features are not working, then installing python depends on your choice of Linux distro.
-  * python 2.4 is old, Crossfire runs with 2.5 and 2.6; I would use 2.6 if possiblehas not been tried with 3.1 +  * The server as of 2021-January can and should ​use Python 3since Python ​2 is outdated and unsupported 
-  * lib64python2.4-2.4.3 is known to work on Mandriva 2007.0 x86_64 +  * Crossfire ​is known to run with Python with 3.and higher
-  * python2.6-dev ​is known to work with Ubuntu Lucid (10.04.4) +
-  * python2.7-dev is known to work in Ubuntu Precise (12.04), Trusty (14.04) ​and Xenial (16.04) +
- +
-As an example, this is what you would use to install python on Ubuntu Trusty Tahr:+
  
-  sudo apt-get ​install ​python2.7-dev+As an example, this is what you would use to install ​python on Ubuntu Focal:
  
-To confirm python is fully installed ​+  sudo apt-get install python3-dev
  
-   ​$ ​python+To confirm ​python ​is fully installed on Ubuntu Focal:
  
-and you should see an output like: +   $ python3 -V 
-     ​Python 2.7.3 (default, Apr 10 2013, 06:20:15) +    
-     [GCC 4.6.3] on linux2 +And you should see output like:
-     Type "​help",​ "​copyright",​ "​credits"​ or "​license"​ for more information. +
-     >>>​+
  
-If you see something like the above, python is installed, ctrl-d to quit python.+   ​Python 3.10.12
  
 ==== Recommended Packages ==== ==== Recommended Packages ====
Line 58: Line 51:
  
   * autoconf - automatic configure script builder (Not normally required for end-user builds, but it is useful if build scripts are not up to date)   * autoconf - automatic configure script builder (Not normally required for end-user builds, but it is useful if build scripts are not up to date)
-  * [[dev:check|check]] - unit test framework for C (used by the unit tests)+  * [[:dev:check]] - unit test framework for C (used by the unit tests)
   * libsqlite3-0 - SQLite 3 shared library (used by cflogger)   * libsqlite3-0 - SQLite 3 shared library (used by cflogger)
-  * libpython2.- Python ​shared object ​library (used by game features such as bank, post office, slot machines, etc.) +  * libpython3.Shared ​Python ​runtime ​library ​(version 3.8) (used by game features such as bank, post office, slot machines, etc.) 
-  * libpython2.4-devel - Required to compile python support into the server +  * libcurl4 ​- - Multi-protocol file transfer library (required by metaserver2)
-  * libcurl3 ​- - Multi-protocol file transfer library (required by metaserver2)+
   * libcurl4-openssl-dev - Development files and documentation for libcurl (OpenSSL) (required by metaserver2)   * libcurl4-openssl-dev - Development files and documentation for libcurl (OpenSSL) (required by metaserver2)
-  * libsvn-dev - Development files for Subversion libraries (required for Subversion revision number reporting in metaserver2) 
  
 As a quick reference: As a quick reference:
  
-  sudo apt-get install check autoconf libsqlite3-0 ​libcurl3 ​libcurl4-openssl-dev libsvn-dev+  sudo apt-get install check autoconf libsqlite3-0 ​libpython3.8 libcurl4 ​libcurl4-openssl-dev
  
 ==== Useful Packages ==== ==== Useful Packages ====
Line 80: Line 71:
     * Do not run `make` as the root user for security reasons.     * Do not run `make` as the root user for security reasons.
  
 +===== Distribution Specific Dependencies =====
  
 +==== Arch Linux ====
 +
 +FIXME - placeholder text.
 +==== Debian ====
 +
 +==== Debian 10 (Buster) ====
 +
 +A quick reference for Debian 10
 +
 +  sudo apt install automake flex git g++ libcurl4 libcurl4-openssl-dev libgd-dev libgd-tools libtool make python3-dev
 +  ​
 +It is important to run this command after the server compile process listed further down in the page:
 +
 +  $ sudo chown -R <​username>​.<​username>​ /​usr/​games/​crossfire
 +
 +Instructions creation date: 2024-January-9
 +
 +Last tested date: 2024-February-19 ​
 +==== Debian 11 (Bullseye) ====
 +
 +A quick reference for Debian 11
 +
 +  sudo apt install automake flex git g++ libcurl4 libcurl4-openssl-dev libgd-dev libgd-tools libtool make python3-dev
 +  ​
 +It is important to run this command after the server compile process listed further down in the page:
 +
 +  $ sudo chown -R <​username>​.<​username>​ /​usr/​games/​crossfire
 +
 +Instructions creation date: 2024-January-10
 +
 +Last tested date: 2024-February-19 ​
 +
 +==== Debian 12 (Bookworm) ====
 +
 +A quick reference for Debian 12
 +
 +  sudo apt install automake flex git g++ libcurl4 libcurl4-openssl-dev libgd-dev libgd-tools libtool make python3-dev
 +  ​
 +It is important to run this command after the server compile process listed further down in the page.
 +
 +Note: Debian 12 requires the directory permission change to use ':'​ instead of '​.'​ like this,
 +  sudo chown -R <​username>:<​username>​ /​usr/​games/​crossfire/​
 +
 +Instructions creation date: 2024-January-10
 +
 +Last tested date: 2024-February-24 ​
 +
 +
 +==== Devuan ====
 +
 +==== Devuan Chimaera 4.0 ====
 +
 +A quick reference for Devuan Chimaera 4.0 (old stable)
 +
 +  sudo apt install automake flex git g++ libcurl4 libcurl4-openssl-dev libgd-dev libgd-tools libtool make python3-dev
 +  ​
 +Instructions creation date: 2024-February-20
 +
 +Last tested date: 2024-February-20
 +
 +==== Devuan Daedalus 5.0 ====
 +
 +A quick reference for Devuan Daedalus 5.0 (stable)
 +
 +  sudo apt install automake flex git g++ libcurl4 libcurl4-openssl-dev libgd-dev libgd-tools libtool make python3-dev
 +  ​
 +After compiling the server (sh autogen.sh && make && sudo make install) you will also need to run the following command - but make sure to change <​username>​ to the correct login name for you setup:
 +
 +  sudo chown -R <​username>:<​username>​ /​usr/​games/​crossfire/​
 +
 +Instructions creation date: 2024-February-21
 +
 +Last tested date: 2024-February-21
 +
 +==== Fedora ====
 +
 +==== Fedora 37 ====
 +
 +A quick reference for Fedora 37
 +
 +  sudo dnf install flex g++ git libcurl libcurl-devel libtool make python3 python3-devel
 +
 +After compiling the server (sh autogen.sh && make && sudo make install) you will also need to run the following command - but make sure to change <​username>​ to the correct login name for you setup:
 +
 +  sudo chown -R <​username>​.<​username>​ /​usr/​games/​crossfire/​
 +  ​
 +Note: if you see an alert like this, " chown: warning: '​.'​ should be ':'​ " then use this syntax:
 +
 +  sudo chown -R <​username>:<​username>​ /​usr/​games/​crossfire/​
 +
 +Instructions creation date: 2024-January-29
 +
 +Last tested date: 2024-January-29
 +
 +==== Fedora 38 ====
 +
 +A quick reference for Fedora 38
 +
 +  sudo dnf install flex g++ git libcurl libcurl-devel libtool make python3 python3-devel
 +
 +After compiling the server (sh autogen.sh && make && sudo make install) you will also need to run the following command - but make sure to change <​username>​ to the correct login name for you setup:
 +
 +  sudo chown -R <​username>​.<​username>​ /​usr/​games/​crossfire/​
 +  ​
 +Note: if you see an alert like this, " chown: warning: '​.'​ should be ':'​ " then use this syntax:
 +
 +  sudo chown -R <​username>:<​username>​ /​usr/​games/​crossfire/​
 +
 +Instructions creation date: 2024-January-29
 +
 +Last tested date: 2024-January-29
 +==== Fedora 39 ====
 +
 +Server code requires commit 472dd2 from 2024-Jan-27 in order to compile properly, see [[https://​sourceforge.net/​p/​crossfire/​bugs/​952/​|Bug #​952]] ​
 +
 +A quick reference for Fedora 39
 +
 +  sudo dnf install flex g++ git libcurl libcurl-devel libtool make python3 python3-devel
 +
 +After compiling the server (sh autogen.sh && make && sudo make install) you will also need to run the following command - but make sure to change <​username>​ to the correct login name for you setup:
 +
 +  sudo chown -R <​username>​.<​username>​ /​usr/​games/​crossfire/​
 +  ​
 +Note: if you see an alert like this, " chown: warning: '​.'​ should be ':'​ " then use this syntax:
 +
 +  sudo chown -R <​username>:<​username>​ /​usr/​games/​crossfire/​
 +
 +Instructions creation date: 2024-January-12
 +
 +Last tested date: 2024-January-28
 +
 +==== Linux Mint ====
 +
 +The dependency and instructions for the listed versions of Linux Mint includes or applies to all the different flavors including:
 +  * Cinnamon
 +  * Cinnamon (Edge)
 +  * Mate
 +  * Xfce 
 +
 +==== Linux Mint 20 (Ulyana) ====
 +
 +A quick reference for Linux Mint 20 (Ulyana)
 +
 +  sudo apt-get install autoconf autotools-dev automake flex g++ gcc git libcurl4-openssl-dev libtool python3 python3-dev
 +
 +Instructions creation date: 2024-January-29
 +
 +Last tested date: 2024-January-29
 +==== Linux Mint 20.1 (Ulyssa) ====
 +
 +A quick reference for Linux Mint 20.1 (Ulyssa)
 +
 +  sudo apt-get install autoconf autotools-dev automake flex g++ gcc git libcurl4-openssl-dev libtool python3 python3-dev
 +
 +Instructions creation date: 2024-February-6
 +
 +Last tested date: 2024-February-6
 +
 +==== Linux Mint 20.2 (Uma) ====
 +
 +A quick reference for Linux Mint 20.2 (Uma)
 +
 +  sudo apt-get install autoconf autotools-dev automake flex g++ gcc git libcurl4-openssl-dev libtool python3 python3-dev
 +
 +Instructions creation date: 2024-February-7
 +
 +Last tested date: 2024-February-7
 +
 +==== Linux Mint 20.3 (Una) ====
 +
 +A quick reference for Linux Mint 20.3 (Una)
 +
 +  sudo apt-get install autoconf autotools-dev automake flex g++ gcc git libcurl4-openssl-dev libtool python3 python3-dev
 +
 +Instructions creation date: 2024-February-7
 +
 +Last tested date: 2024-February-7
 +
 +
 +==== Linux Mint 21 (Vanessa) ====
 +
 +A quick reference for Linux Mint 21 (Vanessa)
 +
 +  sudo apt-get install autoconf autotools-dev automake flex g++ gcc git libcurl4-openssl-dev libtool python3 python3-dev
 +
 +Instructions creation date: 2024-February-7
 +
 +Last tested date: 2024-February-7
 +
 +
 +==== Linux Mint 21.1 (Vera) ====
 +
 +A quick reference for Linux Mint 21.1 (Vera)
 +
 +  sudo apt-get install autoconf autotools-dev automake flex g++ gcc git libcurl4-openssl-dev libtool python3 python3-dev
 +
 +Instructions creation date: 2024-February-8
 +
 +Last tested date: 2024-February-8
 +
 +
 +==== Linux Mint 21.2 (Victoria) ====
 +
 +A quick reference for Linux Mint 21.2 (Victoria)
 +
 +  sudo apt-get install autoconf autotools-dev automake flex g++ gcc git libcurl4-openssl-dev libtool python3 python3-dev
 +
 +Instructions creation date: 2024-February-8
 +
 +Last tested date: 2024-February-8
 +
 +==== Linux Mint Debian Edition ====
 +
 +A quick reference for Linux Mint Debian Edition
 +
 +  sudo apt-get install autoconf autotools-dev automake flex g++ gcc git libcurl4-openssl-dev libtool python3 python3-dev
 +
 +It is important to run this command after the server compile process listed further down in the page.
 +
 +Note: Linux Mint Debian Edition requires the directory permission change to use ':'​ instead of '​.'​ like this,
 +  sudo chown -R <​username>:<​username>​ /​usr/​games/​crossfire/​
 +
 +Instructions creation date: 2024-February-9
 +
 +Last tested date: 2024-February-9
 +
 +
 +==== Manjaro ====
 +
 +==== Manjaro 23.1.3 (Vulcan) ====
 +
 +A quick reference for Manjaro
 +
 +  sudo pacman -S base-devel git
 +
 +It is important to run this command after the server compile process listed further down in the page.
 +
 +Note: Manjaro requires the directory permission change to use ':'​ instead of '​.'​ like this,
 +  sudo chown -R <​username>:<​username>​ /​usr/​games/​crossfire/​
 +
 +Instructions creation date: 2024-February-21
 +
 +Last tested date: 2024-February-21
 +
 +
 +==== OpenSUSE ====
 +
 +==== OpenSUSE Leap 15.5 ====
 +
 +A quick reference for OpenSUSE Leap 15.5
 +
 +  sudo zypper install flex gcc-c++ git libtool python3-devel
 +
 +It is important to run this command after the server compile process listed further down in the page.
 +
 +Note: OpenSUSE requires the directory permission change to use ':'​ instead of '​.'​ like this,
 +  sudo chown -R <​username>:​users /​usr/​games/​crossfire/​
 +
 +Instructions creation date: 2024-February-21
 +
 +Last tested date: 2024-February-21
 +
 +
 +
 +==== OpenSUSE Tumbleweed ====
 +
 +A quick reference for OpenSUSE Tumbleweed
 +
 +  sudo zypper install flex gcc-c++ git libtool python3-devel
 +
 +It is important to run this command after the server compile process listed further down in the page.
 +
 +Note: OpenSUSE requires the directory permission change to use ':'​ instead of '​.'​ like this,
 +  sudo chown -R <​username>:​users /​usr/​games/​crossfire/​
 +
 +Instructions creation date: 2024-February-23
 +
 +Last tested date: 2024-February-23
 +
 +
 +
 +==== Pop!_OS ====
 +
 +==== Pop!_OS 22.04 LTS ====
 +
 +A quick reference for Pop!_OS 22.04 LTS 
 +
 +   sudo apt-get install check flex git libcurl4 libcurl4-openssl-dev libgd-dev libgd-tools libtool python3-dev
 +
 +Instructions creation date: 2024-February-26
 +
 +Last tested date: 2024-February-26
 +
 +==== Pop!_OS 22.04 LTS (NVIDIA) ====
 +
 +A quick reference for Pop!_OS 22.04 LTS (NVIDIA) ​
 +
 +   sudo apt-get install check flex git libcurl4 libcurl4-openssl-dev libgd-dev libgd-tools libtool python3-dev
 +
 +Instructions creation date: 2024-February-26
 +
 +Last tested date: 2024-February-26
 +==== Ubuntu ====
 +
 +The dependency and instructions for the listed versions of Ubuntu includes or applies to all the different flavours including:
 +  * Kubuntu
 +  * Lubuntu
 +  * Ubuntu Budgie
 +  * Ubuntu Mate
 +  * Xubuntu ​
 +
 +
 +==== Ubuntu 20.04 LTS (Focal Fossa) ====
 +
 +Ubuntu 20.04 no longer supports Python 2, so it is very important that Python 3 is installed. ​
 +
 +Crossfire server relies heavily on Python for functions such as the message boards, post office, certain quests, gates & passwords, etc.
 +
 +   sudo apt-get install check autoconf flex git libsqlite3-0 libcurl4 libcurl4-openssl-dev python3-dev
 +
 +Instructions creation date: n/a
 +
 +Last tested date: 2024-February-26 ​
 +==== Ubuntu 22.04 LTS (Jammy Jellyfish) ====
 +
 +A quick reference for Ubuntu 22.04 LTS (Jammy Jellyfish) ​
 +
 +   sudo apt-get install autoconf automake check flex g++ gcc git libcurl4 libcurl4-openssl-dev libgd-dev libgd-tools libsqlite3-0 libtool make python3-dev
 +
 +Instructions creation date: 2023-October-11
 +
 +Last tested date: 2024-February-26  ​
 +
 +==== Ubuntu 23.10 (Mantic Minotaur) ====
 +
 +A quick reference for Ubuntu 23.10 (Mantic Minotaur) ​
 +
 +   sudo apt-get install autoconf automake check flex g++ gcc git libcurl4 libcurl4-openssl-dev libgd-dev libgd-tools libsqlite3-0 libtool make python3-dev
 +
 +It is important to run this command after the server compile process listed further down in the page.
 +
 +Note: Ubuntu 23.10 (Mantic Minotaur) requires the directory permission change to use ':'​ instead of '​.'​ like this,
 +  sudo chown -R <​username>:<​username>​ /​usr/​games/​crossfire/​
 +
 +Instructions creation date: 2024-February-9
 +
 +Last tested date: 2024-February-26 ​
 +===== Compile Instructions =====
  
 ==== START HERE ==== ==== START HERE ====
Line 89: Line 429:
    /​home/<​username>​    /​home/<​username>​
  
- 
-* [[:Trunk]] Server Build Script 
- 
-[[:​server:​server_compiling_script|Trunk Build Script]] 
-  
  
  
 ==== DOWNLOAD ==== ==== DOWNLOAD ====
  
-  * [[:Trunk]] contains the newest features and development for the game +  * [[:sourceforge:​svn_code#​Trunk]] contains the newest features and development for the game 
-  * Tags is an official & stable release of the game+  * [[:​sourceforge:​svn_code#​Tags]] is an official & stable release of the game
  
  
-**IMPORTANT** - One should be consistent with what they check out; meaning use all trunk server & archetypes & maps or tags/1.60.0 server & archetypes & maps otherwise you run the risk of incompatibilities (broken maps, missing graphics, etc.)+**IMPORTANT** - One should be consistent with what they check out; meaning use all trunk server & archetypes & maps or tags/1.75.0 server & archetypes & maps otherwise you run the risk of incompatibilities (broken maps, missing graphics, etc.)
  
 The follow steps will download the necessary files to your computer, which will be used to compile (or build) the server. The follow steps will download the necessary files to your computer, which will be used to compile (or build) the server.
Line 108: Line 443:
 === Trunk === === Trunk ===
  
-  $ svn co https://svn.code.sf.net/​p/​crossfire/​code/​server/​trunk server.svn +  $ git clone https://git.code.sf.net/​p/​crossfire/​crossfire-arch crossfire-crossfire-arch 
-  $ svn co https://svn.code.sf.net/​p/​crossfire/​code/maps/​trunk ​maps.svn +  $ git clone https://git.code.sf.net/​p/​crossfire/​crossfire-maps crossfire-crossfire-maps 
-  $ svn co https://svn.code.sf.net/​p/​crossfire/​code/​arch/​trunk arch.svn+  $ git clone https://git.code.sf.net/​p/​crossfire/​crossfire-server crossfire-crossfire-server
  
 === Tag === === Tag ===
  
-Here'​s ​how you download Tag and is using the 1.71.0 release as an example+Here'​s ​the download ​URLs for Tag releases ​and is using the 1.75.0 release as an example
  
-  $ svn co https://svn.code.sf.net/p/crossfire/code/server/tags/1.71.0 server.svn +   ​*  ​https://sourceforge.net/projects/crossfire/files/crossfire-server/1.75.0/crossfire-1.75.0.tar.gz/​download 
-  $ svn co https://svn.code.sf.net/p/crossfire/code/maps/tags/1.71.0 maps.svn +   * https://sourceforge.net/projects/crossfire/files/crossfire-maps/1.75.0/​crossfire-maps-1.75.0.tar.gz/​download 
-  $ svn co https://​svn.code.sf.net/​p/crossfire/​code/​arch/​tags/​1.71.0 arch.svn+ 
 +NOTE: The server download already contains the Archetypes, so that is why the URL for that file set is not listed
  
 ==== SETUP ==== ==== SETUP ====
  
-This confirms that you are still in your home directory+In the command line window or terminal, this confirms that you are still in your home directory
  
    $ pwd    $ pwd
Line 129: Line 465:
 Now change directory (hence the cd) to the directory that contains the server files Now change directory (hence the cd) to the directory that contains the server files
  
-   $ cd server.svn+   $ cd crossfire-crossfire-server
  
 This confirms that you are in the server directory This confirms that you are in the server directory
  
    $ pwd    $ pwd
-   /​home/<​username>/​server.svn+   /​home/<​username>/​crossfire-crossfire-server 
 + 
 +Now change directory again to the lib folder 
 + 
 +   $ cd lib 
 +    
 +Make sure you are in the correct directory with the pwd command 
 + 
 +   $ pwd 
 +   /​home/<​username>/​crossfire-crossfire-server/​lib
  
 This step "​links"​ two directories to each other which makes the compile process more automated This step "​links"​ two directories to each other which makes the compile process more automated
  
-   $ ln -s /​home/<​username>/​maps.svn maps+   $ ln -s /​home/<​username>/​crossfire-crossfire-mapsmaps
  
 This step "​links"​ two directories to each other which makes the compile process more automated and is used by the server once Crossfire server is up and running. This links the server to the map files which you downloaded earlier. This step "​links"​ two directories to each other which makes the compile process more automated and is used by the server once Crossfire server is up and running. This links the server to the map files which you downloaded earlier.
  
-First, create the necessary directory tree for the map files with this command:+Next, create the necessary directory tree for the game files with this command:
  
    $ sudo mkdir -p /​usr/​games/​crossfire/​share/​crossfire    $ sudo mkdir -p /​usr/​games/​crossfire/​share/​crossfire
Line 149: Line 494:
 What that does, is it creates a directory located here:  /​usr/​games/​crossfire/​share/​crossfire and changes the ownership of this directory to your user What that does, is it creates a directory located here:  /​usr/​games/​crossfire/​share/​crossfire and changes the ownership of this directory to your user
  
-Now this step "​links"​ two directories to each other which makes the compile process more automated+Some distributions may require ​the chown command to run as this format instead
  
-   ​$ ​ ​ln ​-s /home/<​username>​/​maps.svn ​/​usr/​games/​crossfire/​share/​crossfire/​maps+   ​$ ​sudo chown -R <​username>:​<​username>​ /​usr/​games/​crossfire/​
  
-Now change directory (hence the cd) to the directory that contains the library files+Now this step "​links"​ two directories ​to each other which makes the compile process more automated
  
-   ​$ ​cd lib+   ​$ ​ ln -s /​home/<​username>/​crossfire-crossfire-maps /​usr/​games/​crossfire/​share/​crossfire/​maps
  
-Double check that you are in the correct directory+Double check again that you are in the correct directory
  
    $ pwd    $ pwd
-   /​home/<​username>/​server.svn/lib+   /​home/<​username>/​crossfire-crossfire-server/lib 
 + 
 +This step "​links"​ two directories to each other which makes the compile process more automated. This links the arch or archetype files to the server files which you downloaded earlier. 
 + 
 +   $ ln -s /​home/<​username>/​crossfire-crossfire-arch ./arch 
 + 
 +Make sure you have the maps and archetype directories properly linked by using this command:
  
-This step "​links" ​two directories to each other which makes the compile process more automated. This links the arch or archetype files to the server files which you downloaded earlier. ​+   $ ls -la 
 +    
 +You will see multiple lines of output, but these are the two important ones you are looking for:
  
-   $ ln -/​home/<​username>/​arch.svn ./arch+   arch -/​home/<​username>/​crossfire-crossfire-arch/ 
 +   maps -> /​home/<​username>/​crossfire-crossfire-maps/​
  
 Go back another directory Go back another directory
Line 173: Line 527:
  
    $ pwd    $ pwd
-   /​home/<​username>/​server.svn+   /​home/<​username>/​crossfire-crossfire-server
  
 ==== COMPILE ==== ==== COMPILE ====
  
-SVN commit ​(~2007-Mar-30) changed the build process for the server; use the following command in the server root directory:+Code update ​(~2007-Mar-30) changed the build process for the server; use the following command in the server root directory:
  
   $ sh autogen.sh && make && sudo make install   $ sh autogen.sh && make && sudo make install
Line 208: Line 562:
   $ ./configure && make -k check && make install   $ ./configure && make -k check && make install
  
-If you have modified any archetypes use:+**Optional:​** ​If you have modified any archetypes use:
  
   $ cd lib && rm archetypes && make archetypes && cd .. && sh autogen.sh && make && sudo make install   $ cd lib && rm archetypes && make archetypes && cd .. && sh autogen.sh && make && sudo make install
  
-More information at: [[:​making_archetypes?&#testing_archetypes]]+More information at: [[:arch:​making_archetypes#​Testing Archetypes]]
  
 +==== LAUNCH ====
  
- 
- 
-==== LAUNCH ==== 
 Once the server has been successfully built (aka compiled), you need to launch the Crossfire Server application Once the server has been successfully built (aka compiled), you need to launch the Crossfire Server application
  
Line 223: Line 575:
  
    $ pwd    $ pwd
-   /​home/<​username>/​server.svn+   /​home/<​username>/​crossfire-crossfire-server
  
 Change directory the server directory Change directory the server directory
Line 232: Line 584:
  
    $ pwd    $ pwd
-   /​home/<​username>/​server.svn/server+   /​home/<​username>/​crossfire-crossfire-server/​server
  
-Just before launching it is worth while just to make sure all the permissions are correct for the server. If not, the server will not be able to write and characters will not be saved. To do so re-run:+Just before launching it is worth while just to make sure all the permissions are correct for the server. If not, the server will not be able to write and characters will not be saved. To do sore-run:
  
    $ sudo chown -R <​username>​.<​username>​ /​usr/​games/​crossfire/​    $ sudo chown -R <​username>​.<​username>​ /​usr/​games/​crossfire/​
 +
 +Or, in some distros require the chown command in this syntax:
 +
 +   $ sudo chown -R <​username>:<​username>​ /​usr/​games/​crossfire/​
  
 Run this command to launch the server: Run this command to launch the server:
Line 248: Line 604:
   $ /​usr/​games/​crossfire/​bin/​crossfire-server &   $ /​usr/​games/​crossfire/​bin/​crossfire-server &
  
-=== failure ​to launch ​===+ 
 +===== Updating Server Components ===== 
 + 
 +Instructions for obtaining the latest source code for the server components of Archetypes, Maps, and Server using the git pull command.  
 + 
 +It is recommended to update all components at the same time as some changes are dependent on each other. For instance, a new archetype or graphic is used by a map or server code change to fix a problem with an archetype or map. 
 + 
 +==== Archetypes ==== 
 + 
 +Change (cd) in to the the Archetypes directory that was created in the earlier steps. 
 + 
 +    $ cd crossfire-crossfire-arch/​ 
 + 
 +Make sure you are in the archetypes directory by using the pwd command 
 + 
 +    $ pwd 
 +    /​home/<​username>/​crossfire-crossfire-arch 
 + 
 +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. 
 + 
 +==== Maps ====  
 + 
 +Now change to the Maps directory - assuming you are still in the archetypes directory, run this extra command: 
 + 
 +    $ cd .. 
 +    $ cd crossfire-crossfire-maps/​  
 + 
 +Make sure you are in the maps directory by using the pwd command 
 + 
 +    $ pwd 
 +    /​home/<​username>/​crossfire-crossfire-maps 
 + 
 +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. 
 + 
 +==== Server ==== 
 + 
 +Now change to the Server directory - assuming you are still in the maps directory, run this extra command: 
 + 
 +    $ cd .. 
 +    $ cd crossfire-crossfire-server/​  
 + 
 +Make sure you are in the maps directory by using the pwd command 
 + 
 +    $ pwd 
 +    /​home/<​username>/​crossfire-crossfire-server 
 + 
 +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. 
 + 
 +While still in the server directory, now run the compile instructions,​ listed above (hint: sh autogen.sh && make && sudo make install)  
 + 
 +===== Troubleshooting ===== 
 + 
 +=== Failure ​to Launch ​===
 If crossfire-server is unable to locate the maps file it may be because the chown command didn't work. You may see an error like: If crossfire-server is unable to locate the maps file it may be because the chown command didn't work. You may see an error like:
  
Line 258: Line 693:
  
   $ sudo chown -R <​username>​.<​username>​ /​usr/​games/​crossfire/​   $ sudo chown -R <​username>​.<​username>​ /​usr/​games/​crossfire/​
-  $ ln -s /​home/​crossfire/​maps.svn /​usr/​games/​crossfire/​share/​crossfire/​maps 
  
 Note, great care should be taken in using chown -R as this will change all permissions in the parent directory (e.g. if you " $ sudo chown -R <​username>​.<​username>​ /" you will break your linux install'​s permissions completely) Note, great care should be taken in using chown -R as this will change all permissions in the parent directory (e.g. if you " $ sudo chown -R <​username>​.<​username>​ /" you will break your linux install'​s permissions completely)
 +
 +A permission error such as this:
 +   [EE] /​usr/​games/​crossfire/​var/​crossfire/​clockdata.tmp:​ Permission denied
 +   
 +Can be fixed by running this command again, be sure to correctly replace the <​username>​ reference with the user who will be launching the server:
 +
 +  $ sudo chown -R <​username>​.<​username>​ /​usr/​games/​crossfire
 +  ​
 +A message about a missing accounts directory can be ignored because no player files or accounts have been created yet.
 +
 +  [II] Warning: Unable to open /​usr/​games/​crossfire/​var/​crossfire/​accounts [No such file or directory]
  
 === Crossloop === === Crossloop ===
-This might be a good time to setup [[server:​hosting#​crossloop|crossloop]]. ​+This might be a good time to setup [[:server:​hosting#​crossloop]] .
  
-==== UPDATE ==== 
  
-To update an existing install to the latest svn image; 
  
-This confirms that you are still in your home directory+===== Additional Steps =====
  
-   $ pwd +Sometimes additional steps are required to compile the server after major development or code changes. Under most cicrcumstances,​ these steps are not needed. Bu they are being documented here just in case.
-   /​home/<​username>​+
  
-Now change directory (hence the cd) to the directory that contains the server files+Listed below are some of thoes steps:
  
-   $ cd server.svn+==== Recollect archetypes ====
  
-This confirms that you are in the server ​directory+Change directories to crossfire-crossfire-server/lib
  
-   $ pwd +  ​cd crossfire-crossfire-server/​lib 
-   /​home/<​username>/​server.svn+   
 +Make sure you are in the correct directory with the pwd command
  
-This updates the directory using svn+  $ pwd 
 +  /​home/<​username>/​crossfire-crossfire-server/​lib
  
-  $ svn update+Then run
  
-repeat for +  $ make do-collect 
 +   
 +Then change back to the crossfire-crossfire-server directory ​
  
-maps.svn +  $ cd .. 
-arch.svn+   
 +Make sure you are in the server directory
  
-and repeat section "​COMPILE"​+  $ pwd 
 +  /​home/<​username>/​crossfire-crossfire-server
  
 +Repeat the steps listed under "​COMPILE"​
 +
 +==== Autoreconf ====
 +
 +Make sure you are in the server directory
 +
 +  $ pwd
 +  /​home/<​username>/​crossfire-crossfire-server
 +
 +Run the autoreconf command
 +
 +  $ autoreconf -i
 +  ​
 +Repeat the steps listed under "​COMPILE"​
 +
 +==== Sudo Make Clean ====
 +
 +Make sure you are in the server directory
 +
 +  $ pwd
 +  /​home/<​username>/​crossfire-crossfire-server
 +
 +Run the clean command
 +
 +  $ sudo make clean
 +  ​
 +Repeat the steps listed under "​COMPILE"​
 ===== Microsoft Windows Compile Guide ===== ===== Microsoft Windows Compile Guide =====
-Warning this information may be out of date+ 
 +FIXME - Warning this information may be out of date 
 + 
 +FIXME - Needs updates to reference Git instead of Subversion (aka SVN)
  
 ==== Subversion ==== ==== Subversion ====
Line 344: Line 822:
  
 ==== Cross-Compiling ==== ==== Cross-Compiling ====
-It may be possible to [[user:​cavesomething:​crosscompiling_for_windows|cross-compile]] ​Windows ​binaries from Unix.+It may be possible to [[:user:​cavesomething:​crosscompiling_for_windows|cross-compile ​Windows]] binaries from Unix. 
 + 
 +===== Setting up your server ===== 
 +Visit the server [[server:​hosting]] page for information on setting up a server. 
server/server_compiling.1505526509.txt.gz · Last modified: 2017/09/15 20:48 by saru