Author Topic: [HOWTO] Building PlaneShift client on Debian for testing and using it  (Read 1375 times)

helios21

  • Traveller
  • *
  • Posts: 38
    • View Profile
This is basically possible using the instructions at:

http://svn.code.sf.net/p/planeshift/code/trunk/docs/compiling.html

Yet I think some shortcuts or clarifications help with the process for doing it on a Debian based distro. I did this on Debian Sid. Will likely also work on Debian Jessie, maybe also Debian Wheezy, Linux Mint, certain Ubuntu versions, please report back.

Tested with PlaneShift Azure Spirit 0.6.1 as of today (revision 9358). This guide will use self-compiled client with same configuration as binary installed one. This will only work if configuration formats are compatible. It seems to work okay for 0.6.1 from source and 0.6.0 from binary install.

Reproduced from my command history. I may be missing something. Please comment.

Have fun with testing out new client prior to release :)


Set up development directory

Code: [Select]
export PSDEV=$HOME/PlaneShift/Development
(replace path as you see fit, donĀ“t use space in path, as I did not care for proper quoting below, and I am not sure whether all of the build process does)

Code: [Select]
mkdir $PSDEV
cd $PSDEV


Install necessary packages

Including NVidia Cg:

Code: [Select]
sudo apt-get install build-essential jam subversion
sudo apt-get install libcurl4-gnutls-dev libhunspell-dev libopenal-dev
sudo apt-get install nvidia-cg-dev
sudo apt-get install nvidia-cg-toolkit

NVidia CG was installed at my system already, so package names are a bit of guesswork. libcurl dev may be different for your Debian based distro. I may be missing some packages here, cause my Debian installation has usual dev packages installed already. Please comment if some package was missing for you.


Get sources

As in official compiling guide, except NVidia Cg, which can be installed more cleanly from Debian packages:

Code: [Select]
svn co -r 507 svn://svn.gna.org/svn/cal3d/trunk/cal3d cal3d
svn co -r 38938 http://svn.code.sf.net/p/crystal/code/CS/trunk cs
svn co https://svn.code.sf.net/p/planeshift/code/trunk planeshift

In case some checkout aborted due to network issues, cd to checked out directory and do svn up (including suitable -r argument to update to the exact revision!).


Compile

Basically as described in official documentation, see there for further explaination.

Cal3d
Code: [Select]
cd $PSDEV/cal3d

autoreconf --install --force
./configure --prefix=$PSDEV/cal3d
make -j4
make install

(adjust -j argument to number of cores in your machine)

Code: [Select]
export LD_LIBRARY_PATH=$PSDEV/cal3d/src/cal3d/.libs/:$LD_LIBRARY_PATH

Crystal Space

Code: [Select]
cd $PSDEV/cs

./configure --enable-debug --without-java --without-perl --without-python --without-3ds --with-cal3d=$PSDEV/cal3d

jam -aq libs plugins cs-config walktest

export CRYSTAL="$PSDEV/cs"


PlaneShift client
Code: [Select]
cd $PSDEV/planeshift
Unforce Breakpad usage by commenting out USE_BREAKPAD like

Code: [Select]
// #define USE_BREAKPAD
in src/client/crashreport.cpp.

(might be nice to add it later on to help devs)

Code: [Select]
./configure --enable-debug --with-cal3d=$PSDEV/cal3d

jam -aq client


Make is use official artwork and servers

Code: [Select]
cd $PSDEV
ln -s /opt/PlaneShift/art art

For me this worked better than any partial approach as described in official documentation. With symlinking it is also not needed to adapt psclient and VFS configuration and thus its possible to switch between binary installed client and from source compiled client easily.

Code: [Select]
cd $PSDEV/data
mv servers.xml servers.xml-localhost
ln -s /opt/PlaneShift/data/servers.xml servers.xml


Start client

I use the following script to set environment variables, replace $PSDEV with your path there.

Code: [Select]
#!/bin/bash

BASEPATH="$PSDEV"

export LD_LIBRARY_PATH="$BASEPATH/cal3d/src/cal3d/.libs/:$BASEPATH/cs/:$LD_LIBRARY_PATH"
export CRYSTAL="$BASEPATH/cs"

# If you want to start client automatically, uncomment the following

#OLDDIR="$PWD"

#cd planeshift

#./psclient

#cd "$OLDDIR"

If you want to start client manually – after script set environment variables:

Code: [Select]
cd planeshift
./psclient


Use pslaunch from binary client to change settings. You can tell client to use different settings directory. See official documentation for that.
« Last Edit: March 30, 2014, 10:28:52 am by helios21 »
Helios21

helios21

  • Traveller
  • *
  • Posts: 38
    • View Profile
Re: [HOWTO] Building PlaneShift client on Debian for testing and using it
« Reply #1 on: March 30, 2014, 10:26:05 am »
These are the versions of the packages I used:

Code: [Select]
# apt-show-versions | egrep "(build-essential|^jam|subversion|libcurl4-gnutls-dev|libhunspell-dev|libopenal-dev|nvidia-cg-dev|nvidia-cg-toolkit)"
build-essential:amd64/sid 11.6 uptodate
jam:amd64/sid 2.5rel-1 uptodate
libcurl4-gnutls-dev:amd64/sid 7.35.0-1 uptodate
libhunspell-dev:amd64/sid 1.3.2-7 uptodate
libopenal-dev:amd64/sid 1:1.14-4 uptodate
nvidia-cg-dev:amd64/sid 3.1.0013-1 uptodate
nvidia-cg-toolkit:amd64/sid 3.1.0013-1 uptodate
subversion:amd64/sid 1.8.8-1 uptodate
Helios21

helios21

  • Traveller
  • *
  • Posts: 38
    • View Profile
Re: [HOWTO] Building PlaneShift client on Debian for testing and using it
« Reply #2 on: April 13, 2014, 01:05:46 pm »
Somehow my build had several bugs that are not in the released client. Including some graphical glitches, so I bet it actually really needs the exact NVidia Cg install that is mentioned in the official compiling guide and/or the using vfs.cfg instead of symlinks. At some time I may try this again.

Right now I am happy with 0.6.1 :)
Helios21

Aensor

  • Traveller
  • *
  • Posts: 36
    • View Profile
Re: [HOWTO] Building PlaneShift client on Debian for testing and using it
« Reply #3 on: September 25, 2014, 04:40:04 pm »
I may add http://www.hydlaaplaza.com/smf/index.php?topic=41768.0 if you encounter errors with wxwidgets version.

Also, personally i do not symlink with the official client, heck i only have svn version on my machine. So after installing svn version i do a Repair either via the launcher button or via cmd .pslaunch --repair (useful in case pslaunch.xml also is missing and will not start) to get/update art and whatever else.

However since this is the production version of it some parts might overwrite files you have from svn. So you should do another svn update of your planeshift folder *after* you do a repair. 
Edit: svn update might not get the files updated (as svn thinks its local changes that are newer then the svn version). You have to do a revert to the current Head by issuing
Code: [Select]
svn revert --depth=infinity .

Edit: Also, if you encounter bad fps/performance with the client, remove the --enable-debug flags on the configures. It slows FPS down by 50% (!) for me.
also if you dont encounter issues with running, you can omit "walktest" on building cs. Its however nice for a 1st compile to be sure cs works fine.
« Last Edit: October 20, 2014, 04:45:10 pm by Aensor »

redhound

  • Hydlaa Resident
  • *
  • Posts: 97
    • View Profile