Building FlightGear - Debian: Difference between revisions

undoing the changes to the topics. changing steps to build it.
(Undo revision 28343 by ThorstenB (talk) -- http://sourceforge.net/mailarchive/message.php?msg_id=27063330)
(undoing the changes to the topics. changing steps to build it.)
Line 28: Line 28:
Another one will be <code>$srcdir</code>, it stands for the absolute path to the directory which is supposed to keep the folders of the various source codes. So in the following instructions you have to replace these with the local paths or even <code>export</code> them during the process.
Another one will be <code>$srcdir</code>, it stands for the absolute path to the directory which is supposed to keep the folders of the various source codes. So in the following instructions you have to replace these with the local paths or even <code>export</code> them during the process.


Follow the instructions to fetch the sources and the data needed by FlightGear and the commands to build/install each source.
...
Follow the instructions listed below to fetch the sources and the data needed by FlightGear and the commands to build/install each source.


Have in mind that the data is a relatively large download (GIT about 3.5 GB and 2.2.0 300 MB). So, to save some time, it is a good idea to fetch it while building the sources.
Have in mind that the data is a relatively large download (GIT about 3.5 GB and 2.2.0 300 MB). So, to save some time, it is a good idea to fetch it while building the sources.
Line 35: Line 36:




=== Dependencies ===
=== libopenal ===
In some aspects FlightGear's development relies closely on plib and OpenSceneGraph. Therefore the GIT users are encouraged to update them regularly. Not each time one rebuilds FlightGear but from time to time.
 
==== libopenal ====
<u>Lenny only!</u> The libopenal-dev package in Lenny is too old for [[fgcom]]. For FlightGear it does work but not all features (like doppler) are available, so installing an up to date version is recommended anyway.
<u>Lenny only!</u> The libopenal-dev package in Lenny is too old for [[fgcom]]. For FlightGear it does work but not all features (like doppler) are available, so installing an up to date version is recommended anyway.
  cd $srcdir
  cd $srcdir
Line 48: Line 46:




==== plib ====
=== plib ===
Latest SVN is [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg20793.html recommended], yet package plib1.8.5-dev for Squeeze does work as well.
Latest SVN is [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg20793.html recommended], yet package plib1.8.5-dev for Squeeze does work as well.
  cd $srcdir
  cd $srcdir
Line 59: Line 57:




==== OpenSceneGraph ====
=== OpenSceneGraph ===
<u>2.2.0 only:</u>
<u>2.2.0 only:</u>
  cd $srcdir
  cd $srcdir
  svn co -r 12072 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
  svn co -r 12170 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph


<u>GIT only:</u>
<u>GIT only:</u>
Mostly the latest revision from OpenSceneGraph svn does suit. However, sometimes this does not work and as a fallback one can go backwards through the revisions.<BR>
Mostly the latest revision from OpenSceneGraph svn does suit. However, sometimes this does not work and as a fallback one can go backwards through the revisions. Revision must be at least 12170.<BR>
At the moment (February 2011) this is the case. '''Highest reported working revision is 12072''', checkout the source as shown above at ''2.2.0 only''.
  cd $srcdir
  cd $srcdir
  svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
  svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph


<u>2.2.0 and GIT:</u>
<u>2.2.0 and GIT:</u>
ln -s lib $prefix/lib64  # 64bit OS' only, if lib64 does not exist
  mkdir osg-build && cd osg-build
  mkdir osg-build && cd osg-build
  cmake -D CMAKE_BUILD_TYPE="Release" -D CMAKE_INSTALL_PREFIX:PATH="$prefix" $srcdir/OpenSceneGraph
  cmake -D CMAKE_BUILD_TYPE="Release" \
      -D CMAKE_INSTALL_PREFIX:PATH="$prefix" $srcdir/OpenSceneGraph
  make install
  make install




=== FlightGear and Components ===
FlighGear relies very closely on its data and SimGear. Therefore it is necessary to update them at one time.


From this point forward when providing the <code>LDFLAGS</code> string, you should use the path specific to your installation. For 32-bit installations this will probably be the path ending in /lib. In a 64-bit installation, this '''may''' be the path ending in /lib64, but doesn't have to be. You must verify this for your build, because you do not have to include both paths in the following compilations.
=== SimGear ===
 
==== SimGear ====
<u>2.2.0 and GIT:</u>
<u>2.2.0 and GIT:</u>
  cd $srcdir
  cd $srcdir
Line 91: Line 86:


<u>2.2.0 and GIT:</u>
<u>2.2.0 and GIT:</u>
  .autogen.sh
  ./autogen.sh
  ./configure --prefix=$prefix CPPFLAGS=-I$prefix/include LDFLAGS="-L$prefix/lib -L$prefix/lib64"
  ./configure --prefix=$prefix <!--CPPFLAGS=-I$prefix/include/-->
  make install
  make install




==== FlightGear source ====
=== FlightGear source ===
<u>2.2.0 and GIT:</u>
<u>2.2.0 and GIT:</u>
  cd $srcdir
  cd $srcdir
Line 107: Line 102:
<u>2.2.0 and GIT:</u>
<u>2.2.0 and GIT:</u>
  ./autogen.sh
  ./autogen.sh
  ./configure --prefix=$prefix CPPFLAGS=-I$prefix/include/ LDFLAGS="-L$prefix/lib -L$prefix/lib64"
  ./configure --prefix=$prefix <!--CPPFLAGS=-I$prefix/include/-->
  make install
  make install




==== FlightGear data ====
=== FlightGear data ===
<u>2.2.0 only:</u>
<u>2.2.0 only:</u>
At the time of writing, 2.2.0 is not yet released, there is no tar archive for the data available. Test pilots for this release are advised to use the ''release/2.2.0'' branch from git. The following URL for wget will be updated, if it is not working, as soon as 2.2.0 is released.
At the time of writing, 2.2.0 is not yet released, there is no tar archive for the data available. Test pilots for this release are advised to use the ''release/2.2.0'' branch from git. The following URL for wget will be updated, if it is not working, as soon as 2.2.0 is released.
Line 135: Line 130:
== Optional Software ==
== Optional Software ==
Feel free to add the commands to install other FlightGear related projects.
Feel free to add the commands to install other FlightGear related projects.
=== fgcom ===
For [[fgcom]] unfortunately there is one more dependency which cannot be solved with packages on <u>Lenny</u>, see [[#libopenal|libopenal]].
cd $srcdir
svn co https://appfgcom.svn.sourceforge.net/svnroot/fgcom/trunk fgcom
cd fgcom/src
make INSTALL_BIN=$prefix/bin INSTALL_DIR=$prefix/fgcom \
    PLIB_PREFIX=$prefix OPENAL_PREFIX=$prefix install


=== fgrun ===
=== fgrun ===
To build [[fgrun]] one more package is required:
To build [[fgrun]] one more package is required:
*libfltk1.1-dev
*libfltk1.1-dev
  cd $srcdir
  cd $srcdir
  svn co http://fgrun.svn.sourceforge.net/svnroot/fgrun/trunk fgrun
  svn co http://fgrun.svn.sourceforge.net/svnroot/fgrun/trunk fgrun
  cd fgrun/fgrun/
  cd fgrun/fgrun/
  ./autogen.sh
  ./autogen.sh
  ./configure --prefix=$prefix [CPPFLAGS=-I$prefix/include/ LDFLAGS="-L$prefix/lib -L$prefix/lib64"]
  ./configure --prefix=$prefix
  make install
  make install
=== fgcom ===
For [[fgcom]] unfortunately there is one more dependency which cannot be solved with packages on '''Lenny''', see [[#libopenal|libopenal]].
cd $srcdir
svn co https://appfgcom.svn.sourceforge.net/svnroot/fgcom/trunk fgcom
cd fgcom/src
make INSTALL_BIN=$prefix/bin INSTALL_DIR=$prefix/fgcom \
    PLIB_PREFIX=$prefix OPENAL_PREFIX=$prefix install




392

edits