Difference between revisions of "Building Ryzom Client On Debian"

From Ryzom Forge Wiki

Jump to: navigation, search
(Downloading ryzom dependencies)
 
Line 1: Line 1:
 +
{{migrated to|:en:Building Ryzom Client On Debian}}
 
== General ==
 
== General ==
  

Latest revision as of 19:15, 25 June 2018

Migration

Please use the migrated document at URL shown below.

Migrated to en:Building Ryzom Client On Debian at 2018-06-25

General

This page applies for Debian-based GNU/Linux distributions. It should work on other linux distribution too, but some package name might change. To compile Ryzom client under Mac OS X, please check this page : Building Ryzom Client On Mac OS X. For Archlinux, check Building Ryzom Client On Archlinux

If you are building the client for your own computer, build a dynamically linked version. If you are building it for other people, it's probably safer to build a statically linked version (note : you should use a distribution with a not too recent libc6, if you want it to work on as many platforms as possible. I recommend a debian Jessie, and doing that in a chroot or a VM).

Lines starting with a $ are meant to be run as a regular user, while lines starting with a # are meant to be run as root.

Common steps

Downloading ryzom dependencies

Tools needed to build the client :

# apt install mercurial autoconf automake cmake libtool build-essential bison

Libraries needed :

# apt install libluabind-dev libfreetype6-dev libcurl4-openssl-dev libx11-dev \
libgl1-mesa-dev libxxf86vm-dev libxrandr-dev libxrender-dev libopenal-dev \
libogg-dev libvorbis-dev libxml2-dev libpng-dev libjpeg-dev libxmu-dev libssl-dev liblzma-dev

If you are using debian jessie (or older), the CMake version in the repo is too old. You need to take it from jessie-backports (or, for earlier version than jessie, compile it yourself), for that, add to your /etc/apt/sources.list :

deb http://ftp.debian.org/debian/ jessie-backports main

Then, update & install :

# apt update
# apt install -t jessie-backports cmake

Getting ryzom code

$ cd ~
$ hg clone https://bitbucket.org/ryzom/ryzomcore

We just need to switch branch (very important)

$ cd ryzomcore
$ hg update -c compatibility-develop

If you need to update the code later, just type :

$ hg pull && hg update

Dynamically linked version

Building ryzom

(Assuming you are in the ryzomcore folder you got in #Getting ryzom code)

$ cmake -DWITH_RYZOM_CLIENT=ON -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_DRIVER_OPENGL=ON -DWITH_QT=OFF -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_SERVER=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_SNOWBALLS=OFF -DWITH_NEL_TOOLS=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_RYZOM_PATCH=ON ../code

Let's build ! replace n with the number of your cores

$ make -jn ryzom_client

Play ryzom

Copy the bin/ryzom_client executable in your ryzom folder (if you are using ryzom installer, it's in ~/.local/share/Ryzom/ryzom_live/). I recommend changing the file name to ryzom_client_compiled or something, or it will replace itself with a patched version everytime you run it (assuming you didn't disabled the patch at compilation), and change the executable your profile use (or directly change the value "client_filename_linux" in your server configuration, in ryzom_installer.ini)

That's it !

Static version

Compiling ryzom dependencies

Note : this is done on a debian jessie, debian stretch (and possibly sid) will have multiples issues with -fPic, needing you to recompile a shitton of library(openssl, gif, curl, almost anything really), so i recommend sticking with jessie.

We just need to build curl ; Grab it from kervala's packaging repository :

$ hg clone http://hg.kervala.net/packaging/
$ cd packaging/curl
$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Release -DCURL_ZLIB=ON -DBUILD_CURL_EXE=OFF -DBUILD_CURL_TESTS=OFF -DCURL_STATICLIB=ON -DHTTP_ONLY=ON -DENABLE_IPV6=ON -DCMAKE_USE_OPENSSL=ON -DOPENSSL_SSL_LIBRARIES=/usr/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARIES=/usr/lib/libcrypto.a -DCMAKE_USE_LIBSSH2=OFF -DZLIB_LIBRARY=/usr/lib/libz.a ..
$ make
# make install 

Building Ryzom

(Assuming you are in the ryzomcore folder you got in #Getting ryzom code)

$ mkdir build_static && cd build_static

(Cmake options are almost the same, we need to use our compiled curl library, and use static_external):

Let's build ! replace n with the number of your cores

$ make -jn ryzom_client

Further reading on static building

If you actually want to regularely build static ryzom client, you should check [scripts], they are very complete and allow you to completely automate your build process.


5 pages in Linux

Ryzom Wiki: Ryzom Commons | DE • EN • ESFRRU | Ryzom Forge