Changes

Jump to: navigation, search

Building Flightgear - CentOS

2,978 bytes added, 18 January
no edit summary
= Definitions =
The following environment variables must be set because they will be used in shell commands:
* <code>NR_JOBS</code>: Number of jobs for parallel compilation. For example: <code>NR_JOBS=$(/usr/bin/nproc)</code>.* <code>FGFS_PREFIX</code>: Prefix of the Flightgear installation. For example: <code>FGFS_PREFIX=${HOME}/Flightgear</code>. All the source code must be located under the directory <code>${FGFS_PREFIX}/src</code> and the installation will be done under the directory <code>${FGFS_PREFIX}</code> as <code>${FGFS_PREFIX}/bin</code>, <code>${FGFS_PREFIX}/include</code>, <code>${FGFS_PREFIX}/lib</code>,...* <code>OPENSCENEGRAPH_VERSION</code>: Version of OpenSceneGraph. For example: <code>OPENSCENEGRAPH_VERSION=3.6.4</code>.
= OpenSceneGraph =
OpenSceneGraph is not available as a RPM for CentOS 8 and, for this reason, needs to be build from sources. The latest stable version of OpenSceneGraph can be downloaded from [http://www.openscenegraph.org/index.php/download-section/stable-releases here]. The downloaded file must be placed under the directory <code>${FGFS_PREFIX}/src</code> such that the full path of the file will be <code>${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}</code>.
The following commands can be used to build OpenSceneGraph:
= Simgear =
The source code of Simgear can be provided:
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable <code>SIMGEAR_VERSION</code> must be set to the relevant version of Simgear, for example <code>SIMGEAR_VERSION=2019.1.1</code> and then using the following commands to extract the source code:
 
cd -- "${FGFS_PREFIX}/src/"
SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}
rm -Rf -- "${SIMGEAR_SRC}/"
tar axvf "${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2"
 
* as a clone of the Simgear Git repo by using the following commands:
 
cd -- "${FGFS_PREFIX}/src/"
git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear
SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear
 
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:
 
cd -- "${FGFS_PREFIX}/src/"
SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear
pushd -- "${SIMGEAR_SRC}/"
git pull
popd
 
Now that the source code of Simgear is available under the directory <code>${SIMGEAR_SRC}</code>, the build can be started using the following commands:
cd -- "${FGFS_PREFIX}/src/"
= Flightgear =
The source code of Flightgear can be provided:
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The version of Simgear and Flightgear must match. The environment variable <code>FLIGHTGEAR_VERSION</code> must be set to the relevant version of Flightgear, for example <code>FLIGHTGEAR_VERSION=2019.1.1</code> and then using the following commands to extract the source code:
 
cd -- "${FGFS_PREFIX}/src/"
FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}
rm -Rf -- "${FLIGHTGEAR_SRC}/"
tar axvf "${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2"
 
* as a clone of the Flightgear Git repo by using the following commands:
 
cd -- "${FGFS_PREFIX}/src/"
git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear
FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear
 
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:
 
cd -- "${FGFS_PREFIX}/src/"
FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear
pushd -- "${FLIGHTGEAR_SRC}/"
git pull
popd
 
Now that the source code of Flightgear is available under the directory <code>${FLIGHTGEAR_SRC}</code>, the build can be started using the following commands:
cd -- "${FGFS_PREFIX}/src/"
85
edits

Navigation menu