Difference between revisions of "User:Cazfi/SeparateTree"

From FreeOrionWiki
Jump to: navigation, search
(Old and stale, we don't use SourceForce, Bullet or Ogre)
Line 1: Line 1:
=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
==Tested systems==
So far I have built FreeOrion in this manner in Debian Wheezy (64bit)
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
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/ogre_plugins.cfg
==Running FreeOrion==
FreeOrion binary is in /home/cazfi/freeorion/install. Since we have installed self built dependency libraries to non-standard location, we have to set LD_LIBRARY_PATH before running freeorion.
cd ../../install
LD_LIBRARY_PATH=$HOME/freeorion/install/lib ./freeorion
Current version seems to always look for ogre_plugins.cfg from current directory, so one cannot run freeorion from directories other than installation directory. It used to look ogre_plugins.cfg more sanely from data directory that was not dependent on current working directory. Also, installation directory hierarchy is a bit weird with everything in installation root, and not, e.g., in dirctory bin/.

Latest revision as of 18:10, 15 March 2018