Difference between revisions of "Linux generic installation"

From Ryzom Forge Wiki

Jump to: navigation, search
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{tabLang|EN|DE|{{FULLPAGENAME}}|ES|FR|RU}}
+
{{Migrated to|:en:Linux generic installation}}
 
+
{{tabLang|EN|Generisches Linux Installation|Linux generic installation|Instalación de Linux genérico|Installation Linux Générique|Общий Установка Linux}}
{{ToTrad|DE|DE translation needed please.}}
+
{{toTrad|DE}}
{{ToTrad|EN|EN translation needed please.}}
+
{{toTrad|ES}}
{{ToTrad|FR|FR translation needed please.}}
+
{{toTrad|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.
 
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 ==
+
== From the official archive ==
 
 
You can use rsync to get the Ryzom data and a 32bits client.
 
 
 
<pre>mkdir "$HOME/ryzom"
 
rsync -rtzv --progress --stats www.ryzom.com::ryzom "$HOME/ryzom/client"</pre>
 
 
 
You can start the client with the following command:
 
<code>"$HOME/ryzom/client/ryzom_client"</code>
 
 
 
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>
 
 
 
<pre>#!/bin/sh
 
 
 
ROOT_PATH="$HOME/ryzom"
 
CLIENT_PATH="$ROOT_PATH/client"
 
  
if [ ! $(pidof ryzom_client) ]; then
+
First, you may need to install <code>wget</code> and <code>7z</code>. Then, retrieve the compressed Ryzom archive using the following commands:
    rsync -rtzv --progress --stats www.ryzom.com::ryzom "$CLIENT_PATH"
 
fi
 
  
cd "$CLIENT_PATH"
+
<pre>mkdir -p "$HOME/ryzom"
./ryzom_client
+
wget -O "ryzom_live_client_linux.7z" "https://sourceforge.net/projects/ryzom/files/installer/ryzom_live_client_linux$(test $(uname -m) = 'x86_64' && echo 64 || echo 32).7z/download"
 +
wget -O "ryzom_live_data.7z" "https://sourceforge.net/projects/ryzom/files/installer/ryzom_live_data.7z/download"
 +
7z x "ryzom_live_client_linux.7z" -o"$HOME/ryzom/"
 +
7z x "ryzom_live_data.7z" -o"$HOME/ryzom/"
 +
rm -f "ryzom_live_client_linux.7z" "ryzom_live_data.7z"
 
</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.
+
== Starting script (optional) ==
 
 
  
== Bleeding edge client ==
+
If you do not already have one, create a custom directory where you can store executable files:
  
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>mkdir -p "$HOME/bin"
 
+
echo '[[ ":$PATH:" == *":$HOME/bin:"* ]] || export PATH="$HOME/bin:$PATH"' >>"$HOME/.bashrc"
<pre>cd "$HOME/ryzom"
+
source "$HOME/.bashrc"
hg clone https://bitbucket.org/ryzom/ryzomcore
 
cd ryzomcore
 
hg update -c compatibility
 
 
</pre>
 
</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>.
+
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.
  
<pre>#
+
<pre>#!/bin/sh
# DOC: https://ryzomcore.atlassian.net/wiki/display/RC/Build+Source+on+Linux
 
#
 
  
set -e
+
set -euo pipefail
 +
IFS=$'\n\t'
  
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 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
+
== Password management (optional) ==
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:
+
[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.
* 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>.
 
  
  
{{TPInWikiRyzom}}
+
{{In_Category|Linux}}
[[Category:Tutorials]][[Category:EN]][[Category:Linux]] [[Category:Support]]
+
{{TPInWikiRyzom‎}}
 +
[[Category:Support]]
 +
[[Category:Linux]]  
 +
[[Category:EN]]

Latest revision as of 14:00, 22 July 2018

Migration

Please use the migrated document at URL shown below.

Migrated to en:Linux generic installation at 2018-07-22

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

First, you may need to install wget and 7z. Then, retrieve the compressed Ryzom archive using the following commands:

mkdir -p "$HOME/ryzom"
wget -O "ryzom_live_client_linux.7z" "https://sourceforge.net/projects/ryzom/files/installer/ryzom_live_client_linux$(test $(uname -m) = 'x86_64' && echo 64 || echo 32).7z/download"
wget -O "ryzom_live_data.7z" "https://sourceforge.net/projects/ryzom/files/installer/ryzom_live_data.7z/download"
7z x "ryzom_live_client_linux.7z" -o"$HOME/ryzom/"
7z x "ryzom_live_data.7z" -o"$HOME/ryzom/"
rm -f "ryzom_live_client_linux.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"
echo '[[ ":$PATH:" == *":$HOME/bin:"* ]] || export PATH="$HOME/bin:$PATH"' >>"$HOME/.bashrc"
source "$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 using the ryzom command. To start Ryzom with another account, you can use the ryzom account_name command.

Password management (optional)

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