TECHNICAL SUPPORT / WEB APPs BUGS


Character creation - Nothing but green box

#!/bin/sh

P7ZIP=/usr/bin/7z
RSYNC=/usr/bin/rsync
WGET=/usr/bin/wget
ZENITY=/usr/bin/zenity
RYZOM_CLIENT=/opt/ryzom/ryzom_client
RYZOM_CONFIG_DEFAULT=/opt/ryzom/client_default.cfg
RYZOM_CONFIG=~/.ryzom/client.cfg

RYZOM_DIR=~/.ryzom
DATA_DIR=$RYZOM_DIR/data

if [ ! -d "$DATA_DIR" ]
then
  mkdir -p "$DATA_DIR"
fi

# Check if a directory contains Ryzom data
ryzom_data_found()
{
  # Check for directory, gamedev.bnp and ryzom.ttf
  COUNT=0

  if [ -d $1 ]
  then
    # If there are a least 220 bnp files, we could use this directory
    # There are 226 bnp files in last version
    COUNT=$(find -L $1 -name *.bnp | wc -l)
  fi

  echo $COUNT
}

COUNT=$(ryzom_data_found $DATA_DIR)

echo "Found $COUNT BNP files in $DATA_DIR"

if [ $COUNT -lt 220 ] && [ -f $WGET ] && [ -f $P7ZIP ]
then
  mkdir -p "$DATA_DIR/tmp"

  # Check free diskspace
  echo "Checking for free disk space..."
  DISKSPACE=$(df "$DATA_DIR/tmp" | grep "/dev" | awk '{print $4}')
  if [ $? -ne 0 ]
  then
    exit 1
  fi
  if [ "$DISKSPACE" -lt "8000000" ]
  then
    $ZENITY --error --title="Ryzom" --text="You don't have enough free space to download and uncompress Ryzom client data."
    exit 1
  fi

  # Download
  echo "Downloading ryzom_client.7z from sourceforge..."
  # wget
  $WGET -c http://sourceforge.net/projects/ryzom/files/ryzom_client.7z -O "$DATA_DIR/tmp/ryzom_client.7z" 2>&1 | $ZENITY --no-cancel --progress --pulsate --auto-close --title="Ryzom" --text "Downloading Ryzom data files - Depending on your download speed, this process could take quite some time."
  if [ $? -ne 0 ]
  then
    $ZENITY --error --title="Ryzom" --text="An error occured when downloading Ryzom."
    exit 1
  fi

  # Extract data
  echo "Extracting data from ryzom_client.7z..."
  cd "$DATA_DIR/tmp"
  # 7z
  $P7ZIP x ryzom_client.7z
  if [ $? -ne 0 ]
  then
    $ZENITY --error --title="Ryzom" --text="An error occured when extracting data."
    exit 1
  fi
  cd ..
  mv -uf tmp/ryzom/data/* .
  # Delete temporary downloaded files
  rm -rf tmp
fi

if [ -f $RYZOM_CONFIG ]
then
  echo "Updating $RYZOM_CONFIG..."

  # Escape path for sed using bash find and replace
  RYZOM_CONFIG_DEFAULT_ESCAPED=$(echo $RYZOM_CONFIG_DEFAULT | sed 's/\//\\\//g')

  # Update RootConfigFilename to be sure it's using the right default config
  sed -i 's/RootConfigFilename.*/RootConfigFilename   = \"'$RYZOM_CONFIG_DEFAULT_ESCAPED'\"/g' $RYZOM_CONFIG
fi

if [ -f $RSYNC ]
then
  echo "Patching Ryzom data..."

  # Rsync
  $RSYNC -rtzv --progress --stats www.ryzom.com::ryzom/data/ $DATA_DIR 2>&1 | $ZENITY --no-cancel --progress --pulsate --auto-close --title="Ryzom Update" --text "Patching Ryzom"
  if [ $? -ne 0 ]
  then
    $ZENITY --error --title="Ryzom" --text="An error occured when patching Ryzom."
    exit 1
  fi
fi

# Launch Ryzom client if it exists
if [ -f $RYZOM_CLIENT ]
then
  echo "Launching Ryzom..."

  $RYZOM_CLIENT $1 $2 $3
fi

exit 0



Didn't link that build for you to use but because it contains link to instructions on how to BOY :) But hey, if it works, why not. It does however expect all files to be next to it, same folder and subfolders so if you want to use it you either modify startup script or just run ryzom_client.
Show topic
Last visit Tuesday, 26 November 13:28:18 UTC
P_:G_:PLAYER

powered by ryzom-api