User:Cazfi/SeparateTree

From FreeOrionWiki
Revision as of 23:25, 3 October 2012 by Cazfi (Talk | contribs) (FreeOrion build)

Jump to: navigation, search

Building FreeOrion to separate directory tree

I wanted to check out FreeOrion, but not to pollute my system with scattered, hard to uninstall, files. Such files are easily left behind not only when trying to completely uninstall software, but also when software is upgraded and some file from older version is no longer needed and should be removed. Installing uninstallable debian packets is ok, any other method of installing files to system directories I don't like. So I decided to build FreeOrion and those dependencies that cannot be installed as debian packets to separate directory tree. This means 1) I don't need root permissions in any part of installation process, 2) I can completely remove freeorion by a simple "rm -Rf freeorion", 3) I can have multiple different versions installed concurrently

I'm currently (04-Oct-2012) updating this document to match current freeorion version.

Tested systems

So far I have built FreeOrion in this manner in Debian Wheezy (64bit)

Build

Create freeorion directory. I'm doing this under my home directory (/home/cazfi)

mkdir freeorion
cd freeorion

Download, build, and install bullet.

wget http://bullet.googlecode.com/files/bullet-2.80-rev2531.tgz
tar xzf bullet-2.80-rev2531.tgz
cd bullet-2.80-rev2531
cmake -DCMAKE_INSTALL_PREFIX=$HOME/bullet
make install
cd ..

FreeOrion checkout

svn co https://freeorion.svn.sourceforge.net/svnroot/freeorion/trunk TRUNK

Build and install GG

cd TRUNK/FreeOrion/GG
cmake -DCMAKE_INSTALL_PREFIX=$HOME/freeorion/install
make install
cd ..

Build and install FreeOrion. FreeOrion does not install ogre_plugins.cfg, nor does it generate it correctly. So we do that with sed. Replace "/usr/lib/x64_64-linux-gnu/OGRE-1.7.4" with path to ogre plugins directory in your system.

BULLET_HOME=$HOME/freeorion/bullet cmake -DCMAKE_INSTALL_PREFIX=$HOME/freeorion/install
make install
sed "s,PluginFolder=.,PluginFolder=/usr/lib/x86_64-linux-gnu/OGRE-1.7.4," ogre_plugins.cfg > $HOME/freeorion/install/share/freeorion/ogre_plugins.cfg

Running FreeOrion

FreeOrion binary is in /home/cazfi/freeorion/install/bin. Since we have installed self built dependency libraries to non-standard location, we have to set LD_LIBRARY_PATH before running freeorion.

cd ../..
LD_LIBRARY_PATH=$HOME/freeorion/sys/lib install/bin/freeorion