392
edits
Fahim Dalvi (talk | contribs) |
m (minor update/corrections) |
||
Line 14: | Line 14: | ||
Also a bunch of packages (and some of their dependencies) are required: | Also a bunch of packages (and some of their dependencies) are required: | ||
*gcc, g++, make, automake1.9 | *gcc, g++, make, automake1.9, pkg-config | ||
*mawk (or gawk) | *mawk (or gawk) | ||
*cmake (min. version 2.6.0-5, for Etch available on backports.org!) | *cmake (min. version 2.6.0-5, for Etch available on backports.org!) | ||
*cvs, subversion | *cvs, subversion, (wget) | ||
<!--*libsvn-dev, for [[Terrasync]]s proper operation.--> | <!--*libsvn-dev, for [[Terrasync]]s proper operation.--> | ||
*freeglut3-dev, libgl1-mesa-dev, libxrandr-dev | *freeglut3-dev, libgl1-mesa-dev, libxrandr-dev | ||
Line 25: | Line 25: | ||
*libboost1.37-dev (Not available for Lenny atm, see [[#Boost Library|Boost Library]] below.) | *libboost1.37-dev (Not available for Lenny atm, see [[#Boost Library|Boost Library]] below.) | ||
During installation packages ''simgear-dev'' and ''openscenegraph-dev'' *must not* be installed. They can safely be re-installed after compilation. | During installation packages ''simgear-dev'' and ''openscenegraph-dev'' *must not* be installed. They can safely be re-installed after compilation. | ||
== Build and install == | == Build and install == | ||
Because we are going to install versions different to the ones in the repositries it is recommended to install FG-2.0.0 and/or CVS in a place | Because we are going to install versions different to the ones in the repositries it is recommended to install FG-2.0.0 and/or CVS in a place independent to the base system such as /usr/local/FG-2.0.0, /opt/FG-2.0.0 or in a subdirectory of your $HOME. I suggest to make it writeable by the user that there is no need to become root for the <code>make install</code> commands. I'll use <code>$prefix</code> as a placeholder for this directory. <BR> | ||
Another one will be <code>$srcdir</code>, it stands for the absolute path to the directory which contains the folders of the various source codes. So in the following instructions one have to replace these by the local paths. | |||
Another one will be <code>$srcdir</code>, it stands for the absolute path to the directory which contains the folders of the various source codes. So in the following instructions one have to replace | |||
Subsequent the instructions to fetch the sources and the data needed by FG and the commands to build/install each source. | Subsequent the instructions to fetch the sources and the data needed by FG and the commands to build/install each source. | ||
Have in mind that the data is relatively huge (CVS about 2 GB and 2.0.0 | Have in mind that the data is relatively huge (CVS about 2 GB and 2.0.0 ... MB) so, to save some time, it is a good idea to fetch it while building the sources. | ||
=== libopenal === | === libopenal === | ||
The libopenal-dev package in Lenny/Etch is too old for fgcom. For FG it does work but not all features (like Doppler) are avaiable, so installing an up to date version is recommended anyway. Get the latest source from http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx (file openal-soft-[version]) and extract it into <code>$srcdir</code>. | The libopenal-dev package in Lenny/Etch is too old for fgcom. For FG it does work but not all features (like Doppler) are avaiable, so installing an up to date version is recommended anyway. Get the latest source from http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx (file openal-soft-[version]) and extract it into <code>$srcdir</code>. | ||
cd $srcdir | |||
cd $srcdir/openal-soft-[version]/build | wget http://connect.creativelabs.com/openal/Downloads/openal-soft-[version].bz2 | ||
tar xjf openal-soft-[version].bz2 | |||
cd openal-soft-[version]/build | |||
cmake -D CMAKE_INSTALL_PREFIX:PATH="$prefix" .. | cmake -D CMAKE_INSTALL_PREFIX:PATH="$prefix" .. | ||
make install | make install | ||
Line 60: | Line 62: | ||
To build SimGear, FlightGear, fgrun and fgcom some boostlib header files are required, no need to compile and install it. If you have installed a libboost1.37-dev (or highter) package on your system you don't have to bother at all with it. If not, you have to tell each ./configure where the header files are. To do so, add the option <code>CPPFLAGS=-I$prefix/include</code> to the SimGear, FlightGear and fgrun <code>./configure</code> commands. We copy the header files to $prefix/include because fgcom will need them there. | To build SimGear, FlightGear, fgrun and fgcom some boostlib header files are required, no need to compile and install it. If you have installed a libboost1.37-dev (or highter) package on your system you don't have to bother at all with it. If not, you have to tell each ./configure where the header files are. To do so, add the option <code>CPPFLAGS=-I$prefix/include</code> to the SimGear, FlightGear and fgrun <code>./configure</code> commands. We copy the header files to $prefix/include because fgcom will need them there. | ||
Get | Get the newest version tar ball from http://sourceforge.net/projects/boost/files/boost/, extract it into <code>$srcdir</code> then: | ||
cp -R $srcdir/boost-[version]/boost $prefix/include | cp -R $srcdir/boost-[version]/boost/ $prefix/include/ | ||
=== OpenSceneGraph === | === OpenSceneGraph === | ||
For FlightGear 2.0.0 one may use the latest developer release from http://www.openscenegraph.org/projects/osg/wiki/Downloads/DeveloperReleases | For FlightGear 2.0.0 one may use the latest (or at least 2.9.6) developer release from http://www.openscenegraph.org/projects/osg/wiki/Downloads/DeveloperReleases and extract it into <code>$srcdir</code>. | ||
Mostly this is ok for FlightGear CVS as well as it is stable. However, sometimes the release is not fresh enough and one have to get the latest developments via SVN: | Mostly this is ok for FlightGear CVS as well as it is stable. However, sometimes the release is not fresh enough and one have to get the latest developments via SVN: | ||
cd $srcdir | cd $srcdir | ||
Line 101: | Line 104: | ||
2.0.0: | 2.0.0: | ||
cd $srcdir | cd $srcdir | ||
wget http://www.very-clever.com/download/flightgear/Source/ | wget http://www.very-clever.com/download/flightgear/Source/... | ||
tar xjf ... | tar xjf ... | ||
cd ... | cd ... | ||
Line 116: | Line 119: | ||
2.0.0 and CVS: | 2.0.0 and CVS: | ||
./autogen.sh | ./autogen.sh | ||
./configure --prefix=$prefix | ./configure --prefix=$prefix [CPPFLAGS=-I$prefix/include/] | ||
make install | make install | ||
Line 128: | Line 131: | ||
cd $prefix/share | cd $prefix/share | ||
cvs -d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 co data | cvs -d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 co data | ||
=== Trial run === | === Trial run === | ||
Line 135: | Line 138: | ||
$prefix/bin/fgfs --fg-root=$prefix/share/data | $prefix/bin/fgfs --fg-root=$prefix/share/data | ||
For the | For the future, if you want to start FlightGear from command line have a look at [[fgfsrc]], if you prefer a graphical user interface continue with [[#fgrun|compiling fgrun]]. Have in mind that fgfs need to find our self compiled libraries and therefore we have to tell the linker (ld) where to find them. That is what the first line here does. | ||
Line 141: | Line 144: | ||
=== fgrun === | === fgrun === | ||
To build [[ fgrun ]] one more package is required: | To build [[fgrun]] one more package is required: | ||
*libfltk1.1-dev | *libfltk1.1-dev | ||
edits