Difference between revisions of "Linux generic installation"

From Ryzom Forge Wiki

Jump to: navigation, search
m
(Major update for v3)
Line 6: Line 6:
 
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 installation ==
+
== From the official archive ==
 
 
=== 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 <code>wget</code> and <code>7z</code>. Then, retrieve the compressed Ryzom archive using the following commands:
 
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"
 
<pre>mkdir -p "$HOME/ryzom"
wget http://freefr.dl.sourceforge.net/project/ryzom/ryzom_client.7z
+
wget "http://netix.dl.sourceforge.net/project/ryzom/installer/ryzom_live_client_linux$(test $(uname -m) = 'x86_64' && echo 64 || echo 32).7z"
7z x ryzom_client.7z -o"$HOME"
+
wget "http://netix.dl.sourceforge.net/project/ryzom/installer/ryzom_live_data.7z"
rm ryzom_client.7z
+
7z x "ryzom_live_client_linux$(test $(uname -m) = 'x86_64' && echo 64 || echo 32).7z" -o"$HOME/ryzom/"
 +
7z x "ryzom_live_data.7z" -o"$HOME/ryzom/"
 +
rm -f "ryzom_live_client_linux$(test $(uname -m) = 'x86_64' && echo 64 || echo 32).7z" "ryzom_live_data.7z"
 
</pre>
 
</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.
+
== Starting script (optional) ==
 
 
=== 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>
 
 
 
You can start the pre-compiled 32bits client with the following command:
 
<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 (name it <code>/usr/bin/ryzom</code>):
+
If you do not already have one, create a custom directory where you can store executable files:
  
<pre>#!/bin/sh
+
<pre>mkdir -p "$HOME/bin"
 
+
[[ ":$PATH:" == *":$HOME/bin:"* ]] || export PATH="$HOME/bin:$PATH"
ROOT_PATH="$HOME/ryzom"
+
echo '[[ ":$PATH:" == *":$HOME/bin:"* ]] || export PATH="$HOME/bin:$PATH"' >>"$HOME/.bashrc"
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
 
 
</pre>
 
</pre>
  
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.
+
Create the <code>$HOME/bin/ryzom</code> file with the following content and change <code>your_account_name_goes_here</code> with your account name.
 
 
 
 
== 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].
 
 
 
<pre>cd "$HOME/ryzom"
 
hg clone https://bitbucket.org/ryzom/ryzomcore
 
cd ryzomcore
 
hg update -c compatibility
 
</pre>
 
 
 
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 <code>$HOME/ryzom/compile_client.sh</code>.
 
  
 
<pre>#!/bin/sh
 
<pre>#!/bin/sh
  
#
+
set -euo pipefail
# DOC: https://ryzomcore.atlassian.net/wiki/display/RC/Build+Source+on+Linux
+
IFS=$'\n\t'
#
 
 
 
set -e
 
  
RYHOME="$HOME/ryzom/ryzomcore/code"
+
DEFAULT_ACCOUNT="your_account_name_goes_here"
 +
ACCOUNT="$DEFAULT_ACCOUNT"
 +
RYZOM_DOMAIN="ryzom.com"
 +
RYZOM_DIR="$HOME/ryzom"
 +
RYZOM_CLIENT="ryzom_client"
  
if [ ! -d "$RYHOME/build" ]; then
+
if [ $# -ge 1 ]; then
     mkdir "$RYHOME/build"
+
     ACCOUNT="$1"
 
fi
 
fi
cd "$RYHOME/build"
 
  
# Updating the code
+
hash pass 2>/dev/null && pass -c "$RYZOM_DOMAIN/$ACCOUNT"
hg pull
+
cd "$RYZOM_DIR"
hg update
+
"$RYZOM_DIR/$RYZOM_CLIENT" "$ACCOUNT"</pre>
  
# Ugly hack
+
Now set the starting script executable:
sed -i "s/OPTIONAL/REQUIRED/" "../CMakeModules/FindLibwww.cmake"
+
<pre>chmod a+x "$HOME/bin/ryzom"</pre>
  
# Let's compile
+
You can now start Ryzom with an automatic login using the <code>ryzom</code> command. To start Ryzom with another account, you can use the <code>ryzom account_name</code> command.
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"
 
</pre>
 
 
 
Please note that you may have to adjust your cmake flags. For example, on ArchLinux, add <code>-DFREETYPE_LIBRARY=/usr/lib/libfreetype.so -DFREETYPE_INCLUDE_DIR=/usr/include/freetype2/ -DFREETYPE_INCLUDE_DIRS=/usr/include/freetype2/</code>. On some distributions, the "ugly hack" part isn't needed.
 
 
 
In order to use the client, we need to change our starting script (<code>/usr/bin/ryzom</code>):
 
<pre>#!/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
 
</pre>
 
 
 
And that's it. Please note that:
 
* The run script updates only the data.
 
* You need to run <code>$HOME/ryzom/compile_client.sh</code> 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 <code>$HOME/ryzom/ryzomcore/code/build/bin/ryzom_client</code>.
 
  
 
== Auto-login using pass ==
 
== Auto-login using pass ==
  
[http://www.passwordstore.org/ pass] can be used to handle your account password. In <code>/usr/bin/ryzom</code>, replace the last line (<code>./ryzom_client</code>) by:
+
[http://www.passwordstore.org/ pass] can be used to handle your account password. The starting script already handles it providing you store your password under <code>ryzom.com/account_name</code>. At startup, your password will be in your clipboard for a few seconds so you can simply paste it into the field. Obviously, you can store passwords for multiple accounts using the same pattern.
 
 
<pre>if [ "$1" != "" ]; then
 
    ./ryzom_client "$1" $(pass show "ryzom.com/$1")
 
else
 
    ./ryzom_client
 
fi
 
</pre>
 
 
 
Store your account password under <code>ryzom.com/accountname</code>:
 
 
 
<pre>pass insert ryzom.com/accountname</pre>
 
 
 
You can now start Ryzom with an automatic login using the following command:
 
  
<pre>ryzom accountname</pre>
 
  
 
{{In_Category|Linux}}
 
{{In_Category|Linux}}

Revision as of 18:58, 29 October 2016

Flag-DE

Übersetzung , bitte.

Flag-ES

Traducción, por favor.

Flag-RU

перевод, пожалуйста.


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.

From the official archive

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://netix.dl.sourceforge.net/project/ryzom/installer/ryzom_live_client_linux$(test $(uname -m) = 'x86_64' && echo 64 || echo 32).7z"
wget "http://netix.dl.sourceforge.net/project/ryzom/installer/ryzom_live_data.7z"
7z x "ryzom_live_client_linux$(test $(uname -m) = 'x86_64' && echo 64 || echo 32).7z" -o"$HOME/ryzom/"
7z x "ryzom_live_data.7z" -o"$HOME/ryzom/"
rm -f "ryzom_live_client_linux$(test $(uname -m) = 'x86_64' && echo 64 || echo 32).7z" "ryzom_live_data.7z"

Starting script (optional)

If you do not already have one, create a custom directory where you can store executable files:

mkdir -p "$HOME/bin"
[[ ":$PATH:" == *":$HOME/bin:"* ]] || export PATH="$HOME/bin:$PATH"
echo '[[ ":$PATH:" == *":$HOME/bin:"* ]] || export PATH="$HOME/bin:$PATH"' >>"$HOME/.bashrc"

Create the $HOME/bin/ryzom file with the following content and change your_account_name_goes_here with your account name.

#!/bin/sh

set -euo pipefail
IFS=$'\n\t'

DEFAULT_ACCOUNT="your_account_name_goes_here"
ACCOUNT="$DEFAULT_ACCOUNT"
RYZOM_DOMAIN="ryzom.com"
RYZOM_DIR="$HOME/ryzom"
RYZOM_CLIENT="ryzom_client"

if [ $# -ge 1 ]; then
    ACCOUNT="$1"
fi

hash pass 2>/dev/null && pass -c "$RYZOM_DOMAIN/$ACCOUNT"
cd "$RYZOM_DIR"
"$RYZOM_DIR/$RYZOM_CLIENT" "$ACCOUNT"

Now set the starting script executable:

chmod a+x "$HOME/bin/ryzom"

You can now start Ryzom with an automatic login using the ryzom command. To start Ryzom with another account, you can use the ryzom account_name command.

Auto-login using pass

pass can be used to handle your account password. The starting script already handles it providing you store your password under ryzom.com/account_name. At startup, your password will be in your clipboard for a few seconds so you can simply paste it into the field. Obviously, you can store passwords for multiple accounts using the same pattern.


5 pages in Linux

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