Difference between revisions of "Linux generic installation"

From Ryzom Forge Wiki

Jump to: navigation, search
m (Link towards FR page)
(Rewriting the basic installation part to include the archive)
Line 5: Line 5:
 
In this tutorial, we will cover the installation and configuration of the Ryzom client itself. We will not document how to install dependencies for it can change from a distribution to another.
 
In this tutorial, we will cover the installation and configuration of the Ryzom client itself. We will not document how to install dependencies for it can change from a distribution to another.
  
== Basic install ==
+
== Basic installation ==
  
You can use rsync to get the Ryzom data and a 32bits client.
+
=== Step 1: From the archive (recommended) ===
  
<pre>mkdir "$HOME/ryzom"
+
This is optional but highly recommended in order to speed up the installation process and spare your internet connection. First, you may need to install <code>wget</code> and <code>7z</code>. Then, retrieve the compressed Ryzom archive using the following commands:
 +
 
 +
<pre>mkdir -p "$HOME/ryzom"
 +
wget http://freefr.dl.sourceforge.net/project/ryzom/ryzom_client.7z
 +
7z e ryzom_client.7z -o"$HOME/ryzom"
 +
rm ryzom_client.7z
 +
</pre>
 +
 
 +
If you are prompted with a message like '''already exists. Overwrite with ryzom/data/exedll.bnp? (Y)es / (N)o / (A)lways / (S)kip all / A(u)to rename all / (Q)uit?''', answer '''A'''. Some components of this archive are out of date, therefore the next step is to synchronize it with the latest version available.
 +
 
 +
=== Step 2: Having an up-to-date directory (required) ===
 +
 
 +
Install <code>rsync</code> and use it to get the latest version of Ryzom:
 +
 
 +
<pre>mkdir -p "$HOME/ryzom"
 
rsync -rtzv --progress --stats www.ryzom.com::ryzom "$HOME/ryzom/client"</pre>
 
rsync -rtzv --progress --stats www.ryzom.com::ryzom "$HOME/ryzom/client"</pre>
  
You can start the client with the following command:
+
You can start the pre-compiled 32bits client with the following command:
<code>"$HOME/ryzom/client/ryzom_client"</code>
+
<pre>"$HOME/ryzom/client/ryzom_client"</pre>
  
To keep the directory up to date and start the client more easily, you can use the following script and put it in <code>/usr/bin/ryzom</code>
+
To keep the directory up to date and start the client more easily, you can use the following script (name it <code>/usr/bin/ryzom</code>):
  
 
<pre>#!/bin/sh
 
<pre>#!/bin/sh
Line 30: Line 44:
 
</pre>
 
</pre>
  
Don't forget to make the script executable using <code>chmod a+x /usr/bin/ryzom</code>. Now, using the '''ryzom''' command the client client will be upgraded (if needed) and start it.
+
Don't forget to make the script executable using <code>chmod a+x /usr/bin/ryzom</code>. Now, using the <code>ryzom</code> command to start Ryzom.
  
  
== Bleeding edge client ==
+
== Bleeding edge client (optional) ==
  
 
If the pre-compiled 32bits client doesn't suit your needs, you can compile it yourself from the source code. You can find the dependencies and how to install them on most distribution on the [https://ryzomcore.atlassian.net/wiki/display/RC/Build+Source+on+Linux Ryzom Core documentation].
 
If the pre-compiled 32bits client doesn't suit your needs, you can compile it yourself from the source code. You can find the dependencies and how to install them on most distribution on the [https://ryzomcore.atlassian.net/wiki/display/RC/Build+Source+on+Linux Ryzom Core documentation].

Revision as of 18:00, 29 August 2014

Flag-DE

DE translation needed please.


In this tutorial, we will cover the installation and configuration of the Ryzom client itself. We will not document how to install dependencies for it can change from a distribution to another.

Basic installation

Step 1: From the archive (recommended)

This is optional but highly recommended in order to speed up the installation process and spare your internet connection. First, you may need to install wget and 7z. Then, retrieve the compressed Ryzom archive using the following commands:

mkdir -p "$HOME/ryzom"
wget http://freefr.dl.sourceforge.net/project/ryzom/ryzom_client.7z
7z e ryzom_client.7z -o"$HOME/ryzom"
rm ryzom_client.7z

If you are prompted with a message like already exists. Overwrite with ryzom/data/exedll.bnp? (Y)es / (N)o / (A)lways / (S)kip all / A(u)to rename all / (Q)uit?, answer A. Some components of this archive are out of date, therefore the next step is to synchronize it with the latest version available.

Step 2: Having an up-to-date directory (required)

Install rsync and use it to get the latest version of Ryzom:

mkdir -p "$HOME/ryzom"
rsync -rtzv --progress --stats www.ryzom.com::ryzom "$HOME/ryzom/client"

You can start the pre-compiled 32bits client with the following command:

"$HOME/ryzom/client/ryzom_client"

To keep the directory up to date and start the client more easily, you can use the following script (name it /usr/bin/ryzom):

#!/bin/sh

ROOT_PATH="$HOME/ryzom"
CLIENT_PATH="$ROOT_PATH/client"

if [ ! $(pidof ryzom_client) ]; then
    rsync -rtzv --progress --stats www.ryzom.com::ryzom "$CLIENT_PATH"
fi

cd "$CLIENT_PATH"
./ryzom_client

Don't forget to make the script executable using chmod a+x /usr/bin/ryzom. Now, using the ryzom command to start Ryzom.


Bleeding edge client (optional)

If the pre-compiled 32bits client doesn't suit your needs, you can compile it yourself from the source code. You can find the dependencies and how to install them on most distribution on the Ryzom Core documentation.

cd "$HOME/ryzom"
hg clone https://bitbucket.org/ryzom/ryzomcore
cd ryzomcore
hg update -c compatibility

Instead of coming back to this wiki each time you want to compile the Ryzom client, create the following script. It's a good idea to put it in $HOME/ryzom/compile_client.sh.

#
# DOC: https://ryzomcore.atlassian.net/wiki/display/RC/Build+Source+on+Linux
# 

set -e

RYHOME="$HOME/ryzom/ryzomcore/code"

if [ ! -d "$RYHOME/build" ]; then
    mkdir "$RYHOME/build"
fi
cd "$RYHOME/build"

# Updating the code
hg pull
hg update

# Ugly hack
sed -i "s/OPTIONAL/REQUIRED/" "../CMakeModules/FindLibwww.cmake"

# Let's compile
cmake -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_NEL_TOOLS=OFF -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_QT=OFF ..
make -j4

# Reverting the ugly hack
hg revert "../CMakeModules/FindLibwww.cmake"

Please note that you may have to adjust your cmake flags. For example, on ArchLinux, add -DFREETYPE_LIBRARY=/usr/lib/libfreetype.so -DFREETYPE_INCLUDE_DIR=/usr/include/freetype2/ -DFREETYPE_INCLUDE_DIRS=/usr/include/freetype2/. On some distributions, the "ugly hack" part isn't needed.

In order to use the client, we need to change our starting script (/usr/bin/ryzom):

#!/bin/sh

ROOT_PATH="$HOME/ryzom"
CLIENT_PATH="$ROOT_PATH/client"
CLIENT_EXE="$CLIENT_PATH/ryzom_client"
CLIENT_SAVE="$CLIENT_EXE.save"
CLIENT_CUSTOM="$ROOT_PATH/ryzomcore/code/build/bin/ryzom_client"

if [ ! $(pidof ryzom_client) ]; then
    if [ -f "$CLIENT_SAVE" ]; then
	cp -v "$CLIENT_SAVE" "$CLIENT_EXE"
    fi

    rsync -rtzv --progress --stats www.ryzom.com::ryzom "$CLIENT_PATH"

    if [ -f "$CLIENT_CUSTOM" ]; then
	mv "$CLIENT_EXE" "$CLIENT_SAVE"
	cp -v "$CLIENT_CUSTOM" "$CLIENT_EXE"
    fi
fi

cd "$CLIENT_PATH"
./ryzom_client

And that's it. Please note that:

  • The run script updates only the data.
  • You need to run $HOME/ryzom/compile_client.sh manually to compile a new client.
  • The run script will use your custom client only if it's available. Therefore, if you want to use the pre-compiled one, simple move or delete $HOME/ryzom/ryzomcore/code/build/bin/ryzom_client.


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