Building FlightGear - Debian: Difference between revisions

Jump to navigation Jump to search
m
update for 3.6-rc; altering make commands
m (git checkout commands corrections and update to terragear)
m (update for 3.6-rc; altering make commands)
Line 38: Line 38:


== Build and install ==
== Build and install ==
Because we are going to install versions different to the ones in the Debian repositories, it is recommended to install FlightGear in a place independent of the base system, such as <code>/usr/local/FG-3.6</code> or <code>$HOME/FG-3.6</code>. This way also has the advantage of easily managing several FlightGear versions, even with different versions of OpenSceneGraph and/or plib, simply by altering the installation prefix. I suggest to make this directory writeable by the user so there is no need to become root for the <code>make -j2 install</code> commands. We'll use <code>$FG_INSTALL_DIR</code> as a [http://www.cmiss.org/cmgui/wiki/SettingEnvironmentVariablesInBash placeholder] for this directory. <br />
Because we are going to install versions different to the ones in the Debian repositories, it is recommended to install FlightGear in a place independent of the base system, such as <code>/usr/local/FG-3.6</code> or <code>$HOME/FG-3.6</code>. This way also has the advantage of easily managing several FlightGear versions, even with different versions of OpenSceneGraph and/or plib, simply by altering the installation prefix. I suggest to make this directory writeable by the user so there is no need to become root for the <code>make -j2 && make install</code> commands. We'll use <code>$FG_INSTALL_DIR</code> as a [http://www.cmiss.org/cmgui/wiki/SettingEnvironmentVariablesInBash placeholder] for this directory. <br />
Another placeholder will be <code>$FG_SRC_DIR</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 instructions below, you have to replace these with the local paths or even <code>export</code> them (in every terminal you're using them) for the process:
Another placeholder will be <code>$FG_SRC_DIR</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 instructions below, you have to replace these with the local paths or even <code>export</code> them (in every terminal you're using them) for the process:
  export FG_INSTALL_DIR=$HOME/FG-3.6 && mkdir $FG_INSTALL_DIR
  export FG_INSTALL_DIR=$HOME/FG-3.6 && mkdir $FG_INSTALL_DIR
Line 77: Line 77:
  ./autogen.sh
  ./autogen.sh
  ./configure --prefix=$FG_INSTALL_DIR
  ./configure --prefix=$FG_INSTALL_DIR
  make -j2 install
  make -j2 && make install




Line 91: Line 91:
  cmake -D CMAKE_BUILD_TYPE="Release" -D LIB_POSTFIX="" -D Boost_INCLUDE_DIR="$FG_INSTALL_DIR/include/" \
  cmake -D CMAKE_BUILD_TYPE="Release" -D LIB_POSTFIX="" -D Boost_INCLUDE_DIR="$FG_INSTALL_DIR/include/" \
       -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/OpenSceneGraph-3.2.1
       -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/OpenSceneGraph-3.2.1
  make -j2 install
  make -j2 && make install




Line 106: Line 106:
  mkdir $FG_SRC_DIR/build-sg; cd $FG_SRC_DIR/build-sg
  mkdir $FG_SRC_DIR/build-sg; cd $FG_SRC_DIR/build-sg
  cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/simgear.git
  cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/simgear.git
  make -j2 install
  make -j2 && make install




Line 121: Line 121:
  mkdir $FG_SRC_DIR/build-fg; cd $FG_SRC_DIR/build-fg
  mkdir $FG_SRC_DIR/build-fg; cd $FG_SRC_DIR/build-fg
  cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/flightgear.git
  cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/flightgear.git
  make -j2 install
  make -j2 && make install




Line 127: Line 127:
<u>3.6</u> only: Please have a look at the [http://www.flightgear.org/download/mirror/ mirror list] for a server close to your location.
<u>3.6</u> only: Please have a look at the [http://www.flightgear.org/download/mirror/ mirror list] for a server close to your location.
  cd $FG_INSTALL_DIR
  cd $FG_INSTALL_DIR
<nowiki>wget http://sourceforge.net/projects/flightgear/files/release-candidate/FlightGear-3.6.0-data-rc.tar.bz2/download -O FlightGear-3.6.0-data-rc.tar.bz2</nowiki>
tar xjf FlightGear-3.6.0-data-rc.tar.bz2
<!--
  <nowiki>wget ftp://ftp.snt.utwente.nl/pub/software/flightgear/ftp/Shared/FlightGear-data-3.6.0.tar.bz2</nowiki>
  <nowiki>wget ftp://ftp.snt.utwente.nl/pub/software/flightgear/ftp/Shared/FlightGear-data-3.6.0.tar.bz2</nowiki>
  tar xjf FlightGear-data-3.6.0.tar.bz2
  tar xjf FlightGear-data-3.6.0.tar.bz2
-->


<u>GIT</u> only:
<u>GIT</u> only:
Line 160: Line 164:
  ./autogen.sh
  ./autogen.sh
  ./configure --prefix=$FG_INSTALL_DIR --with-fgbase=$FG_INSTALL_DIR/data
  ./configure --prefix=$FG_INSTALL_DIR --with-fgbase=$FG_INSTALL_DIR/data
  make -j2 install
  make -j2 && make install
  cp -R $FG_SRC_DIR/atlas/src/data/* $FG_INSTALL_DIR/data/Atlas
  cp -R $FG_SRC_DIR/atlas/src/data/* $FG_INSTALL_DIR/data/Atlas
<!--If it does not compile, go back some commits. Before invoking the <code>autogen.sh</code> command do:
<!--If it does not compile, go back some commits. Before invoking the <code>autogen.sh</code> command do:
Line 182: Line 186:
  mkdir $FG_SRC_DIR/build-fgcom; cd $FG_SRC_DIR/build-fgcom
  mkdir $FG_SRC_DIR/build-fgcom; cd $FG_SRC_DIR/build-fgcom
  cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/fgcom.git
  cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/fgcom.git
  make -j2 install
  make -j2 && make install
Create an .alsoftrc file as shown in [[FGCOM_Testing#Special_for_Linux_.28.alsoftrc.29|FGCOM Testing]].
Create an .alsoftrc file as shown in [[FGCOM_Testing#Special_for_Linux_.28.alsoftrc.29|FGCOM Testing]].


Line 200: Line 204:
  mkdir $FG_SRC_DIR/build-fgrun; cd $FG_SRC_DIR/build-fgrun
  mkdir $FG_SRC_DIR/build-fgrun; cd $FG_SRC_DIR/build-fgrun
  cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/fgrun.git
  cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/fgrun.git
  make -j2 install
  make -j2 && make install


Execute it:
Execute it:
Line 215: Line 219:
  ./autogen.sh
  ./autogen.sh
  ./configure --prefix=$FG_INSTALL_DIR
  ./configure --prefix=$FG_INSTALL_DIR
  make -j2 install
  make -j2 && make install




Line 245: Line 249:
  mkdir $FG_SRC_DIR/build-cgal; cd $FG_SRC_DIR/build-cgal
  mkdir $FG_SRC_DIR/build-cgal; cd $FG_SRC_DIR/build-cgal
  cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/CGAL-4.0.2
  cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/CGAL-4.0.2
  make -j2 install
  make -j2 && make install


<!--
<!--
Line 256: Line 260:
  sed "s|/usr/local/lib|$FG_INSTALL_DIR/lib|" -i Makefile
  sed "s|/usr/local/lib|$FG_INSTALL_DIR/lib|" -i Makefile
  sed "s|/usr/local/include|$FG_INSTALL_DIR/include|" -i Makefile
  sed "s|/usr/local/include|$FG_INSTALL_DIR/include|" -i Makefile
  make -j2 install
  make -j2 && make install


  # newmat install
  # newmat install
Line 274: Line 278:
  mkdir $FG_SRC_DIR/build-tg; cd $FG_SRC_DIR/build-tg
  mkdir $FG_SRC_DIR/build-tg; cd $FG_SRC_DIR/build-tg
  cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/terragear.git
  cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/terragear.git
  make -j2 install
  make -j2 && make install




392

edits

Navigation menu