<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.flightgear.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Puchacz</id>
	<title>FlightGear wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.flightgear.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Puchacz"/>
	<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/Special:Contributions/Puchacz"/>
	<updated>2026-04-10T18:01:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Fr/Altitude&amp;diff=127159</id>
		<title>Fr/Altitude</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Fr/Altitude&amp;diff=127159"/>
		<updated>2020-08-30T12:24:42Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;En aviation, l'altitude est la hauteur à laquelle vole un avion. Exprimée en pieds, l'altitude d'un avion est mesurée avec un [[altimeter|altimètre]]. La base de l'altimètre est la même que celle d'un baromètre anéroïde: un tambour hermétique qui changera de forme en fonction de la pression de l'air ambiant. Plus l'avion est haut, plus le tambour est grand. L'altimètre est un instrument très sensible, et en tant que tel, la pression de l'air qui agit sur lui influence grandement la lecture de l'altimètre.&lt;br /&gt;
&lt;br /&gt;
En revanche, le radar au sol est idéal pour mesurer l'altitude au-dessus du sol sans être influencé par la météo. Le radar au sol est souvent utilisé pour les systèmes d'alerte au sol.&lt;br /&gt;
&lt;br /&gt;
En communication avec [[ATC]], deux termes d'altitude sont utilisés. Dans l'espace aérien inférieur, le terme [[#Altitude vraie|altitude vraie]], ou simplement '' &amp;quot;altitude&amp;quot; '', est utilisé. Dans l'espace aérien supérieur, le terme [[#Niveau de vol|niveau de vol]] (souvent abrégé en FL) est préféré.&lt;br /&gt;
&lt;br /&gt;
==Altitude indiquée==&lt;br /&gt;
* Lecture de l'[[altimeter|altimètre]].&lt;br /&gt;
&lt;br /&gt;
L'altimètre peut être calé sur '''trois''' références possibles :&lt;br /&gt;
# au [[#QNH|QNH]], ce qui entraîne que l'altitude indiquée &amp;quot;correspond&amp;quot; à l'altitude vraie (voir ci-dessous) ;&lt;br /&gt;
# à la pression standard (29,92&amp;quot; Hg ou 1013,25 hPa) faisant indiquer à l'altimètre l'[[#Altitude pression|altitude pression]]. Cette configuration ne doit être utilisée que pour les altitudes élevées.&lt;br /&gt;
#à la hauteur au-dessus de l'aérodrome. Sur la piste, l'altitude indiquée lirait zéro. A proximité de l'aérodrome, l'altitude indiquée devrait être l'[[#Altitude absolue|altitude absolue]] ([[Fr/AGL|au-dessus du niveau du sol]]).&lt;br /&gt;
&lt;br /&gt;
Ce que vous devez utiliser dépend des [[flight rules|règles de vol]] locales.&lt;br /&gt;
&lt;br /&gt;
===QNH===&lt;br /&gt;
Le [http://fr.wikipedia.org/wiki/QNH QNH] est un code court pour &amp;quot;la pression atmosphérique au niveau de la mer&amp;quot;. Il est nécessaire lors du décollage ou de l'atterrissage d'un avion, quand il est important d'avoir l'[[#Altitude indiquée|altitude indiquée]] aussi précise que possible.&lt;br /&gt;
&lt;br /&gt;
Le code QNH est utilisé:&lt;br /&gt;
*quand les pilotes demandent la &amp;quot;pression atmosphérique au niveau de la mer&amp;quot;. Dans sa réponse, l'[[ATC]] répète QNH suivi de la pression.&lt;br /&gt;
*dans les rapports météorologiques automatiques via l'[[ATIS]].&lt;br /&gt;
&lt;br /&gt;
S'il n'y a ni [[ATIS]], ni [[ATC]] disponible, vous pouvez trouver la valeur QNH dans Environment=&amp;gt;Global Weather.&lt;br /&gt;
&lt;br /&gt;
Si QNH n'est pas disponible, mais l'[[#Elévation|élévation]] de l'aérodrome de départ est connu, régler l'[[altimeter|altimètre]] à cette valeur. Le QNH qui en résulte est le bon. Il est également possible d'utiliser le QNH d'un aérodrome situé à proximité.&lt;br /&gt;
&lt;br /&gt;
Pour utiliser un baromètre (c'est à dire votre [[altimeter|altimètre]]) comme un outil pour mesurer l'altitude, il doit être corrigé en fonction des conditions météorologiques. Pour cette tâche, chaque aérodrome est équipé d'un baromètre précis. En combinant cette valeur avec l'[[#Altitude vraie|altitude vraie]] de l'aérodrome, ils peuvent calculer la pression barométrique au [[Fr/MSL|niveau moyen de la mer]], le QNH. Le QNH sera transmis par l'[[ATC]] et l'[[ATIS]] et, avec cet élément d'information, l'altimètre de l'avion peut être corrigé en fonction des conditions météorologiques et afficher une altitude proche de l'[[#Altitude vraie|altitude vraie]] de l'avion. De cette façon, l'[[#Altitude indiquée|altitude indiquée]] sera assez précise pour une certaine zone autour de l'aérodrome aussi longtemps que le temps reste stable. Lorsque l'avion est sur le terrain d'aviation, l'altimètre devrait indiquer l'altitude de l'aérodrome.&lt;br /&gt;
&lt;br /&gt;
Il est essentiel de caler l'altimètre au QNH lorsque vous utilisez une carte de hauteur, de tel sorte que l'[[#Altitude indiquée|altitude indiquée]] peut être comparée aux [[#Elévation|élévations]] sur la carte, ce qui particulièrement important lors de l'approche d'un aérodrome. Il y a eu des accidents dramatiques où les pilotes volaient en utilisant l'[[#Altitude pression|altitude pression]] pendant la descente au lieu de l'[[#Altitude vraie|altitude vraie]], ce qui rend la carte de hauteur de la région à peu près inutile. Avec une mauvaise visibilité, les montagnes n'ont pas été vues et le sol était plus élevé que prévu.&lt;br /&gt;
&lt;br /&gt;
==Altitude pression==&lt;br /&gt;
&lt;br /&gt;
*L'altitude pression est la pression barométrique exprimée en pieds (ce qui signifie que votre équipement coûteux a été réduit à un baromètre).&lt;br /&gt;
*L'altimètre indique l'altitude pression, s'il est calé sur la pression standard: 29.92&amp;quot; Hg = 1013,25 hPa.&lt;br /&gt;
&lt;br /&gt;
Ceci a le grand avantage que tous les avions utilisent le même calage altimétrique, ainsi différents avions dans une même région ayant la même [[#Altitude indiquée|altitude indiquée]] auront la même [[#Altitude vraie|altitude vraie]].&lt;br /&gt;
&lt;br /&gt;
Le problème avec l'altitude pression est que les conditions météorologiques changeantes font varier la pression de l'air. Donc, vous ne savez jamais exactement à quelle [[#Altitude vraie|altitude vraie]] vous volez. Cela rend l'altitude pression très dangereux à utiliser à basse altitude!&lt;br /&gt;
&lt;br /&gt;
Comme tous les avions dans la même région éprouvent le même effet, ils voleront tous à la même altitude les uns par rapport aux autres.&lt;br /&gt;
&lt;br /&gt;
===Niveau de vol===&lt;br /&gt;
&lt;br /&gt;
*L'[[#Altitude pression|altitude pression]] divisée par 100 est appelée le niveau de vol.&lt;br /&gt;
&lt;br /&gt;
L'altitude pression est utilisée au dessus de l'altitude de transition (18.000 pieds (5.500 m) aux États-Unis, mais peut être aussi basse que 3000 pieds (910 m) dans d'autres pays s'ils n'ont pas de montagnes plus hautes). Lorsque l'[[altimeter|altimètre]] calé sur la pression standard indique 18.000 pieds, l'avion est dit être au &amp;quot;niveau de vol 180&amp;quot; ou FL180.&lt;br /&gt;
&lt;br /&gt;
Pour assurer une séparation verticale, les pilotes [[IFR]] sont tenus d'utiliser l'altimètre. Il n'est pas permis d'utiliser l'altitude mesurée par les systèmes GPS.&lt;br /&gt;
&lt;br /&gt;
==Altitude densité==&lt;br /&gt;
&lt;br /&gt;
*L'altitude en fonction de la densité de l'air.&lt;br /&gt;
&lt;br /&gt;
C'est la seule altitude qui n'est pas utilisée pour déterminer la position de l'avion. Cependant, elle est un facteur important afin de connaître la puissance que votre avion/hélicoptère est capable de développer dans la situation actuelle.&lt;br /&gt;
&lt;br /&gt;
Des températures élevées génèrent un air moins dense. La faible densité de l'air provoque moins de traînée (frottement), moins de portance, de plus faible performances du moteur (les pales du rotor ont moins d'effet et le moteur reçoit moins d'oxygène). Mais moins de friction vous permet également de voler plus vite et de manière plus efficace, car moins d'énergie est perdue dans le frottement.&lt;br /&gt;
&lt;br /&gt;
De basses températures génèrent un air plus dense. Donc, vous avez plus de traînée, plus de portance et de meilleures performances du moteur (les pales du rotor ont plus d'effet et le moteur reçoit plus d'oxygène) pour le prix d'être plus lent et consomme plus de carburant car plus d'énergie est nécessaire pour vaincre le frottement.&lt;br /&gt;
&lt;br /&gt;
Dans FlightGear, la densité de l'air est simulée en empêchant un hélicoptère de décoller du sol par une chaude journée ou en rendant impossible le départ près de la ville de Mexico d'un Antanov lourdement chargé. L'altitude densité est calculée à partir de la pression barométrique et la température. Plus la température est élevée, plus la densité est faible, plus l'altitude densité est élevée (en référence à l'[[#Altitude vraie|altitude vraie]]). ([http://en.wikipedia.org/wiki/Density_altitude wikipedia])&lt;br /&gt;
&lt;br /&gt;
==Définitions générales==&lt;br /&gt;
===Hauteur===&lt;br /&gt;
La hauteur de quelque chose est la distance verticale jusqu'à un certain point.&lt;br /&gt;
&lt;br /&gt;
===Altitude vraie===&lt;br /&gt;
L'altitude vraie est la [[#Hauteur|hauteur]] au-dessus du niveau moyen de la mer ([[Fr/AMSL|AMSL]]).&lt;br /&gt;
&lt;br /&gt;
Après avoir calé l'[[altimeter|altimètre]] au [[QNH]], l'[[#Altitude indiquée|altitude indiquée]] est proche de l'altitude vraie.&lt;br /&gt;
&lt;br /&gt;
===Altitude absolue===&lt;br /&gt;
L'altitude absolue est la [[#Hauteur|hauteur]] par rapport au sol directement en dessous ([[Fr/AGL|AGL]]: au-dessus du niveau du sol).&lt;br /&gt;
&lt;br /&gt;
Un radar au sol et des systèmes avertisseurs de proximité du sol affichent l'altitude absolue. Si l'[[altimeter|altimètre]] est réglé sur zéro, tout en étant sur le terrain d'aviation, l'[[#Altitude indiquée|altitude indiquée]] sera l'altitude absolue aussi longtemps que l'[[#Elévation|élévation]] du terrain en dessous ne change pas.&lt;br /&gt;
&lt;br /&gt;
Dans FlightGear il y a un «système» d'altitude, cette altitude est [[Fr/AMSL|AMSL]]. Certains se réfèrent à cette altitude comme l'[[#Altitude absolue|altitude absolue]], ce qui est théoriquement incorrect.&lt;br /&gt;
&lt;br /&gt;
===Elévation===&lt;br /&gt;
L'[[#Altitude vraie|altitude vraie]] d'une position au sol est désignée comme l'élévation. En aviation, ces positions sont généralement des pistes ou des pics montagneux.&lt;br /&gt;
&lt;br /&gt;
Il est essentiel de connaître l'élévation de la piste avant de descendre vers elle. Les meilleures sources de données d'élévation sont les suivantes:&lt;br /&gt;
*[[Fr/Atlas|Atlas]] fournit une carte de hauteur précise. Il faut interpréter les couleurs de la carte pour connaître l'élévation. Pour les vols IFR et de planification des vols, Atlas n'est pas adapté.&lt;br /&gt;
*[[Fr/MPMap|MPMap]] est un outil en ligne pour FlightGear qui fournit des informations précises sur les pistes y compris l'élévation.&lt;br /&gt;
*[[Airport Diagram Generator]] va créer un fichier PDF, une carte précise de l'aérodrome. Il comprend l'élévation.&lt;br /&gt;
*Les sites Web qui sont utilisés pour la planification de vols réels. Quelques problèmes, la piste réel n'est pas toujours à 100% la même que la piste de FlightGear, toutes les pistes de FlightGear ne se trouvent pas sur ces sites (La base de données de FlightGear est plus complète).&lt;br /&gt;
&lt;br /&gt;
Il est très regrettable que [[Kelpie]] ne fournisse pas cette information.&lt;br /&gt;
&lt;br /&gt;
==Informations complémentaires==&lt;br /&gt;
*QFE: Pression atmosphérique de l'aéroport, peut être utilisé pour indiquer des [[#Altitude absolue|altitudes absolues]].&lt;br /&gt;
*QNE: Elévation de l'aérodrome au-dessus de [[Fr/AMSL|AMSL]].&lt;br /&gt;
*QFF: Pression atmosphérique calculée par rapport à [[Fr/AMSL|AMSL]] dans des conditions standard, ce code n'est pas utilisé.&lt;br /&gt;
*ISA-1: International Standard Atmosphere: modèle atmosphérique des différentes couches de l'atmosphère terrestre. Chaque couche a une température, une pression, de la viscosité et de la densité. Elle est basée sur un modèle moyen de l'atmosphère terrestre. Publication ISO 2533:1975. Il s'agit d'un modèle US qui est synchronisé avec cette norme, mais est plus élevée.&lt;br /&gt;
*ISA-2: ICAO Standard Atmosphere: Identique à ISA-1, mais plus élevé et avec des valeurs légèrement différentes. En aviation, c'est la norme à utiliser. Publication Doc 7488-CD.&lt;br /&gt;
*Attitude: Le plus souvent, le &amp;quot;Pitch&amp;quot; d'un avion, l'angle que fait le nez en référence au sol, mais il y a d'autres définitions.&lt;br /&gt;
*Ascend = montée = aller plus haut.&lt;br /&gt;
*Descente: aller plus bas.&lt;br /&gt;
&lt;br /&gt;
==Liens externes==&lt;br /&gt;
*http://fr.wikipedia.org/wiki/Altitude&lt;br /&gt;
*http://fr.wikipedia.org/wiki/QNE&lt;br /&gt;
*http://fr.wikipedia.org/wiki/Niveau_de_vol&lt;br /&gt;
*http://fr.wikipedia.org/wiki/QNH&lt;br /&gt;
*http://www.altitude.nu/ (en)&lt;br /&gt;
&lt;br /&gt;
{{Understanding}}&lt;br /&gt;
[[Category:Aviation]]&lt;br /&gt;
[[ca:Altitud]]&lt;br /&gt;
[[de:Flughöhe]]&lt;br /&gt;
[[en:Altitude]]&lt;br /&gt;
[[es:Altitud]]&lt;br /&gt;
[[fr:Altitude]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Fr/MSL&amp;diff=127158</id>
		<title>Fr/MSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Fr/MSL&amp;diff=127158"/>
		<updated>2020-08-30T11:45:06Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
Le [http://fr.wikipedia.org/wiki/Niveau_de_la_mer niveau moyen de la mer (MSL)] est une mesure de la hauteur moyenne de la surface de l'océan (comme le point à mi-chemin entre la marée haute moyenne et la marée basse moyenne). Il joue un rôle extrêmement important dans l'aviation, où la pression standard au niveau de la mer est utilisée comme la mesure de référence pour l'[[Fr/Altitude|altitude]] des [[Fr/Altitude#Niveau_de_vol|niveaux de vol]].&lt;br /&gt;
&lt;br /&gt;
==Hauteur au-dessus du niveau moyen de la mer (AMSL)==&lt;br /&gt;
{{Distinguish|Fr/AGL}}&lt;br /&gt;
Hauteur '''au-dessus du niveau moyen de la mer (AMSL)''' fait référence à l'élévation d'un objet par rapport au niveau moyen de la mer.&lt;br /&gt;
&lt;br /&gt;
[[Category:Aviation]]&lt;br /&gt;
[[en:Mean Sea Level]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Mean_Sea_Level&amp;diff=127157</id>
		<title>Mean Sea Level</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Mean_Sea_Level&amp;diff=127157"/>
		<updated>2020-08-30T11:44:31Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Sea_level Mean sea level ('''MSL''')] is a measure of the average height of the ocean's surface (such as the halfway point between the mean high and low tide). It plays an extremely important role in aviation, where standard sea level pressure is used as the measurement reference of [[altitude]] at [[Altitude#Flight_level | flight levels]].&lt;br /&gt;
&lt;br /&gt;
== Height above mean sea level ==&lt;br /&gt;
{{Distinguish|AGL}}&lt;br /&gt;
Height '''above mean sea level (AMSL)''' refers to the elevation of an object relative to the mean sea level.&lt;br /&gt;
&lt;br /&gt;
[[Category:Aviation]]&lt;br /&gt;
[[fr:MSL]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Aircraft_tester_list&amp;diff=126157</id>
		<title>Aircraft tester list</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Aircraft_tester_list&amp;diff=126157"/>
		<updated>2020-07-09T15:30:24Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a list of '''aircraft testers''' using using the procedures laid out in [[Aircraft testing checklist]] to validate that aircraft below are compatible with a FlightGear version.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Aircraft !! Tester(s) !! Remarks&lt;br /&gt;
|-&lt;br /&gt;
| 737NGs || James Turner || &lt;br /&gt;
|-&lt;br /&gt;
| 757 || James Turner|| &lt;br /&gt;
|-&lt;br /&gt;
| A300 || Jonathan Redpath|| &lt;br /&gt;
|-&lt;br /&gt;
| A320-200 || Jonathan Redpath|| [NB - upstream github repo for issues]&lt;br /&gt;
|-&lt;br /&gt;
| A340-600 || Jonathan Redpath|| &lt;br /&gt;
|-&lt;br /&gt;
| A380 || Jonathan Redpath|| &lt;br /&gt;
|-&lt;br /&gt;
| Aerostar-700 || James Turner || &lt;br /&gt;
|-&lt;br /&gt;
| B1900D || James Turner || &lt;br /&gt;
|-&lt;br /&gt;
| CH-53E || Richard H. || &lt;br /&gt;
|-&lt;br /&gt;
| CRJ700 family || Henning, Daniel || &lt;br /&gt;
|-&lt;br /&gt;
| Cap 10C || Scott || &lt;br /&gt;
|-&lt;br /&gt;
| Cessna 208B Caravan || James Turner || &lt;br /&gt;
|-&lt;br /&gt;
| DR400 || Scott || &lt;br /&gt;
|-&lt;br /&gt;
| DaSH || Wayne Bragg|| &lt;br /&gt;
|-&lt;br /&gt;
| F-14 || Richard H. || Willing to reassign upon request to those with experience of this aircraft&lt;br /&gt;
|-&lt;br /&gt;
| F-15 || Richard H. || Willing to reassign upon request to those with experience of this aircraft&lt;br /&gt;
|-&lt;br /&gt;
| F6F - Hellcat || Keith  || &lt;br /&gt;
|-&lt;br /&gt;
| F-86 || Jonathan Redpath || &lt;br /&gt;
|-&lt;br /&gt;
| Fokker 100 || Jonathan Redpath || &lt;br /&gt;
|-&lt;br /&gt;
| Grob || Scott || &lt;br /&gt;
|-&lt;br /&gt;
| Jaguar || Richard || &lt;br /&gt;
|-&lt;br /&gt;
| Junkers JU-52 || James Turner || &lt;br /&gt;
|-&lt;br /&gt;
| hunter || Stuart || &lt;br /&gt;
|-&lt;br /&gt;
| J3Cub || Wayne Bragg|| &lt;br /&gt;
|-&lt;br /&gt;
| Lionceau || Scott || &lt;br /&gt;
|-&lt;br /&gt;
| p51d || Stuart || &lt;br /&gt;
|-&lt;br /&gt;
| SUMPAC || Wayne Bragg|| &lt;br /&gt;
|-&lt;br /&gt;
| Skyvan || Keith  || &lt;br /&gt;
|-&lt;br /&gt;
| Socata  || Scott || &lt;br /&gt;
|-&lt;br /&gt;
| seahawk || Stuart || &lt;br /&gt;
|-&lt;br /&gt;
| wrightFlyer || Stuart || &lt;br /&gt;
|-&lt;br /&gt;
| tu154b || Gaétan Allaert || &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=126154</id>
		<title>Building FlightGear - Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=126154"/>
		<updated>2020-07-09T09:17:48Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Simgear */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Main article|Building Flightgear}} &lt;br /&gt;
&lt;br /&gt;
This section describes how to build [[FlightGear]] on Linux system.&lt;br /&gt;
&lt;br /&gt;
Compiling FlightGear is not a task for novice users. Thus, if you're a beginner (we all were once) on a platform which binaries are available for, we recommend postponing this task and just starting with the binary distribution to get you flying.&lt;br /&gt;
&lt;br /&gt;
openSUSE also provides binary packages of the latest development version, which are continuously updated.&lt;br /&gt;
Follow [http://software.opensuse.org/download.html?lang=en&amp;amp;project=games:FlightGear:Unstable&amp;amp;package=fgrun this link] to select your openSUSE version and install, or manually add ''games:FlightGear:Unstable'' to your ''YaST Software Repositories''.&lt;br /&gt;
&lt;br /&gt;
For Ubuntu, there is a PPA that provides the latest development version of FlightGear and SimGear and a recent version of FlightGear data. See [https://launchpad.net/~saiarcot895/+archive/flightgear-edge this page] for more info. To add the PPA, run &amp;lt;tt&amp;gt;sudo apt-add-repository ppa:saiarcot895/flightgear-edge&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Or if you develop on Ubuntu or Debian, consider trying the script described in [[Scripted Compilation on Linux Debian/Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
= Distro-specific instructions =&lt;br /&gt;
== Debian/Ubuntu ==&lt;br /&gt;
* You can use the [[Scripted Compilation on Linux Debian/Ubuntu]] script to have FlightGear compiled in one shot under both Ubuntu and Debian systems.&lt;br /&gt;
* Debian users who prefer to build it without script may look at [[Building Flightgear - Debian]].&lt;br /&gt;
* Ubuntu users can follow these instructions to build FlightGear on [[Building Flightgear - Ubuntu | Ubuntu 20.04]].&lt;br /&gt;
* Raspbian users can follow these instructions to build FlightGear on [[Building Flightgear - Raspbian | Raspbian Buster]].&lt;br /&gt;
* Hints for [[Ubuntu]] users.&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
* Gentoo users can also use overlays to build FlightGear without much hassle: [[Building Flightgear - Gentoo]].&lt;br /&gt;
&lt;br /&gt;
== CentOS ==&lt;br /&gt;
CentOS users can follow these instructions to build FlightGear on [[Building Flightgear - CentOS | CentOS 8]].&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
{{Note|as of 12/2017, people may have to build using at least OSG 3.4 due to some compilation issues -for details, refer to [[Howto:Building FlightGear without HiDPI support]]}}&lt;br /&gt;
&lt;br /&gt;
Before you can compile FlightGear, you need to have the following installed on your computer:&lt;br /&gt;
&lt;br /&gt;
'''C++ compiler'''&lt;br /&gt;
&lt;br /&gt;
These are: c++, g++ found under the &amp;lt;code&amp;gt;/usr/bin&amp;lt;/code&amp;gt; directory.  You will also need to have the tools '''CMake''' installed.&lt;br /&gt;
&lt;br /&gt;
'''GIT'''&lt;br /&gt;
&lt;br /&gt;
See [[FlightGear and Git]].&lt;br /&gt;
&lt;br /&gt;
'''[[OpenGL]] support'''&lt;br /&gt;
&lt;br /&gt;
More specifically, your system needs the support for hardware accelerated graphics.  You can check for this by running the following in a [[command line]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ glxinfo | grep direct&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: To run the above command, you need to have the tool '''mesa-utils''' installed.&lt;br /&gt;
&lt;br /&gt;
You should then see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: Yes&lt;br /&gt;
&lt;br /&gt;
This means you are good to go as far as OpenGL support is concerned.&lt;br /&gt;
&lt;br /&gt;
If you see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: No&lt;br /&gt;
&lt;br /&gt;
Don't panic yet.  This may just mean some required libraries for hardware accelerated graphic are missing.  Go ahead and try installing '''plib 1.8.5''' and its dependencies first.  If you still get the above message, then you will need to do some googling and troubleshoot yourself.&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
FlightGear is dependent on quite a few number of libraries.  You do not need to compile all of them yourself, but you will at least need to have their development version installed.  For example, the development version for package &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt;'''-dev'''.&lt;br /&gt;
&lt;br /&gt;
The dependency is summarized in the following tree.  Please note that each library has its own dependencies, and most of these are not shown here.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;FlightGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
** [http://kcat.strangesoft.net/openal.html &amp;lt;tt&amp;gt;OpenAL&amp;lt;/tt&amp;gt;]&lt;br /&gt;
** &amp;lt;tt&amp;gt;SimGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
*** [http://plib.sourceforge.net/ &amp;lt;tt&amp;gt;PLIB&amp;lt;/tt&amp;gt;]. Since March 2008, you will need version 1.8.5 - your distro probably supplies 1.8.4 still.&lt;br /&gt;
**** For versions pre March 2008: (Free)&amp;lt;tt&amp;gt;GLUT&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; (We recommend the use of &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; over &amp;lt;tt&amp;gt;Free/GLUT&amp;lt;/tt&amp;gt;, [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg16153.html however since March 2008, &amp;lt;tt&amp;gt;FreeGLUT&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; are both considered deprecated], please only use &amp;lt;code&amp;gt;--enable-osgviewer&amp;lt;/code&amp;gt; during configuration instead) &lt;br /&gt;
***  &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt;  (check link for compatible versions)&lt;br /&gt;
*** You also need the development files for several basic libraries to build the software, among them the following (the package names are for Debian and derivatives(?)):&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libfreetype6-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libjpeg62-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libungif4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libtiff4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libpng12-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxmu-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxi-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;zlib1g-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libglut3-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you attack the above dependencies in the order listed below, you should be good:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; Most distributions include glut packages, although you may have to hunt for them. Make sure you install both the &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;glut-devel&amp;lt;/tt&amp;gt; packages, otherwise FlightGear may be able to compile but won't run correctly.&lt;br /&gt;
# &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; Most distributions install the basic &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; libraries by default, but not the development portions. If you don't have &amp;lt;tt&amp;gt;zlib.h&amp;lt;/tt&amp;gt;, you probably need to install the &amp;lt;tt&amp;gt;zlib-devel&amp;lt;/tt&amp;gt; package for your distribution. &lt;br /&gt;
# &amp;lt;tt&amp;gt;plib&amp;lt;/tt&amp;gt; Portability libraries and scene graph. &lt;br /&gt;
# &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt; &lt;br /&gt;
# &amp;lt;tt&amp;gt;simgear&amp;lt;/tt&amp;gt; Simulation support libraries. If you are building FlightGear from Git, you need the Git version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.&lt;br /&gt;
&lt;br /&gt;
= Compiling =&lt;br /&gt;
&lt;br /&gt;
== Definitions ==&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the FlightGear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/FlightGear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo&amp;lt;/code&amp;gt; can be replaced by &amp;lt;code&amp;gt;cmake -DCMAKE_BUILD_TYPE=Release&amp;lt;/code&amp;gt; for better performances.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB&amp;lt;/code&amp;gt;: The default &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directory is different between RedHat and Debian based distributions. Usually on Debian based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib&lt;br /&gt;
Usually on RedHat based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib64&lt;br /&gt;
&lt;br /&gt;
== SimGear ==&lt;br /&gt;
The source code of SimGear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of SimGear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the SimGear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the SimGear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of SimGear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== FlightGear ==&lt;br /&gt;
The data for FlightGear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here].&lt;br /&gt;
 rm -f -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 mkdir --parents -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/FlightGear-${FLIGHTGEAR_VERSION}-data.tar.bz2&amp;quot;&lt;br /&gt;
 popd&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 ln --symbolic -- &amp;quot;FlightGear-${FLIGHTGEAR_VERSION}/fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* as a clone of the FlightGear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 git clone --depth 1 https://git.code.sf.net/p/flightgear/fgdata flightgear-fgdata&lt;br /&gt;
 ln --symbolic -- &amp;quot;flightgear-fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the FlightGear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/flightgear-fgdata/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
The source code of FlightGear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of FlightGear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the FlightGear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the FlightGear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of FlightGear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE \&lt;br /&gt;
       -DENABLE_FGQCANVAS=ON&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX_LIB}/&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/FlightGear make --jobs=${NR_JOBS} -- test_suite&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/FlightGear make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
== Instructions ==&lt;br /&gt;
*  [[MSYS]] &lt;br /&gt;
*  [[MinGW/cross-compiler]] &lt;br /&gt;
*  [[CodeBlocks IDE]] &lt;br /&gt;
*  [[OpenSUSE 10.1 10.2]] &lt;br /&gt;
* [http://www.geoffmclane.com/fg/fgmsvc7.htm MSVC7 *.Net]&lt;br /&gt;
* [http://www.oflebbe.de/oflebbe/FlightGear/index.html MSVC8 aka Visual 2005]&lt;br /&gt;
* [http://macflightgear.sourceforge.net/home/documents/ Mac OS X]&lt;br /&gt;
= Important note for GIT users =&lt;br /&gt;
As of latest development in GIT, only cmake is now required for building both SimGear and FlightGear. So if you build GIT (for what any reason) please don't try to use autogen.sh as it is removed from repository.&lt;br /&gt;
&lt;br /&gt;
For detailed instructions, see page [[Building_using_CMake|Building using cmake]].&lt;br /&gt;
&lt;br /&gt;
{{Building}}&lt;br /&gt;
&lt;br /&gt;
[[fr:Compiler FlightGear sous GNU/Linux]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=126153</id>
		<title>Building FlightGear - Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=126153"/>
		<updated>2020-07-09T09:14:29Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Flightgear */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Main article|Building Flightgear}} &lt;br /&gt;
&lt;br /&gt;
This section describes how to build [[FlightGear]] on Linux system.&lt;br /&gt;
&lt;br /&gt;
Compiling FlightGear is not a task for novice users. Thus, if you're a beginner (we all were once) on a platform which binaries are available for, we recommend postponing this task and just starting with the binary distribution to get you flying.&lt;br /&gt;
&lt;br /&gt;
openSUSE also provides binary packages of the latest development version, which are continuously updated.&lt;br /&gt;
Follow [http://software.opensuse.org/download.html?lang=en&amp;amp;project=games:FlightGear:Unstable&amp;amp;package=fgrun this link] to select your openSUSE version and install, or manually add ''games:FlightGear:Unstable'' to your ''YaST Software Repositories''.&lt;br /&gt;
&lt;br /&gt;
For Ubuntu, there is a PPA that provides the latest development version of FlightGear and SimGear and a recent version of FlightGear data. See [https://launchpad.net/~saiarcot895/+archive/flightgear-edge this page] for more info. To add the PPA, run &amp;lt;tt&amp;gt;sudo apt-add-repository ppa:saiarcot895/flightgear-edge&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Or if you develop on Ubuntu or Debian, consider trying the script described in [[Scripted Compilation on Linux Debian/Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
= Distro-specific instructions =&lt;br /&gt;
== Debian/Ubuntu ==&lt;br /&gt;
* You can use the [[Scripted Compilation on Linux Debian/Ubuntu]] script to have FlightGear compiled in one shot under both Ubuntu and Debian systems.&lt;br /&gt;
* Debian users who prefer to build it without script may look at [[Building Flightgear - Debian]].&lt;br /&gt;
* Ubuntu users can follow these instructions to build FlightGear on [[Building Flightgear - Ubuntu | Ubuntu 20.04]].&lt;br /&gt;
* Raspbian users can follow these instructions to build FlightGear on [[Building Flightgear - Raspbian | Raspbian Buster]].&lt;br /&gt;
* Hints for [[Ubuntu]] users.&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
* Gentoo users can also use overlays to build FlightGear without much hassle: [[Building Flightgear - Gentoo]].&lt;br /&gt;
&lt;br /&gt;
== CentOS ==&lt;br /&gt;
CentOS users can follow these instructions to build FlightGear on [[Building Flightgear - CentOS | CentOS 8]].&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
{{Note|as of 12/2017, people may have to build using at least OSG 3.4 due to some compilation issues -for details, refer to [[Howto:Building FlightGear without HiDPI support]]}}&lt;br /&gt;
&lt;br /&gt;
Before you can compile FlightGear, you need to have the following installed on your computer:&lt;br /&gt;
&lt;br /&gt;
'''C++ compiler'''&lt;br /&gt;
&lt;br /&gt;
These are: c++, g++ found under the &amp;lt;code&amp;gt;/usr/bin&amp;lt;/code&amp;gt; directory.  You will also need to have the tools '''CMake''' installed.&lt;br /&gt;
&lt;br /&gt;
'''GIT'''&lt;br /&gt;
&lt;br /&gt;
See [[FlightGear and Git]].&lt;br /&gt;
&lt;br /&gt;
'''[[OpenGL]] support'''&lt;br /&gt;
&lt;br /&gt;
More specifically, your system needs the support for hardware accelerated graphics.  You can check for this by running the following in a [[command line]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ glxinfo | grep direct&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: To run the above command, you need to have the tool '''mesa-utils''' installed.&lt;br /&gt;
&lt;br /&gt;
You should then see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: Yes&lt;br /&gt;
&lt;br /&gt;
This means you are good to go as far as OpenGL support is concerned.&lt;br /&gt;
&lt;br /&gt;
If you see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: No&lt;br /&gt;
&lt;br /&gt;
Don't panic yet.  This may just mean some required libraries for hardware accelerated graphic are missing.  Go ahead and try installing '''plib 1.8.5''' and its dependencies first.  If you still get the above message, then you will need to do some googling and troubleshoot yourself.&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
FlightGear is dependent on quite a few number of libraries.  You do not need to compile all of them yourself, but you will at least need to have their development version installed.  For example, the development version for package &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt;'''-dev'''.&lt;br /&gt;
&lt;br /&gt;
The dependency is summarized in the following tree.  Please note that each library has its own dependencies, and most of these are not shown here.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;FlightGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
** [http://kcat.strangesoft.net/openal.html &amp;lt;tt&amp;gt;OpenAL&amp;lt;/tt&amp;gt;]&lt;br /&gt;
** &amp;lt;tt&amp;gt;SimGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
*** [http://plib.sourceforge.net/ &amp;lt;tt&amp;gt;PLIB&amp;lt;/tt&amp;gt;]. Since March 2008, you will need version 1.8.5 - your distro probably supplies 1.8.4 still.&lt;br /&gt;
**** For versions pre March 2008: (Free)&amp;lt;tt&amp;gt;GLUT&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; (We recommend the use of &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; over &amp;lt;tt&amp;gt;Free/GLUT&amp;lt;/tt&amp;gt;, [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg16153.html however since March 2008, &amp;lt;tt&amp;gt;FreeGLUT&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; are both considered deprecated], please only use &amp;lt;code&amp;gt;--enable-osgviewer&amp;lt;/code&amp;gt; during configuration instead) &lt;br /&gt;
***  &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt;  (check link for compatible versions)&lt;br /&gt;
*** You also need the development files for several basic libraries to build the software, among them the following (the package names are for Debian and derivatives(?)):&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libfreetype6-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libjpeg62-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libungif4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libtiff4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libpng12-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxmu-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxi-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;zlib1g-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libglut3-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you attack the above dependencies in the order listed below, you should be good:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; Most distributions include glut packages, although you may have to hunt for them. Make sure you install both the &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;glut-devel&amp;lt;/tt&amp;gt; packages, otherwise FlightGear may be able to compile but won't run correctly.&lt;br /&gt;
# &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; Most distributions install the basic &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; libraries by default, but not the development portions. If you don't have &amp;lt;tt&amp;gt;zlib.h&amp;lt;/tt&amp;gt;, you probably need to install the &amp;lt;tt&amp;gt;zlib-devel&amp;lt;/tt&amp;gt; package for your distribution. &lt;br /&gt;
# &amp;lt;tt&amp;gt;plib&amp;lt;/tt&amp;gt; Portability libraries and scene graph. &lt;br /&gt;
# &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt; &lt;br /&gt;
# &amp;lt;tt&amp;gt;simgear&amp;lt;/tt&amp;gt; Simulation support libraries. If you are building FlightGear from Git, you need the Git version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.&lt;br /&gt;
&lt;br /&gt;
= Compiling =&lt;br /&gt;
&lt;br /&gt;
== Definitions ==&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the FlightGear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/FlightGear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo&amp;lt;/code&amp;gt; can be replaced by &amp;lt;code&amp;gt;cmake -DCMAKE_BUILD_TYPE=Release&amp;lt;/code&amp;gt; for better performances.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB&amp;lt;/code&amp;gt;: The default &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directory is different between RedHat and Debian based distributions. Usually on Debian based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib&lt;br /&gt;
Usually on RedHat based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib64&lt;br /&gt;
&lt;br /&gt;
== Simgear ==&lt;br /&gt;
The source code of Simgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Simgear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Simgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Simgear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== FlightGear ==&lt;br /&gt;
The data for FlightGear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here].&lt;br /&gt;
 rm -f -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 mkdir --parents -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/FlightGear-${FLIGHTGEAR_VERSION}-data.tar.bz2&amp;quot;&lt;br /&gt;
 popd&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 ln --symbolic -- &amp;quot;FlightGear-${FLIGHTGEAR_VERSION}/fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* as a clone of the FlightGear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 git clone --depth 1 https://git.code.sf.net/p/flightgear/fgdata flightgear-fgdata&lt;br /&gt;
 ln --symbolic -- &amp;quot;flightgear-fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the FlightGear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/flightgear-fgdata/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
The source code of FlightGear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of FlightGear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the FlightGear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the FlightGear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of FlightGear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE \&lt;br /&gt;
       -DENABLE_FGQCANVAS=ON&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX_LIB}/&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/FlightGear make --jobs=${NR_JOBS} -- test_suite&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/FlightGear make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
== Instructions ==&lt;br /&gt;
*  [[MSYS]] &lt;br /&gt;
*  [[MinGW/cross-compiler]] &lt;br /&gt;
*  [[CodeBlocks IDE]] &lt;br /&gt;
*  [[OpenSUSE 10.1 10.2]] &lt;br /&gt;
* [http://www.geoffmclane.com/fg/fgmsvc7.htm MSVC7 *.Net]&lt;br /&gt;
* [http://www.oflebbe.de/oflebbe/FlightGear/index.html MSVC8 aka Visual 2005]&lt;br /&gt;
* [http://macflightgear.sourceforge.net/home/documents/ Mac OS X]&lt;br /&gt;
= Important note for GIT users =&lt;br /&gt;
As of latest development in GIT, only cmake is now required for building both SimGear and FlightGear. So if you build GIT (for what any reason) please don't try to use autogen.sh as it is removed from repository.&lt;br /&gt;
&lt;br /&gt;
For detailed instructions, see page [[Building_using_CMake|Building using cmake]].&lt;br /&gt;
&lt;br /&gt;
{{Building}}&lt;br /&gt;
&lt;br /&gt;
[[fr:Compiler FlightGear sous GNU/Linux]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=126152</id>
		<title>Building FlightGear - Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=126152"/>
		<updated>2020-07-09T09:08:30Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Definitions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Main article|Building Flightgear}} &lt;br /&gt;
&lt;br /&gt;
This section describes how to build [[FlightGear]] on Linux system.&lt;br /&gt;
&lt;br /&gt;
Compiling FlightGear is not a task for novice users. Thus, if you're a beginner (we all were once) on a platform which binaries are available for, we recommend postponing this task and just starting with the binary distribution to get you flying.&lt;br /&gt;
&lt;br /&gt;
openSUSE also provides binary packages of the latest development version, which are continuously updated.&lt;br /&gt;
Follow [http://software.opensuse.org/download.html?lang=en&amp;amp;project=games:FlightGear:Unstable&amp;amp;package=fgrun this link] to select your openSUSE version and install, or manually add ''games:FlightGear:Unstable'' to your ''YaST Software Repositories''.&lt;br /&gt;
&lt;br /&gt;
For Ubuntu, there is a PPA that provides the latest development version of FlightGear and SimGear and a recent version of FlightGear data. See [https://launchpad.net/~saiarcot895/+archive/flightgear-edge this page] for more info. To add the PPA, run &amp;lt;tt&amp;gt;sudo apt-add-repository ppa:saiarcot895/flightgear-edge&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Or if you develop on Ubuntu or Debian, consider trying the script described in [[Scripted Compilation on Linux Debian/Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
= Distro-specific instructions =&lt;br /&gt;
== Debian/Ubuntu ==&lt;br /&gt;
* You can use the [[Scripted Compilation on Linux Debian/Ubuntu]] script to have FlightGear compiled in one shot under both Ubuntu and Debian systems.&lt;br /&gt;
* Debian users who prefer to build it without script may look at [[Building Flightgear - Debian]].&lt;br /&gt;
* Ubuntu users can follow these instructions to build FlightGear on [[Building Flightgear - Ubuntu | Ubuntu 20.04]].&lt;br /&gt;
* Raspbian users can follow these instructions to build FlightGear on [[Building Flightgear - Raspbian | Raspbian Buster]].&lt;br /&gt;
* Hints for [[Ubuntu]] users.&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
* Gentoo users can also use overlays to build FlightGear without much hassle: [[Building Flightgear - Gentoo]].&lt;br /&gt;
&lt;br /&gt;
== CentOS ==&lt;br /&gt;
CentOS users can follow these instructions to build FlightGear on [[Building Flightgear - CentOS | CentOS 8]].&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
{{Note|as of 12/2017, people may have to build using at least OSG 3.4 due to some compilation issues -for details, refer to [[Howto:Building FlightGear without HiDPI support]]}}&lt;br /&gt;
&lt;br /&gt;
Before you can compile FlightGear, you need to have the following installed on your computer:&lt;br /&gt;
&lt;br /&gt;
'''C++ compiler'''&lt;br /&gt;
&lt;br /&gt;
These are: c++, g++ found under the &amp;lt;code&amp;gt;/usr/bin&amp;lt;/code&amp;gt; directory.  You will also need to have the tools '''CMake''' installed.&lt;br /&gt;
&lt;br /&gt;
'''GIT'''&lt;br /&gt;
&lt;br /&gt;
See [[FlightGear and Git]].&lt;br /&gt;
&lt;br /&gt;
'''[[OpenGL]] support'''&lt;br /&gt;
&lt;br /&gt;
More specifically, your system needs the support for hardware accelerated graphics.  You can check for this by running the following in a [[command line]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ glxinfo | grep direct&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: To run the above command, you need to have the tool '''mesa-utils''' installed.&lt;br /&gt;
&lt;br /&gt;
You should then see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: Yes&lt;br /&gt;
&lt;br /&gt;
This means you are good to go as far as OpenGL support is concerned.&lt;br /&gt;
&lt;br /&gt;
If you see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: No&lt;br /&gt;
&lt;br /&gt;
Don't panic yet.  This may just mean some required libraries for hardware accelerated graphic are missing.  Go ahead and try installing '''plib 1.8.5''' and its dependencies first.  If you still get the above message, then you will need to do some googling and troubleshoot yourself.&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
FlightGear is dependent on quite a few number of libraries.  You do not need to compile all of them yourself, but you will at least need to have their development version installed.  For example, the development version for package &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt;'''-dev'''.&lt;br /&gt;
&lt;br /&gt;
The dependency is summarized in the following tree.  Please note that each library has its own dependencies, and most of these are not shown here.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;FlightGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
** [http://kcat.strangesoft.net/openal.html &amp;lt;tt&amp;gt;OpenAL&amp;lt;/tt&amp;gt;]&lt;br /&gt;
** &amp;lt;tt&amp;gt;SimGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
*** [http://plib.sourceforge.net/ &amp;lt;tt&amp;gt;PLIB&amp;lt;/tt&amp;gt;]. Since March 2008, you will need version 1.8.5 - your distro probably supplies 1.8.4 still.&lt;br /&gt;
**** For versions pre March 2008: (Free)&amp;lt;tt&amp;gt;GLUT&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; (We recommend the use of &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; over &amp;lt;tt&amp;gt;Free/GLUT&amp;lt;/tt&amp;gt;, [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg16153.html however since March 2008, &amp;lt;tt&amp;gt;FreeGLUT&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; are both considered deprecated], please only use &amp;lt;code&amp;gt;--enable-osgviewer&amp;lt;/code&amp;gt; during configuration instead) &lt;br /&gt;
***  &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt;  (check link for compatible versions)&lt;br /&gt;
*** You also need the development files for several basic libraries to build the software, among them the following (the package names are for Debian and derivatives(?)):&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libfreetype6-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libjpeg62-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libungif4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libtiff4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libpng12-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxmu-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxi-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;zlib1g-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libglut3-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you attack the above dependencies in the order listed below, you should be good:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; Most distributions include glut packages, although you may have to hunt for them. Make sure you install both the &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;glut-devel&amp;lt;/tt&amp;gt; packages, otherwise FlightGear may be able to compile but won't run correctly.&lt;br /&gt;
# &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; Most distributions install the basic &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; libraries by default, but not the development portions. If you don't have &amp;lt;tt&amp;gt;zlib.h&amp;lt;/tt&amp;gt;, you probably need to install the &amp;lt;tt&amp;gt;zlib-devel&amp;lt;/tt&amp;gt; package for your distribution. &lt;br /&gt;
# &amp;lt;tt&amp;gt;plib&amp;lt;/tt&amp;gt; Portability libraries and scene graph. &lt;br /&gt;
# &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt; &lt;br /&gt;
# &amp;lt;tt&amp;gt;simgear&amp;lt;/tt&amp;gt; Simulation support libraries. If you are building FlightGear from Git, you need the Git version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.&lt;br /&gt;
&lt;br /&gt;
= Compiling =&lt;br /&gt;
&lt;br /&gt;
== Definitions ==&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the FlightGear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/FlightGear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo&amp;lt;/code&amp;gt; can be replaced by &amp;lt;code&amp;gt;cmake -DCMAKE_BUILD_TYPE=Release&amp;lt;/code&amp;gt; for better performances.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB&amp;lt;/code&amp;gt;: The default &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directory is different between RedHat and Debian based distributions. Usually on Debian based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib&lt;br /&gt;
Usually on RedHat based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib64&lt;br /&gt;
&lt;br /&gt;
== Simgear ==&lt;br /&gt;
The source code of Simgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Simgear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Simgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Simgear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flightgear ==&lt;br /&gt;
The data for Flightgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here].&lt;br /&gt;
 rm -f -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 mkdir --parents -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/FlightGear-${FLIGHTGEAR_VERSION}-data.tar.bz2&amp;quot;&lt;br /&gt;
 popd&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 ln --symbolic -- &amp;quot;FlightGear-${FLIGHTGEAR_VERSION}/fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 git clone --depth 1 https://git.code.sf.net/p/flightgear/fgdata flightgear-fgdata&lt;br /&gt;
 ln --symbolic -- &amp;quot;flightgear-fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/flightgear-fgdata/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
The source code of Flightgear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Flightgear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Flightgear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE \&lt;br /&gt;
       -DENABLE_FGQCANVAS=ON&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX_LIB}/&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/Flightgear make --jobs=${NR_JOBS} -- test_suite&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/Flightgear make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
== Instructions ==&lt;br /&gt;
*  [[MSYS]] &lt;br /&gt;
*  [[MinGW/cross-compiler]] &lt;br /&gt;
*  [[CodeBlocks IDE]] &lt;br /&gt;
*  [[OpenSUSE 10.1 10.2]] &lt;br /&gt;
* [http://www.geoffmclane.com/fg/fgmsvc7.htm MSVC7 *.Net]&lt;br /&gt;
* [http://www.oflebbe.de/oflebbe/FlightGear/index.html MSVC8 aka Visual 2005]&lt;br /&gt;
* [http://macflightgear.sourceforge.net/home/documents/ Mac OS X]&lt;br /&gt;
= Important note for GIT users =&lt;br /&gt;
As of latest development in GIT, only cmake is now required for building both SimGear and FlightGear. So if you build GIT (for what any reason) please don't try to use autogen.sh as it is removed from repository.&lt;br /&gt;
&lt;br /&gt;
For detailed instructions, see page [[Building_using_CMake|Building using cmake]].&lt;br /&gt;
&lt;br /&gt;
{{Building}}&lt;br /&gt;
&lt;br /&gt;
[[fr:Compiler FlightGear sous GNU/Linux]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=126151</id>
		<title>Building FlightGear - Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=126151"/>
		<updated>2020-07-09T09:07:14Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Debian/Ubuntu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Main article|Building Flightgear}} &lt;br /&gt;
&lt;br /&gt;
This section describes how to build [[FlightGear]] on Linux system.&lt;br /&gt;
&lt;br /&gt;
Compiling FlightGear is not a task for novice users. Thus, if you're a beginner (we all were once) on a platform which binaries are available for, we recommend postponing this task and just starting with the binary distribution to get you flying.&lt;br /&gt;
&lt;br /&gt;
openSUSE also provides binary packages of the latest development version, which are continuously updated.&lt;br /&gt;
Follow [http://software.opensuse.org/download.html?lang=en&amp;amp;project=games:FlightGear:Unstable&amp;amp;package=fgrun this link] to select your openSUSE version and install, or manually add ''games:FlightGear:Unstable'' to your ''YaST Software Repositories''.&lt;br /&gt;
&lt;br /&gt;
For Ubuntu, there is a PPA that provides the latest development version of FlightGear and SimGear and a recent version of FlightGear data. See [https://launchpad.net/~saiarcot895/+archive/flightgear-edge this page] for more info. To add the PPA, run &amp;lt;tt&amp;gt;sudo apt-add-repository ppa:saiarcot895/flightgear-edge&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Or if you develop on Ubuntu or Debian, consider trying the script described in [[Scripted Compilation on Linux Debian/Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
= Distro-specific instructions =&lt;br /&gt;
== Debian/Ubuntu ==&lt;br /&gt;
* You can use the [[Scripted Compilation on Linux Debian/Ubuntu]] script to have FlightGear compiled in one shot under both Ubuntu and Debian systems.&lt;br /&gt;
* Debian users who prefer to build it without script may look at [[Building Flightgear - Debian]].&lt;br /&gt;
* Ubuntu users can follow these instructions to build FlightGear on [[Building Flightgear - Ubuntu | Ubuntu 20.04]].&lt;br /&gt;
* Raspbian users can follow these instructions to build FlightGear on [[Building Flightgear - Raspbian | Raspbian Buster]].&lt;br /&gt;
* Hints for [[Ubuntu]] users.&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
* Gentoo users can also use overlays to build FlightGear without much hassle: [[Building Flightgear - Gentoo]].&lt;br /&gt;
&lt;br /&gt;
== CentOS ==&lt;br /&gt;
CentOS users can follow these instructions to build FlightGear on [[Building Flightgear - CentOS | CentOS 8]].&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
{{Note|as of 12/2017, people may have to build using at least OSG 3.4 due to some compilation issues -for details, refer to [[Howto:Building FlightGear without HiDPI support]]}}&lt;br /&gt;
&lt;br /&gt;
Before you can compile FlightGear, you need to have the following installed on your computer:&lt;br /&gt;
&lt;br /&gt;
'''C++ compiler'''&lt;br /&gt;
&lt;br /&gt;
These are: c++, g++ found under the &amp;lt;code&amp;gt;/usr/bin&amp;lt;/code&amp;gt; directory.  You will also need to have the tools '''CMake''' installed.&lt;br /&gt;
&lt;br /&gt;
'''GIT'''&lt;br /&gt;
&lt;br /&gt;
See [[FlightGear and Git]].&lt;br /&gt;
&lt;br /&gt;
'''[[OpenGL]] support'''&lt;br /&gt;
&lt;br /&gt;
More specifically, your system needs the support for hardware accelerated graphics.  You can check for this by running the following in a [[command line]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ glxinfo | grep direct&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: To run the above command, you need to have the tool '''mesa-utils''' installed.&lt;br /&gt;
&lt;br /&gt;
You should then see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: Yes&lt;br /&gt;
&lt;br /&gt;
This means you are good to go as far as OpenGL support is concerned.&lt;br /&gt;
&lt;br /&gt;
If you see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: No&lt;br /&gt;
&lt;br /&gt;
Don't panic yet.  This may just mean some required libraries for hardware accelerated graphic are missing.  Go ahead and try installing '''plib 1.8.5''' and its dependencies first.  If you still get the above message, then you will need to do some googling and troubleshoot yourself.&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
FlightGear is dependent on quite a few number of libraries.  You do not need to compile all of them yourself, but you will at least need to have their development version installed.  For example, the development version for package &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt;'''-dev'''.&lt;br /&gt;
&lt;br /&gt;
The dependency is summarized in the following tree.  Please note that each library has its own dependencies, and most of these are not shown here.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;FlightGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
** [http://kcat.strangesoft.net/openal.html &amp;lt;tt&amp;gt;OpenAL&amp;lt;/tt&amp;gt;]&lt;br /&gt;
** &amp;lt;tt&amp;gt;SimGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
*** [http://plib.sourceforge.net/ &amp;lt;tt&amp;gt;PLIB&amp;lt;/tt&amp;gt;]. Since March 2008, you will need version 1.8.5 - your distro probably supplies 1.8.4 still.&lt;br /&gt;
**** For versions pre March 2008: (Free)&amp;lt;tt&amp;gt;GLUT&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; (We recommend the use of &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; over &amp;lt;tt&amp;gt;Free/GLUT&amp;lt;/tt&amp;gt;, [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg16153.html however since March 2008, &amp;lt;tt&amp;gt;FreeGLUT&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; are both considered deprecated], please only use &amp;lt;code&amp;gt;--enable-osgviewer&amp;lt;/code&amp;gt; during configuration instead) &lt;br /&gt;
***  &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt;  (check link for compatible versions)&lt;br /&gt;
*** You also need the development files for several basic libraries to build the software, among them the following (the package names are for Debian and derivatives(?)):&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libfreetype6-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libjpeg62-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libungif4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libtiff4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libpng12-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxmu-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxi-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;zlib1g-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libglut3-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you attack the above dependencies in the order listed below, you should be good:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; Most distributions include glut packages, although you may have to hunt for them. Make sure you install both the &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;glut-devel&amp;lt;/tt&amp;gt; packages, otherwise FlightGear may be able to compile but won't run correctly.&lt;br /&gt;
# &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; Most distributions install the basic &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; libraries by default, but not the development portions. If you don't have &amp;lt;tt&amp;gt;zlib.h&amp;lt;/tt&amp;gt;, you probably need to install the &amp;lt;tt&amp;gt;zlib-devel&amp;lt;/tt&amp;gt; package for your distribution. &lt;br /&gt;
# &amp;lt;tt&amp;gt;plib&amp;lt;/tt&amp;gt; Portability libraries and scene graph. &lt;br /&gt;
# &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt; &lt;br /&gt;
# &amp;lt;tt&amp;gt;simgear&amp;lt;/tt&amp;gt; Simulation support libraries. If you are building FlightGear from Git, you need the Git version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.&lt;br /&gt;
&lt;br /&gt;
= Compiling =&lt;br /&gt;
&lt;br /&gt;
== Definitions ==&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo&amp;lt;/code&amp;gt; can be replaced by &amp;lt;code&amp;gt;cmake -DCMAKE_BUILD_TYPE=Release&amp;lt;/code&amp;gt; for better performances.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB&amp;lt;/code&amp;gt;: The default &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directory is different between RedHat and Debian based distributions. Usually on Debian based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib&lt;br /&gt;
Usually on RedHat based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib64&lt;br /&gt;
&lt;br /&gt;
== Simgear ==&lt;br /&gt;
The source code of Simgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Simgear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Simgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Simgear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flightgear ==&lt;br /&gt;
The data for Flightgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here].&lt;br /&gt;
 rm -f -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 mkdir --parents -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/FlightGear-${FLIGHTGEAR_VERSION}-data.tar.bz2&amp;quot;&lt;br /&gt;
 popd&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 ln --symbolic -- &amp;quot;FlightGear-${FLIGHTGEAR_VERSION}/fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 git clone --depth 1 https://git.code.sf.net/p/flightgear/fgdata flightgear-fgdata&lt;br /&gt;
 ln --symbolic -- &amp;quot;flightgear-fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/flightgear-fgdata/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
The source code of Flightgear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Flightgear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Flightgear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE \&lt;br /&gt;
       -DENABLE_FGQCANVAS=ON&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX_LIB}/&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/Flightgear make --jobs=${NR_JOBS} -- test_suite&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/Flightgear make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
== Instructions ==&lt;br /&gt;
*  [[MSYS]] &lt;br /&gt;
*  [[MinGW/cross-compiler]] &lt;br /&gt;
*  [[CodeBlocks IDE]] &lt;br /&gt;
*  [[OpenSUSE 10.1 10.2]] &lt;br /&gt;
* [http://www.geoffmclane.com/fg/fgmsvc7.htm MSVC7 *.Net]&lt;br /&gt;
* [http://www.oflebbe.de/oflebbe/FlightGear/index.html MSVC8 aka Visual 2005]&lt;br /&gt;
* [http://macflightgear.sourceforge.net/home/documents/ Mac OS X]&lt;br /&gt;
= Important note for GIT users =&lt;br /&gt;
As of latest development in GIT, only cmake is now required for building both SimGear and FlightGear. So if you build GIT (for what any reason) please don't try to use autogen.sh as it is removed from repository.&lt;br /&gt;
&lt;br /&gt;
For detailed instructions, see page [[Building_using_CMake|Building using cmake]].&lt;br /&gt;
&lt;br /&gt;
{{Building}}&lt;br /&gt;
&lt;br /&gt;
[[fr:Compiler FlightGear sous GNU/Linux]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=126150</id>
		<title>Building FlightGear - Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=126150"/>
		<updated>2020-07-09T09:02:48Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Compiling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Main article|Building Flightgear}} &lt;br /&gt;
&lt;br /&gt;
This section describes how to build [[FlightGear]] on Linux system.&lt;br /&gt;
&lt;br /&gt;
Compiling FlightGear is not a task for novice users. Thus, if you're a beginner (we all were once) on a platform which binaries are available for, we recommend postponing this task and just starting with the binary distribution to get you flying.&lt;br /&gt;
&lt;br /&gt;
openSUSE also provides binary packages of the latest development version, which are continuously updated.&lt;br /&gt;
Follow [http://software.opensuse.org/download.html?lang=en&amp;amp;project=games:FlightGear:Unstable&amp;amp;package=fgrun this link] to select your openSUSE version and install, or manually add ''games:FlightGear:Unstable'' to your ''YaST Software Repositories''.&lt;br /&gt;
&lt;br /&gt;
For Ubuntu, there is a PPA that provides the latest development version of FlightGear and SimGear and a recent version of FlightGear data. See [https://launchpad.net/~saiarcot895/+archive/flightgear-edge this page] for more info. To add the PPA, run &amp;lt;tt&amp;gt;sudo apt-add-repository ppa:saiarcot895/flightgear-edge&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Or if you develop on Ubuntu or Debian, consider trying the script described in [[Scripted Compilation on Linux Debian/Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
= Distro-specific instructions =&lt;br /&gt;
== Debian/Ubuntu ==&lt;br /&gt;
* You can use the [[Scripted Compilation on Linux Debian/Ubuntu]] script to have Flightgear compiled in one shot under both Ubuntu and Debian systems.&lt;br /&gt;
* Debian users who prefer to build it without script may look at [[Building Flightgear - Debian]].&lt;br /&gt;
* Ubuntu users can follow these instructions to build FlightGear on [[Building Flightgear - Ubuntu | Ubuntu 20.04]].&lt;br /&gt;
* Raspbian users can follow these instructions to build FlightGear on [[Building Flightgear - Raspbian | Raspbian Buster]].&lt;br /&gt;
* Hints for [[Ubuntu]] users.&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
* Gentoo users can also use overlays to build FlightGear without much hassle: [[Building Flightgear - Gentoo]].&lt;br /&gt;
&lt;br /&gt;
== CentOS ==&lt;br /&gt;
CentOS users can follow these instructions to build FlightGear on [[Building Flightgear - CentOS | CentOS 8]].&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
{{Note|as of 12/2017, people may have to build using at least OSG 3.4 due to some compilation issues -for details, refer to [[Howto:Building FlightGear without HiDPI support]]}}&lt;br /&gt;
&lt;br /&gt;
Before you can compile FlightGear, you need to have the following installed on your computer:&lt;br /&gt;
&lt;br /&gt;
'''C++ compiler'''&lt;br /&gt;
&lt;br /&gt;
These are: c++, g++ found under the &amp;lt;code&amp;gt;/usr/bin&amp;lt;/code&amp;gt; directory.  You will also need to have the tools '''CMake''' installed.&lt;br /&gt;
&lt;br /&gt;
'''GIT'''&lt;br /&gt;
&lt;br /&gt;
See [[FlightGear and Git]].&lt;br /&gt;
&lt;br /&gt;
'''[[OpenGL]] support'''&lt;br /&gt;
&lt;br /&gt;
More specifically, your system needs the support for hardware accelerated graphics.  You can check for this by running the following in a [[command line]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ glxinfo | grep direct&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: To run the above command, you need to have the tool '''mesa-utils''' installed.&lt;br /&gt;
&lt;br /&gt;
You should then see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: Yes&lt;br /&gt;
&lt;br /&gt;
This means you are good to go as far as OpenGL support is concerned.&lt;br /&gt;
&lt;br /&gt;
If you see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: No&lt;br /&gt;
&lt;br /&gt;
Don't panic yet.  This may just mean some required libraries for hardware accelerated graphic are missing.  Go ahead and try installing '''plib 1.8.5''' and its dependencies first.  If you still get the above message, then you will need to do some googling and troubleshoot yourself.&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
FlightGear is dependent on quite a few number of libraries.  You do not need to compile all of them yourself, but you will at least need to have their development version installed.  For example, the development version for package &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt;'''-dev'''.&lt;br /&gt;
&lt;br /&gt;
The dependency is summarized in the following tree.  Please note that each library has its own dependencies, and most of these are not shown here.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;FlightGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
** [http://kcat.strangesoft.net/openal.html &amp;lt;tt&amp;gt;OpenAL&amp;lt;/tt&amp;gt;]&lt;br /&gt;
** &amp;lt;tt&amp;gt;SimGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
*** [http://plib.sourceforge.net/ &amp;lt;tt&amp;gt;PLIB&amp;lt;/tt&amp;gt;]. Since March 2008, you will need version 1.8.5 - your distro probably supplies 1.8.4 still.&lt;br /&gt;
**** For versions pre March 2008: (Free)&amp;lt;tt&amp;gt;GLUT&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; (We recommend the use of &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; over &amp;lt;tt&amp;gt;Free/GLUT&amp;lt;/tt&amp;gt;, [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg16153.html however since March 2008, &amp;lt;tt&amp;gt;FreeGLUT&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; are both considered deprecated], please only use &amp;lt;code&amp;gt;--enable-osgviewer&amp;lt;/code&amp;gt; during configuration instead) &lt;br /&gt;
***  &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt;  (check link for compatible versions)&lt;br /&gt;
*** You also need the development files for several basic libraries to build the software, among them the following (the package names are for Debian and derivatives(?)):&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libfreetype6-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libjpeg62-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libungif4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libtiff4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libpng12-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxmu-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxi-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;zlib1g-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libglut3-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you attack the above dependencies in the order listed below, you should be good:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; Most distributions include glut packages, although you may have to hunt for them. Make sure you install both the &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;glut-devel&amp;lt;/tt&amp;gt; packages, otherwise FlightGear may be able to compile but won't run correctly.&lt;br /&gt;
# &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; Most distributions install the basic &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; libraries by default, but not the development portions. If you don't have &amp;lt;tt&amp;gt;zlib.h&amp;lt;/tt&amp;gt;, you probably need to install the &amp;lt;tt&amp;gt;zlib-devel&amp;lt;/tt&amp;gt; package for your distribution. &lt;br /&gt;
# &amp;lt;tt&amp;gt;plib&amp;lt;/tt&amp;gt; Portability libraries and scene graph. &lt;br /&gt;
# &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt; &lt;br /&gt;
# &amp;lt;tt&amp;gt;simgear&amp;lt;/tt&amp;gt; Simulation support libraries. If you are building FlightGear from Git, you need the Git version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.&lt;br /&gt;
&lt;br /&gt;
= Compiling =&lt;br /&gt;
&lt;br /&gt;
== Definitions ==&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo&amp;lt;/code&amp;gt; can be replaced by &amp;lt;code&amp;gt;cmake -DCMAKE_BUILD_TYPE=Release&amp;lt;/code&amp;gt; for better performances.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB&amp;lt;/code&amp;gt;: The default &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directory is different between RedHat and Debian based distributions. Usually on Debian based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib&lt;br /&gt;
Usually on RedHat based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib64&lt;br /&gt;
&lt;br /&gt;
== Simgear ==&lt;br /&gt;
The source code of Simgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Simgear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Simgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Simgear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flightgear ==&lt;br /&gt;
The data for Flightgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here].&lt;br /&gt;
 rm -f -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 mkdir --parents -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/FlightGear-${FLIGHTGEAR_VERSION}-data.tar.bz2&amp;quot;&lt;br /&gt;
 popd&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 ln --symbolic -- &amp;quot;FlightGear-${FLIGHTGEAR_VERSION}/fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 git clone --depth 1 https://git.code.sf.net/p/flightgear/fgdata flightgear-fgdata&lt;br /&gt;
 ln --symbolic -- &amp;quot;flightgear-fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/flightgear-fgdata/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
The source code of Flightgear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Flightgear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Flightgear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE \&lt;br /&gt;
       -DENABLE_FGQCANVAS=ON&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX_LIB}/&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/Flightgear make --jobs=${NR_JOBS} -- test_suite&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/Flightgear make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
== Instructions ==&lt;br /&gt;
*  [[MSYS]] &lt;br /&gt;
*  [[MinGW/cross-compiler]] &lt;br /&gt;
*  [[CodeBlocks IDE]] &lt;br /&gt;
*  [[OpenSUSE 10.1 10.2]] &lt;br /&gt;
* [http://www.geoffmclane.com/fg/fgmsvc7.htm MSVC7 *.Net]&lt;br /&gt;
* [http://www.oflebbe.de/oflebbe/FlightGear/index.html MSVC8 aka Visual 2005]&lt;br /&gt;
* [http://macflightgear.sourceforge.net/home/documents/ Mac OS X]&lt;br /&gt;
= Important note for GIT users =&lt;br /&gt;
As of latest development in GIT, only cmake is now required for building both SimGear and FlightGear. So if you build GIT (for what any reason) please don't try to use autogen.sh as it is removed from repository.&lt;br /&gt;
&lt;br /&gt;
For detailed instructions, see page [[Building_using_CMake|Building using cmake]].&lt;br /&gt;
&lt;br /&gt;
{{Building}}&lt;br /&gt;
&lt;br /&gt;
[[fr:Compiler FlightGear sous GNU/Linux]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=126106</id>
		<title>Building Flightgear - CentOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=126106"/>
		<updated>2020-07-07T16:24:07Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Preparation =&lt;br /&gt;
A &amp;quot;Minimal Install&amp;quot; of CentOS 8 (64 bits) is needed.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The user need  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages and add some repos.&lt;br /&gt;
&lt;br /&gt;
The following repos need to be added and enabled:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf config-manager --set-enabled PowerTools&lt;br /&gt;
 sudo dnf install epel-release&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;dnf&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install freeglut-devel.x86_64 openal-soft.x86_64 freetype-devel.x86_64 libjpeg-turbo-devel.x86_64 jasper-libs.x86_64 libxml2-devel.x86_64 libcurl-devel.x86_64 \&lt;br /&gt;
    cairo-devel.x86_64 poppler-glib.x86_64 librsvg2-devel.x86_64 gtk2-devel.x86_64 lua-libs.x86_64 lua.x86_64 fltk.x86_64 libpng-devel.x86_64 libtiff-devel.x86_64 \&lt;br /&gt;
    libXrandr-devel.x86_64 libXinerama-devel.x86_64 zlib-devel.x86_64 expat-devel.x86_64 boost.x86_64 openal-soft-devel.x86_64 cmake.x86_64 \&lt;br /&gt;
    mesa-libEGL-devel.x86_64 jasper-devel.x86_64 gstreamer1-devel.x86_64 SDL2-devel.x86_64 poppler-glib-devel.x86_64 lua-devel.x86_64 fltk-devel.x86_64 boost-devel.x86_64 \&lt;br /&gt;
    dbus-devel.x86_64 libevent-devel.x86_64 glew-devel.x86_64 qt5-qtdeclarative-devel.x86_64 qt5-qtsvg-devel.x86_64 qt5-linguist.x86_64 qt5-qttools-devel.x86_64 qt5-qtwebsockets-devel.x86_64 \&lt;br /&gt;
    qt5-qtbase-private-devel.x86_64&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;plib&amp;lt;/code&amp;gt; package is not available for CentOS 8. The package from CentOS 7 can be used instead. After downloading the following packages:&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-1.8.5-15.el7.x86_64.rpm.html plib-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-devel-1.8.5-15.el7.x86_64.rpm.html plib-devel-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
&lt;br /&gt;
The 2 packages can be installed manually using the following command:&lt;br /&gt;
&lt;br /&gt;
 sudo rpm --install plib-1.8.5-15.el7.x86_64.rpm &lt;br /&gt;
 sudo rpm --install plib-devel-1.8.5-15.el7.x86_64.rpm&lt;br /&gt;
&lt;br /&gt;
= Definitions =&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib64&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib64&amp;lt;/code&amp;gt; in the specific case of CentOS.&lt;br /&gt;
* &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION&amp;lt;/code&amp;gt;: Version of OpenSceneGraph. For example: &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION=3.6.5&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
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 &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; such that the full path of the file will be &amp;lt;code&amp;gt;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following commands can be used to build OpenSceneGraph:&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 OPENSCENEGRAPH_SRC=${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}.tar.gz&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${OPENSCENEGRAPH_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=Release \&lt;br /&gt;
       -DBUILD_OSG_EXAMPLES:BOOL=ON \&lt;br /&gt;
       -DOSG_USE_LOCAL_LUA_SOURCE:BOOL=OFF \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DLIB_POSTFIX=64 \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= [[Building FlightGear - Linux#Compiling | Compiling]] =&lt;br /&gt;
&lt;br /&gt;
= Start Flightgear =&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}&amp;quot;&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX}/lib64/&lt;br /&gt;
 ./bin/fgfs&lt;br /&gt;
&lt;br /&gt;
[[Category:Building from source]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Raspbian&amp;diff=124419</id>
		<title>Building Flightgear - Raspbian</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Raspbian&amp;diff=124419"/>
		<updated>2020-04-30T18:22:05Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Preparation =&lt;br /&gt;
An installation of '''Raspbian Buster Lite''' is needed&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt; user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt; user needs  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages.&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo apt install libplib-dev cmake g++ libboost-all-dev libopenal-dev libglew-dev \&lt;br /&gt;
     libcurl4-openssl-dev libfreetype6-dev \&lt;br /&gt;
     libqt5svg5-dev qttools5-dev qtdeclarative5-private-dev qtbase5-private-dev libqt5websockets5-dev qml-module-qtquick2&lt;br /&gt;
&lt;br /&gt;
= Setup &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt; =&lt;br /&gt;
First, &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt; has to be installed:&lt;br /&gt;
 sudo apt install pbuilder quilt&lt;br /&gt;
&lt;br /&gt;
Create a base chroot image tar-ball if it has not been created before:&lt;br /&gt;
 sudo pbuilder create \&lt;br /&gt;
     --distribution &amp;quot;buster&amp;quot; \&lt;br /&gt;
     --basetgz &amp;quot;/var/cache/pbuilder/base-buster-armhf.tgz&amp;quot; \&lt;br /&gt;
     --debootstrapopts --keyring=/usr/share/keyrings/raspbian-archive-keyring.gpg&lt;br /&gt;
&lt;br /&gt;
If the base chroot image tar-ball has been created before, update it:&lt;br /&gt;
 sudo pbuilder \&lt;br /&gt;
     --update \&lt;br /&gt;
     --basetgz &amp;quot;/var/cache/pbuilder/base-buster-armhf.tgz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= libcollada-dom2.4 =&lt;br /&gt;
libcollada-dom2.4-dp0 has been build for Raspbian 9 not 10. The package has still dependencies to libboost-filesystem1.58.0 and libboost-system1.58.0 [https://github.com/RPi-Distro/repo/issues/162].&lt;br /&gt;
&lt;br /&gt;
The package needs to be rebuild using for example &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 apt source libcollada-dom2.4-dp0&lt;br /&gt;
 pushd -- collada-dom-2.4.4+ds1&lt;br /&gt;
 dpkg-buildpackage -S -d -us -uc&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- collada-dom-2.4.4+ds1&lt;br /&gt;
 sudo pbuilder --build --basetgz /var/cache/pbuilder/base-buster-armhf.tgz collada-dom_2.4.4+ds1-2.dsc&lt;br /&gt;
&lt;br /&gt;
and then installed:&lt;br /&gt;
 sudo dpkg --install /var/cache/pbuilder/result/libcollada-dom2.4-dp0_2.4.4+ds1-2_armhf.deb \&lt;br /&gt;
     /var/cache/pbuilder/result/libcollada-dom2.4-dp-dev_2.4.4+ds1-2_armhf.deb&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
The osgPlugins-3.4.1/osgdb_png.so is not compiled on ARM due to the flag OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=OFF. The package needs to be rebuild using for example &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt; after changing OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=ON [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=947790]:&lt;br /&gt;
 apt source openscenegraph-3.4&lt;br /&gt;
 pushd -- openscenegraph-3.4-3.4.1+dfsg1&lt;br /&gt;
&lt;br /&gt;
Now modify the &amp;lt;code&amp;gt;debian/rules&amp;lt;/code&amp;gt; file:&lt;br /&gt;
 nano debian/rules&lt;br /&gt;
&lt;br /&gt;
and change &amp;lt;code&amp;gt;OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=OFF&amp;lt;/code&amp;gt; by &amp;lt;code&amp;gt;OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=ON&amp;lt;/code&amp;gt;. To prevent to run out of memory during the build (4 cores for only 1 Gb of memory in the case of the Raspberry Pi 2/3/3+), &amp;lt;code&amp;gt;--parallel&amp;lt;/code&amp;gt; can be replaced by &amp;lt;code&amp;gt;--parallel 1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--parallel 2&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -S -d -us -uc&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- openscenegraph-3.4-3.4.1+dfsg1&lt;br /&gt;
 sudo pbuilder --build --basetgz /var/cache/pbuilder/base-buster-armhf.tgz openscenegraph-3.4_3.4.1+dfsg1-5.dsc&lt;br /&gt;
&lt;br /&gt;
and then installed:&lt;br /&gt;
 sudo dpkg --install /var/cache/pbuilder/result/libopenscenegraph-3.4-131_3.4.1+dfsg1-5_armhf.deb \&lt;br /&gt;
     /var/cache/pbuilder/result/openscenegraph-3.4_3.4.1+dfsg1-5_armhf.deb \&lt;br /&gt;
     /var/cache/pbuilder/result/openscenegraph-3.4-examples_3.4.1+dfsg1-5_all.deb  \&lt;br /&gt;
     /var/cache/pbuilder/result/libopenscenegraph-3.4-dev_3.4.1+dfsg1-5_armhf.deb&lt;br /&gt;
&lt;br /&gt;
= [[Building FlightGear - Linux#Compiling | Compiling]] =&lt;br /&gt;
The Raspberry Pi 1/2/3/3+ only supports OpenGL ES 2.0. Simgear still contains some OpenGL 1 instructions (fixed pipeline, not shaders). On Raspbian, the Mesa package uses the accelerated KMS back-end that only supports, as expected, OpenGL ES 2.0. The graphical part of Simgear fails to compile on Raspbian when an OpenGL 1 instruction is used. For this reason, the following flag has to be added to &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; when compiling Simgear:&lt;br /&gt;
 -DSIMGEAR_HEADLESS=ON&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Raspbian&amp;diff=124391</id>
		<title>Building Flightgear - Raspbian</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Raspbian&amp;diff=124391"/>
		<updated>2020-04-29T08:50:16Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* OpenSceneGraph */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Preparation =&lt;br /&gt;
An installation of '''Raspbian Buster Lite''' is needed&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt; user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt; user needs  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages.&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo apt install libplib-dev cmake g++ libboost-all-dev libopenal-dev libglew-dev \&lt;br /&gt;
     libcurl4-openssl-dev libfreetype6-dev \&lt;br /&gt;
     libqt5svg5-dev qttools5-dev qtdeclarative5-private-dev qtbase5-private-dev libqt5websockets5-dev qml-module-qtquick2&lt;br /&gt;
&lt;br /&gt;
= Setup &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt; =&lt;br /&gt;
First, &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt; has to be installed:&lt;br /&gt;
 sudo apt install pbuilder quilt&lt;br /&gt;
&lt;br /&gt;
Create a base chroot image tar-ball if it has not been created before:&lt;br /&gt;
 sudo pbuilder create \&lt;br /&gt;
     --distribution &amp;quot;buster&amp;quot; \&lt;br /&gt;
     --basetgz &amp;quot;/var/cache/pbuilder/base-buster-armhf.tgz&amp;quot; \&lt;br /&gt;
     --debootstrapopts --keyring=/usr/share/keyrings/raspbian-archive-keyring.gpg&lt;br /&gt;
&lt;br /&gt;
If the base chroot image tar-ball has been created before, update it:&lt;br /&gt;
 sudo pbuilder \&lt;br /&gt;
     --update \&lt;br /&gt;
     --basetgz &amp;quot;/var/cache/pbuilder/base-buster-armhf.tgz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= libcollada-dom2.4 =&lt;br /&gt;
libcollada-dom2.4-dp0 has been build for Raspbian 9 not 10. The package has still dependencies to libboost-filesystem1.58.0 and libboost-system1.58.0 [https://github.com/RPi-Distro/repo/issues/162].&lt;br /&gt;
&lt;br /&gt;
The package needs to be rebuild using for example &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 apt source libcollada-dom2.4-dp0&lt;br /&gt;
 pushd -- collada-dom-2.4.4+ds1&lt;br /&gt;
 dpkg-buildpackage -S -d -us -uc&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- collada-dom-2.4.4+ds1&lt;br /&gt;
 sudo pbuilder --build --basetgz /var/cache/pbuilder/base-buster-armhf.tgz collada-dom_2.4.4+ds1-2.dsc&lt;br /&gt;
&lt;br /&gt;
and then installed:&lt;br /&gt;
 sudo dpkg --install /var/cache/pbuilder/result/libcollada-dom2.4-dp0_2.4.4+ds1-2_armhf.deb \&lt;br /&gt;
     /var/cache/pbuilder/result/libcollada-dom2.4-dp-dev_2.4.4+ds1-2_armhf.deb&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
The osgPlugins-3.4.1/osgdb_png.so is not compiled on ARM due to the flag OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=OFF. The package needs to be rebuild using for example &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt; after changing OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=ON [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=947790]:&lt;br /&gt;
 apt source openscenegraph-3.4&lt;br /&gt;
 pushd -- openscenegraph-3.4-3.4.1+dfsg1&lt;br /&gt;
&lt;br /&gt;
Now modify the &amp;lt;code&amp;gt;debian/rules&amp;lt;/code&amp;gt; file:&lt;br /&gt;
 nano debian/rules&lt;br /&gt;
&lt;br /&gt;
and change &amp;lt;code&amp;gt;OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=OFF&amp;lt;/code&amp;gt; by &amp;lt;code&amp;gt;OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=ON&amp;lt;/code&amp;gt;. To prevent to run out of memory during the build (4 cores for only 1 Gb of memory in the case of the Raspberry Pi 2/3/3+), &amp;lt;code&amp;gt;--parallel&amp;lt;/code&amp;gt; can be replaced by &amp;lt;code&amp;gt;--parallel 1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--parallel 2&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -S -d -us -uc&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- openscenegraph-3.4-3.4.1+dfsg1&lt;br /&gt;
 sudo pbuilder --build --basetgz /var/cache/pbuilder/base-buster-armhf.tgz openscenegraph-3.4_3.4.1+dfsg1-5.dsc&lt;br /&gt;
&lt;br /&gt;
and then installed:&lt;br /&gt;
 sudo dpkg --install libopenscenegraph-3.4-131_3.4.1+dfsg1-5_armhf.deb \&lt;br /&gt;
     openscenegraph-3.4_3.4.1+dfsg1-5_armhf.deb \&lt;br /&gt;
     openscenegraph-3.4-examples_3.4.1+dfsg1-5_all.deb  \&lt;br /&gt;
     libopenscenegraph-3.4-dev_3.4.1+dfsg1-5_armhf.deb&lt;br /&gt;
&lt;br /&gt;
= [[Building FlightGear - Linux#Compiling | Compiling]] =&lt;br /&gt;
The Raspberry Pi 1/2/3/3+ only supports OpenGL ES 2.0. Simgear still contains some OpenGL 1 instructions (fixed pipeline, not shaders). On Raspbian, the Mesa package uses the accelerated KMS back-end that only supports, as expected, OpenGL ES 2.0. The graphical part of Simgear fails to compile on Raspbian when an OpenGL 1 instruction is used. For this reason, the following flag has to be added to &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; when compiling Simgear:&lt;br /&gt;
 -DSIMGEAR_HEADLESS=ON&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Raspbian&amp;diff=124377</id>
		<title>Building Flightgear - Raspbian</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Raspbian&amp;diff=124377"/>
		<updated>2020-04-28T09:08:19Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Preparation =&lt;br /&gt;
An installation of '''Raspbian Buster Lite''' is needed&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt; user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt; user needs  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages.&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo apt install libplib-dev cmake g++ libboost-all-dev libopenal-dev libglew-dev \&lt;br /&gt;
     libcurl4-openssl-dev libfreetype6-dev \&lt;br /&gt;
     libqt5svg5-dev qttools5-dev qtdeclarative5-private-dev qtbase5-private-dev libqt5websockets5-dev qml-module-qtquick2&lt;br /&gt;
&lt;br /&gt;
= Setup &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt; =&lt;br /&gt;
First, &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt; has to be installed:&lt;br /&gt;
 sudo apt install pbuilder quilt&lt;br /&gt;
&lt;br /&gt;
Create a base chroot image tar-ball if it has not been created before:&lt;br /&gt;
 sudo pbuilder create \&lt;br /&gt;
     --distribution &amp;quot;buster&amp;quot; \&lt;br /&gt;
     --basetgz &amp;quot;/var/cache/pbuilder/base-buster-armhf.tgz&amp;quot; \&lt;br /&gt;
     --debootstrapopts --keyring=/usr/share/keyrings/raspbian-archive-keyring.gpg&lt;br /&gt;
&lt;br /&gt;
If the base chroot image tar-ball has been created before, update it:&lt;br /&gt;
 sudo pbuilder \&lt;br /&gt;
     --update \&lt;br /&gt;
     --basetgz &amp;quot;/var/cache/pbuilder/base-buster-armhf.tgz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= libcollada-dom2.4 =&lt;br /&gt;
libcollada-dom2.4-dp0 has been build for Raspbian 9 not 10. The package has still dependencies to libboost-filesystem1.58.0 and libboost-system1.58.0 [https://github.com/RPi-Distro/repo/issues/162].&lt;br /&gt;
&lt;br /&gt;
The package needs to be rebuild using for example &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 apt source libcollada-dom2.4-dp0&lt;br /&gt;
 pushd -- collada-dom-2.4.4+ds1&lt;br /&gt;
 dpkg-buildpackage -S -d -us -uc&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- collada-dom-2.4.4+ds1&lt;br /&gt;
 sudo pbuilder --build --basetgz /var/cache/pbuilder/base-buster-armhf.tgz collada-dom_2.4.4+ds1-2.dsc&lt;br /&gt;
&lt;br /&gt;
and then installed:&lt;br /&gt;
 sudo dpkg --install /var/cache/pbuilder/result/libcollada-dom2.4-dp0_2.4.4+ds1-2_armhf.deb \&lt;br /&gt;
     /var/cache/pbuilder/result/libcollada-dom2.4-dp-dev_2.4.4+ds1-2_armhf.deb&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
The osgPlugins-3.4.1/osgdb_png.so is not compiled on ARM due to the flag OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=OFF. The package needs to be rebuild using for example &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt; after changing OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=ON [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=947790]:&lt;br /&gt;
 apt-get source openscenegraph-3.4&lt;br /&gt;
 pushd -- openscenegraph-3.4-3.4.1+dfsg1&lt;br /&gt;
&lt;br /&gt;
Now modify the &amp;lt;code&amp;gt;debian/rules&amp;lt;/code&amp;gt; file:&lt;br /&gt;
 nano debian/rules&lt;br /&gt;
&lt;br /&gt;
and change &amp;lt;code&amp;gt;OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=OFF&amp;lt;/code&amp;gt; by &amp;lt;code&amp;gt;OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -S -d -us -uc&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- openscenegraph-3.4-3.4.1+dfsg1&lt;br /&gt;
 sudo pbuilder --build --basetgz /var/cache/pbuilder/base-buster-armhf.tgz openscenegraph-3.4_3.4.1+dfsg1-5.dsc&lt;br /&gt;
&lt;br /&gt;
and then installed:&lt;br /&gt;
 sudo dpkg --install libopenscenegraph-3.4-131_3.4.1+dfsg1-5_armhf.deb \&lt;br /&gt;
     openscenegraph-3.4_3.4.1+dfsg1-5_armhf.deb \&lt;br /&gt;
     openscenegraph-3.4-examples_3.4.1+dfsg1-5_all.deb  \&lt;br /&gt;
     libopenscenegraph-3.4-dev_3.4.1+dfsg1-5_armhf.deb&lt;br /&gt;
&lt;br /&gt;
= [[Building FlightGear - Linux#Compiling | Compiling]] =&lt;br /&gt;
The Raspberry Pi 1/2/3/3+ only supports OpenGL ES 2.0. Simgear still contains some OpenGL 1 instructions (fixed pipeline, not shaders). On Raspbian, the Mesa package uses the accelerated KMS back-end that only supports, as expected, OpenGL ES 2.0. The graphical part of Simgear fails to compile on Raspbian when an OpenGL 1 instruction is used. For this reason, the following flag has to be added to &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; when compiling Simgear:&lt;br /&gt;
 -DSIMGEAR_HEADLESS=ON&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Raspbian&amp;diff=124376</id>
		<title>Building Flightgear - Raspbian</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Raspbian&amp;diff=124376"/>
		<updated>2020-04-28T08:59:34Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /*  Compiling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Preparation =&lt;br /&gt;
An installation of '''Raspbian Buster Lite''' is needed&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt; user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt; user needs  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages.&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo apt install libplib-dev cmake g++ libboost-all-dev libopenal-dev libglew-dev \&lt;br /&gt;
    libcurl4-openssl-dev libfreetype6-dev&lt;br /&gt;
&lt;br /&gt;
= Setup &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt; =&lt;br /&gt;
First, &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt; has to be installed:&lt;br /&gt;
 sudo apt install pbuilder quilt&lt;br /&gt;
&lt;br /&gt;
Create a base chroot image tar-ball if it has not been created before:&lt;br /&gt;
 sudo pbuilder create \&lt;br /&gt;
     --distribution &amp;quot;buster&amp;quot; \&lt;br /&gt;
     --basetgz &amp;quot;/var/cache/pbuilder/base-buster-armhf.tgz&amp;quot; \&lt;br /&gt;
     --debootstrapopts --keyring=/usr/share/keyrings/raspbian-archive-keyring.gpg&lt;br /&gt;
&lt;br /&gt;
If the base chroot image tar-ball has been created before, update it:&lt;br /&gt;
 sudo pbuilder \&lt;br /&gt;
     --update \&lt;br /&gt;
     --basetgz &amp;quot;/var/cache/pbuilder/base-buster-armhf.tgz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= libcollada-dom2.4 =&lt;br /&gt;
libcollada-dom2.4-dp0 has been build for Raspbian 9 not 10. The package has still dependencies to libboost-filesystem1.58.0 and libboost-system1.58.0 [https://github.com/RPi-Distro/repo/issues/162].&lt;br /&gt;
&lt;br /&gt;
The package needs to be rebuild using for example &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 apt source libcollada-dom2.4-dp0&lt;br /&gt;
 pushd -- collada-dom-2.4.4+ds1&lt;br /&gt;
 dpkg-buildpackage -S -d -us -uc&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- collada-dom-2.4.4+ds1&lt;br /&gt;
 sudo pbuilder --build --basetgz /var/cache/pbuilder/base-buster-armhf.tgz collada-dom_2.4.4+ds1-2.dsc&lt;br /&gt;
&lt;br /&gt;
and then installed:&lt;br /&gt;
 sudo dpkg --install /var/cache/pbuilder/result/libcollada-dom2.4-dp0_2.4.4+ds1-2_armhf.deb \&lt;br /&gt;
     /var/cache/pbuilder/result/libcollada-dom2.4-dp-dev_2.4.4+ds1-2_armhf.deb&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
The osgPlugins-3.4.1/osgdb_png.so is not compiled on ARM due to the flag OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=OFF. The package needs to be rebuild using for example &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt; after changing OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=ON [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=947790]:&lt;br /&gt;
 apt-get source openscenegraph-3.4&lt;br /&gt;
 pushd -- openscenegraph-3.4-3.4.1+dfsg1&lt;br /&gt;
&lt;br /&gt;
Now modify the &amp;lt;code&amp;gt;debian/rules&amp;lt;/code&amp;gt; file:&lt;br /&gt;
 nano debian/rules&lt;br /&gt;
&lt;br /&gt;
and change &amp;lt;code&amp;gt;OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=OFF&amp;lt;/code&amp;gt; by &amp;lt;code&amp;gt;OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -S -d -us -uc&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- openscenegraph-3.4-3.4.1+dfsg1&lt;br /&gt;
 sudo pbuilder --build --basetgz /var/cache/pbuilder/base-buster-armhf.tgz openscenegraph-3.4_3.4.1+dfsg1-5.dsc&lt;br /&gt;
&lt;br /&gt;
and then installed:&lt;br /&gt;
 sudo dpkg --install libopenscenegraph-3.4-131_3.4.1+dfsg1-5_armhf.deb \&lt;br /&gt;
     openscenegraph-3.4_3.4.1+dfsg1-5_armhf.deb \&lt;br /&gt;
     openscenegraph-3.4-examples_3.4.1+dfsg1-5_all.deb  \&lt;br /&gt;
     libopenscenegraph-3.4-dev_3.4.1+dfsg1-5_armhf.deb&lt;br /&gt;
&lt;br /&gt;
= [[Building FlightGear - Linux#Compiling | Compiling]] =&lt;br /&gt;
The Raspberry Pi 1/2/3/3+ only supports OpenGL ES 2.0. Simgear still contains some OpenGL 1 instructions (fixed pipeline, not the shaders). On Raspbian, the Mesa package uses the accelerated KMS back-end that only supports, as expected, OpenGL ES 2.0. The graphical part of Simgear fails to compile on Raspbian when a OpenGL 1 instruction is used. For this reason, the following flag has to be added to &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; when compiling Simgear:&lt;br /&gt;
 -DSIMGEAR_HEADLESS=ON&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Raspbian&amp;diff=124367</id>
		<title>Building Flightgear - Raspbian</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Raspbian&amp;diff=124367"/>
		<updated>2020-04-27T21:48:42Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: Created page with &amp;quot;= Preparation = An installation of '''Raspbian Buster Lite''' is needed  = Requirements = All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt; user (not &amp;lt;co...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Preparation =&lt;br /&gt;
An installation of '''Raspbian Buster Lite''' is needed&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt; user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt; user needs  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages.&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo apt install libplib-dev cmake g++ libboost-all-dev libopenal-dev libglew-dev \&lt;br /&gt;
    libcurl4-openssl-dev libfreetype6-dev&lt;br /&gt;
&lt;br /&gt;
= Setup &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt; =&lt;br /&gt;
First, &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt; has to be installed:&lt;br /&gt;
 sudo apt install pbuilder quilt&lt;br /&gt;
&lt;br /&gt;
Create a base chroot image tar-ball if it has not been created before:&lt;br /&gt;
 sudo pbuilder create \&lt;br /&gt;
     --distribution &amp;quot;buster&amp;quot; \&lt;br /&gt;
     --basetgz &amp;quot;/var/cache/pbuilder/base-buster-armhf.tgz&amp;quot; \&lt;br /&gt;
     --debootstrapopts --keyring=/usr/share/keyrings/raspbian-archive-keyring.gpg&lt;br /&gt;
&lt;br /&gt;
If the base chroot image tar-ball has been created before, update it:&lt;br /&gt;
 sudo pbuilder \&lt;br /&gt;
     --update \&lt;br /&gt;
     --basetgz &amp;quot;/var/cache/pbuilder/base-buster-armhf.tgz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= libcollada-dom2.4 =&lt;br /&gt;
libcollada-dom2.4-dp0 has been build for Raspbian 9 not 10. The package has still dependencies to libboost-filesystem1.58.0 and libboost-system1.58.0 [https://github.com/RPi-Distro/repo/issues/162].&lt;br /&gt;
&lt;br /&gt;
The package needs to be rebuild using for example &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 apt source libcollada-dom2.4-dp0&lt;br /&gt;
 pushd -- collada-dom-2.4.4+ds1&lt;br /&gt;
 dpkg-buildpackage -S -d -us -uc&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- collada-dom-2.4.4+ds1&lt;br /&gt;
 sudo pbuilder --build --basetgz /var/cache/pbuilder/base-buster-armhf.tgz collada-dom_2.4.4+ds1-2.dsc&lt;br /&gt;
&lt;br /&gt;
and then installed:&lt;br /&gt;
 sudo dpkg --install /var/cache/pbuilder/result/libcollada-dom2.4-dp0_2.4.4+ds1-2_armhf.deb \&lt;br /&gt;
     /var/cache/pbuilder/result/libcollada-dom2.4-dp-dev_2.4.4+ds1-2_armhf.deb&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
The osgPlugins-3.4.1/osgdb_png.so is not compiled on ARM due to the flag OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=OFF. The package needs to be rebuild using for example &amp;lt;code&amp;gt;pbuilder&amp;lt;/code&amp;gt; after changing OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=ON [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=947790]:&lt;br /&gt;
 apt-get source openscenegraph-3.4&lt;br /&gt;
 pushd -- openscenegraph-3.4-3.4.1+dfsg1&lt;br /&gt;
&lt;br /&gt;
Now modify the &amp;lt;code&amp;gt;debian/rules&amp;lt;/code&amp;gt; file:&lt;br /&gt;
 nano debian/rules&lt;br /&gt;
&lt;br /&gt;
and change &amp;lt;code&amp;gt;OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=OFF&amp;lt;/code&amp;gt; by &amp;lt;code&amp;gt;OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -S -d -us -uc&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- openscenegraph-3.4-3.4.1+dfsg1&lt;br /&gt;
 sudo pbuilder --build --basetgz /var/cache/pbuilder/base-buster-armhf.tgz openscenegraph-3.4_3.4.1+dfsg1-5.dsc&lt;br /&gt;
&lt;br /&gt;
and then installed:&lt;br /&gt;
 sudo dpkg --install libopenscenegraph-3.4-131_3.4.1+dfsg1-5_armhf.deb \&lt;br /&gt;
     openscenegraph-3.4_3.4.1+dfsg1-5_armhf.deb \&lt;br /&gt;
     openscenegraph-3.4-examples_3.4.1+dfsg1-5_all.deb  \&lt;br /&gt;
     libopenscenegraph-3.4-dev_3.4.1+dfsg1-5_armhf.deb&lt;br /&gt;
&lt;br /&gt;
= [[Building FlightGear - Linux#Compiling | Compiling]] =&lt;br /&gt;
When compiling Simgear, the following flag has to be added to &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt;:&lt;br /&gt;
 -DSIMGEAR_HEADLESS=ON&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Ubuntu&amp;diff=124366</id>
		<title>Building Flightgear - Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Ubuntu&amp;diff=124366"/>
		<updated>2020-04-27T20:44:35Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Preparation =&lt;br /&gt;
A &amp;quot;Minimal Install&amp;quot; of Ubuntu 20.04 (64 bits) is needed.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The user needs  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages.&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libplib-dev libopenscenegraph-dev cmake g++ libboost-all-dev libopenal-dev libglew-dev \&lt;br /&gt;
    libcurl4-openssl-dev libfreetype-dev \&lt;br /&gt;
    libqt5svg5-dev qttools5-dev libqt5websockets5-dev qtbase5-private-dev qtdeclarative5-private-dev qml-module-qtquick2&lt;br /&gt;
&lt;br /&gt;
= Definitions =&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt; in the specific case of Ubuntu.&lt;br /&gt;
&lt;br /&gt;
= [[Building FlightGear - Linux#Compiling | Compiling]] =&lt;br /&gt;
&lt;br /&gt;
[[Category:Building from source]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=124363</id>
		<title>Building FlightGear - Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=124363"/>
		<updated>2020-04-27T17:57:31Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Debian/Ubuntu */ Add Raspbian&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Main article|Building Flightgear}} &lt;br /&gt;
&lt;br /&gt;
This section describes how to build [[FlightGear]] on Linux system.&lt;br /&gt;
&lt;br /&gt;
Compiling FlightGear is not a task for novice users. Thus, if you're a beginner (we all were once) on a platform which binaries are available for, we recommend postponing this task and just starting with the binary distribution to get you flying.&lt;br /&gt;
&lt;br /&gt;
openSUSE also provides binary packages of the latest development version, which are continuously updated.&lt;br /&gt;
Follow [http://software.opensuse.org/download.html?lang=en&amp;amp;project=games:FlightGear:Unstable&amp;amp;package=fgrun this link] to select your openSUSE version and install, or manually add ''games:FlightGear:Unstable'' to your ''YaST Software Repositories''.&lt;br /&gt;
&lt;br /&gt;
For Ubuntu, there is a PPA that provides the latest development version of FlightGear and SimGear and a recent version of FlightGear data. See [https://launchpad.net/~saiarcot895/+archive/flightgear-edge this page] for more info. To add the PPA, run &amp;lt;tt&amp;gt;sudo apt-add-repository ppa:saiarcot895/flightgear-edge&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Or if you develop on Ubuntu or Debian, consider trying the script described in [[Scripted Compilation on Linux Debian/Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
= Distro-specific instructions =&lt;br /&gt;
== Debian/Ubuntu ==&lt;br /&gt;
* You can use the [[Scripted Compilation on Linux Debian/Ubuntu]] script to have Flightgear compiled in one shot under both Ubuntu and Debian systems.&lt;br /&gt;
* Debian users who prefer to build it without script may look at [[Building Flightgear - Debian]].&lt;br /&gt;
* Ubuntu users can follow these instructions to build FlightGear on [[Building Flightgear - Ubuntu | Ubuntu 20.04]].&lt;br /&gt;
* Raspbian users can follow these instructions to build FlightGear on [[Building Flightgear - Raspbian | Raspbian Buster]].&lt;br /&gt;
* Hints for [[Ubuntu]] users.&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
* Gentoo users can also use overlays to build FlightGear without much hassle: [[Building Flightgear - Gentoo]].&lt;br /&gt;
&lt;br /&gt;
== CentOS ==&lt;br /&gt;
CentOS users can follow these instructions to build FlightGear on [[Building Flightgear - CentOS | CentOS 8]].&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
{{Note|as of 12/2017, people may have to build using at least OSG 3.4 due to some compilation issues -for details, refer to [[Howto:Building FlightGear without HiDPI support]]}}&lt;br /&gt;
&lt;br /&gt;
Before you can compile FlightGear, you need to have the following installed on your computer:&lt;br /&gt;
&lt;br /&gt;
'''C++ compiler'''&lt;br /&gt;
&lt;br /&gt;
These are: c++, g++ found under the &amp;lt;code&amp;gt;/usr/bin&amp;lt;/code&amp;gt; directory.  You will also need to have the tools '''CMake''' installed.&lt;br /&gt;
&lt;br /&gt;
'''GIT'''&lt;br /&gt;
&lt;br /&gt;
See [[FlightGear and Git]].&lt;br /&gt;
&lt;br /&gt;
'''[[OpenGL]] support'''&lt;br /&gt;
&lt;br /&gt;
More specifically, your system needs the support for hardware accelerated graphics.  You can check for this by running the following in a [[command line]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ glxinfo | grep direct&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: To run the above command, you need to have the tool '''mesa-utils''' installed.&lt;br /&gt;
&lt;br /&gt;
You should then see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: Yes&lt;br /&gt;
&lt;br /&gt;
This means you are good to go as far as OpenGL support is concerned.&lt;br /&gt;
&lt;br /&gt;
If you see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: No&lt;br /&gt;
&lt;br /&gt;
Don't panic yet.  This may just mean some required libraries for hardware accelerated graphic are missing.  Go ahead and try installing '''plib 1.8.5''' and its dependencies first.  If you still get the above message, then you will need to do some googling and troubleshoot yourself.&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
FlightGear is dependent on quite a few number of libraries.  You do not need to compile all of them yourself, but you will at least need to have their development version installed.  For example, the development version for package &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt;'''-dev'''.&lt;br /&gt;
&lt;br /&gt;
The dependency is summarized in the following tree.  Please note that each library has its own dependencies, and most of these are not shown here.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;FlightGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
** [http://kcat.strangesoft.net/openal.html &amp;lt;tt&amp;gt;OpenAL&amp;lt;/tt&amp;gt;]&lt;br /&gt;
** &amp;lt;tt&amp;gt;SimGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
*** [http://plib.sourceforge.net/ &amp;lt;tt&amp;gt;PLIB&amp;lt;/tt&amp;gt;]. Since March 2008, you will need version 1.8.5 - your distro probably supplies 1.8.4 still.&lt;br /&gt;
**** For versions pre March 2008: (Free)&amp;lt;tt&amp;gt;GLUT&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; (We recommend the use of &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; over &amp;lt;tt&amp;gt;Free/GLUT&amp;lt;/tt&amp;gt;, [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg16153.html however since March 2008, &amp;lt;tt&amp;gt;FreeGLUT&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; are both considered deprecated], please only use &amp;lt;code&amp;gt;--enable-osgviewer&amp;lt;/code&amp;gt; during configuration instead) &lt;br /&gt;
***  &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt;  (check link for compatible versions)&lt;br /&gt;
*** You also need the development files for several basic libraries to build the software, among them the following (the package names are for Debian and derivatives(?)):&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libfreetype6-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libjpeg62-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libungif4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libtiff4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libpng12-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxmu-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxi-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;zlib1g-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libglut3-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you attack the above dependencies in the order listed below, you should be good:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; Most distributions include glut packages, although you may have to hunt for them. Make sure you install both the &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;glut-devel&amp;lt;/tt&amp;gt; packages, otherwise FlightGear may be able to compile but won't run correctly.&lt;br /&gt;
# &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; Most distributions install the basic &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; libraries by default, but not the development portions. If you don't have &amp;lt;tt&amp;gt;zlib.h&amp;lt;/tt&amp;gt;, you probably need to install the &amp;lt;tt&amp;gt;zlib-devel&amp;lt;/tt&amp;gt; package for your distribution. &lt;br /&gt;
# &amp;lt;tt&amp;gt;plib&amp;lt;/tt&amp;gt; Portability libraries and scene graph. &lt;br /&gt;
# &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt; &lt;br /&gt;
# &amp;lt;tt&amp;gt;simgear&amp;lt;/tt&amp;gt; Simulation support libraries. If you are building FlightGear from Git, you need the Git version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.&lt;br /&gt;
&lt;br /&gt;
= Compiling =&lt;br /&gt;
&lt;br /&gt;
== Definitions ==&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB&amp;lt;/code&amp;gt;: The default &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directory is different between RedHat and Debian based distributions. Usually on Debian based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib&lt;br /&gt;
Usually on RedHat based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib64&lt;br /&gt;
&lt;br /&gt;
== Simgear ==&lt;br /&gt;
The source code of Simgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Simgear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Simgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Simgear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flightgear ==&lt;br /&gt;
The data for Flightgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here].&lt;br /&gt;
 rm -f -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 mkdir --parents -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/FlightGear-${FLIGHTGEAR_VERSION}-data.tar.bz2&amp;quot;&lt;br /&gt;
 popd&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 ln --symbolic -- &amp;quot;FlightGear-${FLIGHTGEAR_VERSION}/fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 git clone --depth 1 https://git.code.sf.net/p/flightgear/fgdata flightgear-fgdata&lt;br /&gt;
 ln --symbolic -- &amp;quot;flightgear-fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/flightgear-fgdata/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
The source code of Flightgear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Flightgear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Flightgear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX_LIB}/&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/Flightgear make --jobs=${NR_JOBS} -- test_suite&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/Flightgear make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
== Instructions ==&lt;br /&gt;
*  [[MSYS]] &lt;br /&gt;
*  [[MinGW/cross-compiler]] &lt;br /&gt;
*  [[CodeBlocks IDE]] &lt;br /&gt;
*  [[OpenSUSE 10.1 10.2]] &lt;br /&gt;
* [http://www.geoffmclane.com/fg/fgmsvc7.htm MSVC7 *.Net]&lt;br /&gt;
* [http://www.oflebbe.de/oflebbe/FlightGear/index.html MSVC8 aka Visual 2005]&lt;br /&gt;
* [http://macflightgear.sourceforge.net/home/documents/ Mac OS X]&lt;br /&gt;
= Important note for GIT users =&lt;br /&gt;
As of latest development in GIT, only cmake is now required for building both SimGear and FlightGear. So if you build GIT (for what any reason) please don't try to use autogen.sh as it is removed from repository.&lt;br /&gt;
&lt;br /&gt;
For detailed instructions, see page [[Building_using_CMake|Building using cmake]].&lt;br /&gt;
&lt;br /&gt;
{{Building}}&lt;br /&gt;
&lt;br /&gt;
[[fr:Compiler FlightGear sous GNU/Linux]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=123994</id>
		<title>Building FlightGear - Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=123994"/>
		<updated>2020-04-21T13:33:01Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Definitions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Main article|Building Flightgear}} &lt;br /&gt;
&lt;br /&gt;
This section describes how to build [[FlightGear]] on Linux system.&lt;br /&gt;
&lt;br /&gt;
Compiling FlightGear is not a task for novice users. Thus, if you're a beginner (we all were once) on a platform which binaries are available for, we recommend postponing this task and just starting with the binary distribution to get you flying.&lt;br /&gt;
&lt;br /&gt;
openSUSE also provides binary packages of the latest development version, which are continuously updated.&lt;br /&gt;
Follow [http://software.opensuse.org/download.html?lang=en&amp;amp;project=games:FlightGear:Unstable&amp;amp;package=fgrun this link] to select your openSUSE version and install, or manually add ''games:FlightGear:Unstable'' to your ''YaST Software Repositories''.&lt;br /&gt;
&lt;br /&gt;
For Ubuntu, there is a PPA that provides the latest development version of FlightGear and SimGear and a recent version of FlightGear data. See [https://launchpad.net/~saiarcot895/+archive/flightgear-edge this page] for more info. To add the PPA, run &amp;lt;tt&amp;gt;sudo apt-add-repository ppa:saiarcot895/flightgear-edge&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Or if you develop on Ubuntu or Debian, consider trying the script described in [[Scripted Compilation on Linux Debian/Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
= Distro-specific instructions =&lt;br /&gt;
== Debian/Ubuntu ==&lt;br /&gt;
* You can use the [[Scripted Compilation on Linux Debian/Ubuntu]] script to have Flightgear compiled in one shot under both Ubuntu and Debian systems.&lt;br /&gt;
* Debian users who prefer to build it without script may look at [[Building Flightgear - Debian]].&lt;br /&gt;
* Ubuntu users can follow these instructions to build FlightGear on [[Building Flightgear - Ubuntu | Ubuntu 20.04]].&lt;br /&gt;
* Hints for [[Ubuntu]] users.&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
* Gentoo users can also use overlays to build FlightGear without much hassle: [[Building Flightgear - Gentoo]].&lt;br /&gt;
&lt;br /&gt;
== CentOS ==&lt;br /&gt;
CentOS users can follow these instructions to build FlightGear on [[Building Flightgear - CentOS | CentOS 8]].&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
{{Note|as of 12/2017, people may have to build using at least OSG 3.4 due to some compilation issues -for details, refer to [[Howto:Building FlightGear without HiDPI support]]}}&lt;br /&gt;
&lt;br /&gt;
Before you can compile FlightGear, you need to have the following installed on your computer:&lt;br /&gt;
&lt;br /&gt;
'''C++ compiler'''&lt;br /&gt;
&lt;br /&gt;
These are: c++, g++ found under the &amp;lt;code&amp;gt;/usr/bin&amp;lt;/code&amp;gt; directory.  You will also need to have the tools '''CMake''' installed.&lt;br /&gt;
&lt;br /&gt;
'''GIT'''&lt;br /&gt;
&lt;br /&gt;
See [[FlightGear and Git]].&lt;br /&gt;
&lt;br /&gt;
'''[[OpenGL]] support'''&lt;br /&gt;
&lt;br /&gt;
More specifically, your system needs the support for hardware accelerated graphics.  You can check for this by running the following in a [[command line]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ glxinfo | grep direct&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: To run the above command, you need to have the tool '''mesa-utils''' installed.&lt;br /&gt;
&lt;br /&gt;
You should then see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: Yes&lt;br /&gt;
&lt;br /&gt;
This means you are good to go as far as OpenGL support is concerned.&lt;br /&gt;
&lt;br /&gt;
If you see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: No&lt;br /&gt;
&lt;br /&gt;
Don't panic yet.  This may just mean some required libraries for hardware accelerated graphic are missing.  Go ahead and try installing '''plib 1.8.5''' and its dependencies first.  If you still get the above message, then you will need to do some googling and troubleshoot yourself.&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
FlightGear is dependent on quite a few number of libraries.  You do not need to compile all of them yourself, but you will at least need to have their development version installed.  For example, the development version for package &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt;'''-dev'''.&lt;br /&gt;
&lt;br /&gt;
The dependency is summarized in the following tree.  Please note that each library has its own dependencies, and most of these are not shown here.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;FlightGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
** [http://kcat.strangesoft.net/openal.html &amp;lt;tt&amp;gt;OpenAL&amp;lt;/tt&amp;gt;]&lt;br /&gt;
** &amp;lt;tt&amp;gt;SimGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
*** [http://plib.sourceforge.net/ &amp;lt;tt&amp;gt;PLIB&amp;lt;/tt&amp;gt;]. Since March 2008, you will need version 1.8.5 - your distro probably supplies 1.8.4 still.&lt;br /&gt;
**** For versions pre March 2008: (Free)&amp;lt;tt&amp;gt;GLUT&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; (We recommend the use of &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; over &amp;lt;tt&amp;gt;Free/GLUT&amp;lt;/tt&amp;gt;, [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg16153.html however since March 2008, &amp;lt;tt&amp;gt;FreeGLUT&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; are both considered deprecated], please only use &amp;lt;code&amp;gt;--enable-osgviewer&amp;lt;/code&amp;gt; during configuration instead) &lt;br /&gt;
***  &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt;  (check link for compatible versions)&lt;br /&gt;
*** You also need the development files for several basic libraries to build the software, among them the following (the package names are for Debian and derivatives(?)):&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libfreetype6-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libjpeg62-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libungif4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libtiff4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libpng12-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxmu-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxi-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;zlib1g-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libglut3-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you attack the above dependencies in the order listed below, you should be good:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; Most distributions include glut packages, although you may have to hunt for them. Make sure you install both the &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;glut-devel&amp;lt;/tt&amp;gt; packages, otherwise FlightGear may be able to compile but won't run correctly.&lt;br /&gt;
# &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; Most distributions install the basic &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; libraries by default, but not the development portions. If you don't have &amp;lt;tt&amp;gt;zlib.h&amp;lt;/tt&amp;gt;, you probably need to install the &amp;lt;tt&amp;gt;zlib-devel&amp;lt;/tt&amp;gt; package for your distribution. &lt;br /&gt;
# &amp;lt;tt&amp;gt;plib&amp;lt;/tt&amp;gt; Portability libraries and scene graph. &lt;br /&gt;
# &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt; &lt;br /&gt;
# &amp;lt;tt&amp;gt;simgear&amp;lt;/tt&amp;gt; Simulation support libraries. If you are building FlightGear from Git, you need the Git version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.&lt;br /&gt;
&lt;br /&gt;
= Compiling =&lt;br /&gt;
&lt;br /&gt;
== Definitions ==&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB&amp;lt;/code&amp;gt;: The default &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directory is different between RedHat and Debian based distributions. Usually on Debian based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib&lt;br /&gt;
Usually on RedHat based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib64&lt;br /&gt;
&lt;br /&gt;
== Simgear ==&lt;br /&gt;
The source code of Simgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Simgear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Simgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Simgear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flightgear ==&lt;br /&gt;
The data for Flightgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here].&lt;br /&gt;
 rm -f -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 mkdir --parents -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/FlightGear-${FLIGHTGEAR_VERSION}-data.tar.bz2&amp;quot;&lt;br /&gt;
 popd&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 ln --symbolic -- &amp;quot;FlightGear-${FLIGHTGEAR_VERSION}/fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 git clone --depth 1 https://git.code.sf.net/p/flightgear/fgdata flightgear-fgdata&lt;br /&gt;
 ln --symbolic -- &amp;quot;flightgear-fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/flightgear-fgdata/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
The source code of Flightgear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Flightgear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Flightgear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX_LIB}/&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/Flightgear make --jobs=${NR_JOBS} -- test_suite&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/Flightgear make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
== Instructions ==&lt;br /&gt;
*  [[MSYS]] &lt;br /&gt;
*  [[MinGW/cross-compiler]] &lt;br /&gt;
*  [[CodeBlocks IDE]] &lt;br /&gt;
*  [[OpenSUSE 10.1 10.2]] &lt;br /&gt;
* [http://www.geoffmclane.com/fg/fgmsvc7.htm MSVC7 *.Net]&lt;br /&gt;
* [http://www.oflebbe.de/oflebbe/FlightGear/index.html MSVC8 aka Visual 2005]&lt;br /&gt;
* [http://macflightgear.sourceforge.net/home/documents/ Mac OS X]&lt;br /&gt;
= Important note for GIT users =&lt;br /&gt;
As of latest development in GIT, only cmake is now required for building both SimGear and FlightGear. So if you build GIT (for what any reason) please don't try to use autogen.sh as it is removed from repository.&lt;br /&gt;
&lt;br /&gt;
For detailed instructions, see page [[Building_using_CMake|Building using cmake]].&lt;br /&gt;
&lt;br /&gt;
{{Building}}&lt;br /&gt;
&lt;br /&gt;
[[fr:Compiler FlightGear sous GNU/Linux]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=123974</id>
		<title>Building FlightGear - Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=123974"/>
		<updated>2020-04-20T10:06:11Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Flightgear */ Fix test&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Main article|Building Flightgear}} &lt;br /&gt;
&lt;br /&gt;
This section describes how to build [[FlightGear]] on Linux system.&lt;br /&gt;
&lt;br /&gt;
Compiling FlightGear is not a task for novice users. Thus, if you're a beginner (we all were once) on a platform which binaries are available for, we recommend postponing this task and just starting with the binary distribution to get you flying.&lt;br /&gt;
&lt;br /&gt;
openSUSE also provides binary packages of the latest development version, which are continuously updated.&lt;br /&gt;
Follow [http://software.opensuse.org/download.html?lang=en&amp;amp;project=games:FlightGear:Unstable&amp;amp;package=fgrun this link] to select your openSUSE version and install, or manually add ''games:FlightGear:Unstable'' to your ''YaST Software Repositories''.&lt;br /&gt;
&lt;br /&gt;
For Ubuntu, there is a PPA that provides the latest development version of FlightGear and SimGear and a recent version of FlightGear data. See [https://launchpad.net/~saiarcot895/+archive/flightgear-edge this page] for more info. To add the PPA, run &amp;lt;tt&amp;gt;sudo apt-add-repository ppa:saiarcot895/flightgear-edge&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Or if you develop on Ubuntu or Debian, consider trying the script described in [[Scripted Compilation on Linux Debian/Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
= Distro-specific instructions =&lt;br /&gt;
== Debian/Ubuntu ==&lt;br /&gt;
* You can use the [[Scripted Compilation on Linux Debian/Ubuntu]] script to have Flightgear compiled in one shot under both Ubuntu and Debian systems.&lt;br /&gt;
* Debian users who prefer to build it without script may look at [[Building Flightgear - Debian]].&lt;br /&gt;
* Ubuntu users can follow these instructions to build FlightGear on [[Building Flightgear - Ubuntu | Ubuntu 20.04]].&lt;br /&gt;
* Hints for [[Ubuntu]] users.&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
* Gentoo users can also use overlays to build FlightGear without much hassle: [[Building Flightgear - Gentoo]].&lt;br /&gt;
&lt;br /&gt;
== CentOS ==&lt;br /&gt;
CentOS users can follow these instructions to build FlightGear on [[Building Flightgear - CentOS | CentOS 8]].&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
{{Note|as of 12/2017, people may have to build using at least OSG 3.4 due to some compilation issues -for details, refer to [[Howto:Building FlightGear without HiDPI support]]}}&lt;br /&gt;
&lt;br /&gt;
Before you can compile FlightGear, you need to have the following installed on your computer:&lt;br /&gt;
&lt;br /&gt;
'''C++ compiler'''&lt;br /&gt;
&lt;br /&gt;
These are: c++, g++ found under the &amp;lt;code&amp;gt;/usr/bin&amp;lt;/code&amp;gt; directory.  You will also need to have the tools '''CMake''' installed.&lt;br /&gt;
&lt;br /&gt;
'''GIT'''&lt;br /&gt;
&lt;br /&gt;
See [[FlightGear and Git]].&lt;br /&gt;
&lt;br /&gt;
'''[[OpenGL]] support'''&lt;br /&gt;
&lt;br /&gt;
More specifically, your system needs the support for hardware accelerated graphics.  You can check for this by running the following in a [[command line]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ glxinfo | grep direct&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: To run the above command, you need to have the tool '''mesa-utils''' installed.&lt;br /&gt;
&lt;br /&gt;
You should then see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: Yes&lt;br /&gt;
&lt;br /&gt;
This means you are good to go as far as OpenGL support is concerned.&lt;br /&gt;
&lt;br /&gt;
If you see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: No&lt;br /&gt;
&lt;br /&gt;
Don't panic yet.  This may just mean some required libraries for hardware accelerated graphic are missing.  Go ahead and try installing '''plib 1.8.5''' and its dependencies first.  If you still get the above message, then you will need to do some googling and troubleshoot yourself.&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
FlightGear is dependent on quite a few number of libraries.  You do not need to compile all of them yourself, but you will at least need to have their development version installed.  For example, the development version for package &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt;'''-dev'''.&lt;br /&gt;
&lt;br /&gt;
The dependency is summarized in the following tree.  Please note that each library has its own dependencies, and most of these are not shown here.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;FlightGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
** [http://kcat.strangesoft.net/openal.html &amp;lt;tt&amp;gt;OpenAL&amp;lt;/tt&amp;gt;]&lt;br /&gt;
** &amp;lt;tt&amp;gt;SimGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
*** [http://plib.sourceforge.net/ &amp;lt;tt&amp;gt;PLIB&amp;lt;/tt&amp;gt;]. Since March 2008, you will need version 1.8.5 - your distro probably supplies 1.8.4 still.&lt;br /&gt;
**** For versions pre March 2008: (Free)&amp;lt;tt&amp;gt;GLUT&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; (We recommend the use of &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; over &amp;lt;tt&amp;gt;Free/GLUT&amp;lt;/tt&amp;gt;, [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg16153.html however since March 2008, &amp;lt;tt&amp;gt;FreeGLUT&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; are both considered deprecated], please only use &amp;lt;code&amp;gt;--enable-osgviewer&amp;lt;/code&amp;gt; during configuration instead) &lt;br /&gt;
***  &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt;  (check link for compatible versions)&lt;br /&gt;
*** You also need the development files for several basic libraries to build the software, among them the following (the package names are for Debian and derivatives(?)):&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libfreetype6-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libjpeg62-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libungif4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libtiff4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libpng12-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxmu-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxi-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;zlib1g-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libglut3-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you attack the above dependencies in the order listed below, you should be good:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; Most distributions include glut packages, although you may have to hunt for them. Make sure you install both the &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;glut-devel&amp;lt;/tt&amp;gt; packages, otherwise FlightGear may be able to compile but won't run correctly.&lt;br /&gt;
# &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; Most distributions install the basic &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; libraries by default, but not the development portions. If you don't have &amp;lt;tt&amp;gt;zlib.h&amp;lt;/tt&amp;gt;, you probably need to install the &amp;lt;tt&amp;gt;zlib-devel&amp;lt;/tt&amp;gt; package for your distribution. &lt;br /&gt;
# &amp;lt;tt&amp;gt;plib&amp;lt;/tt&amp;gt; Portability libraries and scene graph. &lt;br /&gt;
# &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt; &lt;br /&gt;
# &amp;lt;tt&amp;gt;simgear&amp;lt;/tt&amp;gt; Simulation support libraries. If you are building FlightGear from Git, you need the Git version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.&lt;br /&gt;
&lt;br /&gt;
= Compiling =&lt;br /&gt;
&lt;br /&gt;
== Definitions ==&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB&amp;lt;/code&amp;gt;: The default &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directory is different between RedHat and Debian based distributions. Usually on Debian based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib&lt;br /&gt;
Usually on RedHat based distribution&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib64&lt;br /&gt;
&lt;br /&gt;
== Simgear ==&lt;br /&gt;
The source code of Simgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Simgear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Simgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Simgear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flightgear ==&lt;br /&gt;
The data for Flightgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here].&lt;br /&gt;
 rm -f -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 mkdir --parents -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/FlightGear-${FLIGHTGEAR_VERSION}-data.tar.bz2&amp;quot;&lt;br /&gt;
 popd&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 ln --symbolic -- &amp;quot;FlightGear-${FLIGHTGEAR_VERSION}/fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 git clone --depth 1 https://git.code.sf.net/p/flightgear/fgdata flightgear-fgdata&lt;br /&gt;
 ln --symbolic -- &amp;quot;flightgear-fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/flightgear-fgdata/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
The source code of Flightgear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Flightgear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Flightgear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX_LIB}/&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/Flightgear make --jobs=${NR_JOBS} -- test_suite&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/Flightgear make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
== Instructions ==&lt;br /&gt;
*  [[MSYS]] &lt;br /&gt;
*  [[MinGW/cross-compiler]] &lt;br /&gt;
*  [[CodeBlocks IDE]] &lt;br /&gt;
*  [[OpenSUSE 10.1 10.2]] &lt;br /&gt;
* [http://www.geoffmclane.com/fg/fgmsvc7.htm MSVC7 *.Net]&lt;br /&gt;
* [http://www.oflebbe.de/oflebbe/FlightGear/index.html MSVC8 aka Visual 2005]&lt;br /&gt;
* [http://macflightgear.sourceforge.net/home/documents/ Mac OS X]&lt;br /&gt;
= Important note for GIT users =&lt;br /&gt;
As of latest development in GIT, only cmake is now required for building both SimGear and FlightGear. So if you build GIT (for what any reason) please don't try to use autogen.sh as it is removed from repository.&lt;br /&gt;
&lt;br /&gt;
For detailed instructions, see page [[Building_using_CMake|Building using cmake]].&lt;br /&gt;
&lt;br /&gt;
{{Building}}&lt;br /&gt;
&lt;br /&gt;
[[fr:Compiler FlightGear sous GNU/Linux]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=123944</id>
		<title>Building Flightgear - CentOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=123944"/>
		<updated>2020-04-18T22:33:15Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: Add packages for FGQCanvas&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Preparation =&lt;br /&gt;
A &amp;quot;Minimal Install&amp;quot; of CentOS 8 (64 bits) is needed.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The user need  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages and add some repos.&lt;br /&gt;
&lt;br /&gt;
The following repos need to be added and enabled:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf config-manager --set-enabled PowerTools&lt;br /&gt;
 sudo dnf install epel-release&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;dnf&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install freeglut-devel.x86_64 openal-soft.x86_64 freetype-devel.x86_64 libjpeg-turbo-devel.x86_64 jasper-libs.x86_64 libxml2-devel.x86_64 libcurl-devel.x86_64 \&lt;br /&gt;
    cairo-devel.x86_64 poppler-glib.x86_64 librsvg2-devel.x86_64 gtk2-devel.x86_64 lua-libs.x86_64 lua.x86_64 fltk.x86_64 libpng-devel.x86_64 libtiff-devel.x86_64 \&lt;br /&gt;
    libXrandr-devel.x86_64 libXinerama-devel.x86_64 zlib-devel.x86_64 expat-devel.x86_64 boost.x86_64 openal-soft-devel.x86_64 cmake.x86_64 \&lt;br /&gt;
    mesa-libEGL-devel.x86_64 jasper-devel.x86_64 gstreamer1-devel.x86_64 SDL2-devel.x86_64 poppler-glib-devel.x86_64 lua-devel.x86_64 fltk-devel.x86_64 boost-devel.x86_64 \&lt;br /&gt;
    dbus-devel.x86_64 libevent-devel.x86_64 glew-devel.x86_64 qt5-qtdeclarative-devel.x86_64 qt5-qtsvg-devel.x86_64 qt5-linguist.x86_64 qt5-qttools-devel.x86_64 qt5-qtwebsockets-devel.x86_64&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;plib&amp;lt;/code&amp;gt; package is not available for CentOS 8. The package from CentOS 7 can be used instead. After downloading the following packages:&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-1.8.5-15.el7.x86_64.rpm.html plib-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-devel-1.8.5-15.el7.x86_64.rpm.html plib-devel-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
&lt;br /&gt;
The 2 packages can be installed manually using the following command:&lt;br /&gt;
&lt;br /&gt;
 sudo rpm --install plib-1.8.5-15.el7.x86_64.rpm &lt;br /&gt;
 sudo rpm --install plib-devel-1.8.5-15.el7.x86_64.rpm&lt;br /&gt;
&lt;br /&gt;
= Definitions =&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib64&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib64&amp;lt;/code&amp;gt; in the specific case of CentOS.&lt;br /&gt;
* &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION&amp;lt;/code&amp;gt;: Version of OpenSceneGraph. For example: &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION=3.6.5&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
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 &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; such that the full path of the file will be &amp;lt;code&amp;gt;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following commands can be used to build OpenSceneGraph:&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 OPENSCENEGRAPH_SRC=${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}.tar.gz&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${OPENSCENEGRAPH_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=Release \&lt;br /&gt;
       -DBUILD_OSG_EXAMPLES:BOOL=ON \&lt;br /&gt;
       -DOSG_USE_LOCAL_LUA_SOURCE:BOOL=OFF \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DLIB_POSTFIX=64 \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= [[Building FlightGear - Linux#Compiling | Compiling]] =&lt;br /&gt;
&lt;br /&gt;
= Start Flightgear =&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}&amp;quot;&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX}/lib64/&lt;br /&gt;
 ./bin/fgfs&lt;br /&gt;
&lt;br /&gt;
[[Category:Building from source]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Ubuntu&amp;diff=123939</id>
		<title>Building Flightgear - Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Ubuntu&amp;diff=123939"/>
		<updated>2020-04-18T19:15:07Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: Add packages for FGQCanvas&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Preparation =&lt;br /&gt;
A &amp;quot;Minimal Install&amp;quot; of Ubuntu 20.04 (64 bits) is needed.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The user need  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages.&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libplib-dev libopenscenegraph-dev cmake g++ libboost1.71-all-dev libopenal-dev libglew-dev \&lt;br /&gt;
    libcurl4-openssl-dev libfreetype-dev \&lt;br /&gt;
    libqt5svg5-dev qttools5-dev libqt5websockets5-dev qtbase5-private-dev qtdeclarative5-private-dev qml-module-qtquick2&lt;br /&gt;
&lt;br /&gt;
= Definitions =&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt; in the specific case of Ubuntu.&lt;br /&gt;
&lt;br /&gt;
= [[Building FlightGear - Linux#Compiling | Compiling]] =&lt;br /&gt;
&lt;br /&gt;
[[Category:Building from source]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Ubuntu&amp;diff=123518</id>
		<title>Building Flightgear - Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Ubuntu&amp;diff=123518"/>
		<updated>2020-04-13T20:36:54Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Preparation =&lt;br /&gt;
A &amp;quot;Minimal Install&amp;quot; of Ubuntu 20.04 (64 bits) is needed.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The user need  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages.&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libplib-dev libopenscenegraph-dev cmake g++ libboost1.71-all-dev libopenal-dev libglew-dev \&lt;br /&gt;
    libcurl4-openssl-dev libudev-dev libfreetype-dev qtdeclarative5-dev libqt5svg5-dev qttools5-dev&lt;br /&gt;
&lt;br /&gt;
= Definitions =&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt; in the specific case of Ubuntu.&lt;br /&gt;
&lt;br /&gt;
= [[Building FlightGear - Linux#Compiling | Compiling]] =&lt;br /&gt;
&lt;br /&gt;
[[Category:Building from source]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Ubuntu&amp;diff=123514</id>
		<title>Building Flightgear - Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_Ubuntu&amp;diff=123514"/>
		<updated>2020-04-13T20:09:15Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: Initial version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Preparation =&lt;br /&gt;
A &amp;quot;Minimal Install&amp;quot; of Ubuntu 20.04 (64 bits) is needed.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The user need  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages.&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libplib-dev libopenscenegraph-dev cmake g++ libboost1.71-all-dev libopenal-dev freeglut3-dev libglew-dev \&lt;br /&gt;
    libcurl4-openssl-dev libudev-dev libpng-dev libfreetype-dev qtdeclarative5-dev libqt5svg5-dev qttools5-dev&lt;br /&gt;
&lt;br /&gt;
= Definitions =&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt; in the specific case of Ubuntu.&lt;br /&gt;
&lt;br /&gt;
= [[Building FlightGear - Linux#Compiling | Compiling]] =&lt;br /&gt;
&lt;br /&gt;
[[Category:Building from source]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=123508</id>
		<title>Building FlightGear - Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=123508"/>
		<updated>2020-04-13T20:02:58Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Distro-specific instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Main article|Building Flightgear}} &lt;br /&gt;
&lt;br /&gt;
This section describes how to build [[FlightGear]] on Linux system.&lt;br /&gt;
&lt;br /&gt;
Compiling FlightGear is not a task for novice users. Thus, if you're a beginner (we all were once) on a platform which binaries are available for, we recommend postponing this task and just starting with the binary distribution to get you flying.&lt;br /&gt;
&lt;br /&gt;
openSUSE also provides binary packages of the latest development version, which are continuously updated.&lt;br /&gt;
Follow [http://software.opensuse.org/download.html?lang=en&amp;amp;project=games:FlightGear:Unstable&amp;amp;package=fgrun this link] to select your openSUSE version and install, or manually add ''games:FlightGear:Unstable'' to your ''YaST Software Repositories''.&lt;br /&gt;
&lt;br /&gt;
For Ubuntu, there is a PPA that provides the latest development version of FlightGear and SimGear and a recent version of FlightGear data. See [https://launchpad.net/~saiarcot895/+archive/flightgear-edge this page] for more info. To add the PPA, run &amp;lt;tt&amp;gt;sudo apt-add-repository ppa:saiarcot895/flightgear-edge&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Or if you develop on Ubuntu or Debian, consider trying the script described in [[Scripted Compilation on Linux Debian/Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
= Distro-specific instructions =&lt;br /&gt;
== Debian/Ubuntu ==&lt;br /&gt;
* You can use the [[Scripted Compilation on Linux Debian/Ubuntu]] script to have Flightgear compiled in one shot under both Ubuntu and Debian systems.&lt;br /&gt;
* Debian users who prefer to build it without script may look at [[Building Flightgear - Debian]].&lt;br /&gt;
* Ubuntu users can follow these instructions to build FlightGear on [[Building Flightgear - Ubuntu | Ubuntu 20.04]].&lt;br /&gt;
* Hints for [[Ubuntu]] users.&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
* Gentoo users can also use overlays to build FlightGear without much hassle: [[Building Flightgear - Gentoo]].&lt;br /&gt;
&lt;br /&gt;
== CentOS ==&lt;br /&gt;
CentOS users can follow these instructions to build FlightGear on [[Building Flightgear - CentOS | CentOS 8]].&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
{{Note|as of 12/2017, people may have to build using at least OSG 3.4 due to some compilation issues -for details, refer to [[Howto:Building FlightGear without HiDPI support]]}}&lt;br /&gt;
&lt;br /&gt;
Before you can compile FlightGear, you need to have the following installed on your computer:&lt;br /&gt;
&lt;br /&gt;
'''C++ compiler'''&lt;br /&gt;
&lt;br /&gt;
These are: c++, g++ found under the &amp;lt;code&amp;gt;/usr/bin&amp;lt;/code&amp;gt; directory.  You will also need to have the tools '''CMake''' installed.&lt;br /&gt;
&lt;br /&gt;
'''GIT'''&lt;br /&gt;
&lt;br /&gt;
See [[FlightGear and Git]].&lt;br /&gt;
&lt;br /&gt;
'''[[OpenGL]] support'''&lt;br /&gt;
&lt;br /&gt;
More specifically, your system needs the support for hardware accelerated graphics.  You can check for this by running the following in a [[command line]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ glxinfo | grep direct&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: To run the above command, you need to have the tool '''mesa-utils''' installed.&lt;br /&gt;
&lt;br /&gt;
You should then see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: Yes&lt;br /&gt;
&lt;br /&gt;
This means you are good to go as far as OpenGL support is concerned.&lt;br /&gt;
&lt;br /&gt;
If you see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: No&lt;br /&gt;
&lt;br /&gt;
Don't panic yet.  This may just mean some required libraries for hardware accelerated graphic are missing.  Go ahead and try installing '''plib 1.8.5''' and its dependencies first.  If you still get the above message, then you will need to do some googling and troubleshoot yourself.&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
FlightGear is dependent on quite a few number of libraries.  You do not need to compile all of them yourself, but you will at least need to have their development version installed.  For example, the development version for package &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt;'''-dev'''.&lt;br /&gt;
&lt;br /&gt;
The dependency is summarized in the following tree.  Please note that each library has its own dependencies, and most of these are not shown here.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;FlightGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
** [http://kcat.strangesoft.net/openal.html &amp;lt;tt&amp;gt;OpenAL&amp;lt;/tt&amp;gt;]&lt;br /&gt;
** &amp;lt;tt&amp;gt;SimGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
*** [http://plib.sourceforge.net/ &amp;lt;tt&amp;gt;PLIB&amp;lt;/tt&amp;gt;]. Since March 2008, you will need version 1.8.5 - your distro probably supplies 1.8.4 still.&lt;br /&gt;
**** For versions pre March 2008: (Free)&amp;lt;tt&amp;gt;GLUT&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; (We recommend the use of &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; over &amp;lt;tt&amp;gt;Free/GLUT&amp;lt;/tt&amp;gt;, [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg16153.html however since March 2008, &amp;lt;tt&amp;gt;FreeGLUT&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; are both considered deprecated], please only use &amp;lt;code&amp;gt;--enable-osgviewer&amp;lt;/code&amp;gt; during configuration instead) &lt;br /&gt;
***  &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt;  (check link for compatible versions)&lt;br /&gt;
*** You also need the development files for several basic libraries to build the software, among them the following (the package names are for Debian and derivatives(?)):&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libfreetype6-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libjpeg62-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libungif4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libtiff4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libpng12-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxmu-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxi-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;zlib1g-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libglut3-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you attack the above dependencies in the order listed below, you should be good:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; Most distributions include glut packages, although you may have to hunt for them. Make sure you install both the &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;glut-devel&amp;lt;/tt&amp;gt; packages, otherwise FlightGear may be able to compile but won't run correctly.&lt;br /&gt;
# &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; Most distributions install the basic &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; libraries by default, but not the development portions. If you don't have &amp;lt;tt&amp;gt;zlib.h&amp;lt;/tt&amp;gt;, you probably need to install the &amp;lt;tt&amp;gt;zlib-devel&amp;lt;/tt&amp;gt; package for your distribution. &lt;br /&gt;
# &amp;lt;tt&amp;gt;plib&amp;lt;/tt&amp;gt; Portability libraries and scene graph. &lt;br /&gt;
# &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt; &lt;br /&gt;
# &amp;lt;tt&amp;gt;simgear&amp;lt;/tt&amp;gt; Simulation support libraries. If you are building FlightGear from Git, you need the Git version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.&lt;br /&gt;
&lt;br /&gt;
= Compiling =&lt;br /&gt;
&lt;br /&gt;
== Definitions ==&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB&amp;lt;/code&amp;gt;: The default &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directory is different between RedHat and Debian based distributions. Usually on Debian based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib&lt;br /&gt;
Usually on RedHat based distribution&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib64&lt;br /&gt;
&lt;br /&gt;
== Simgear ==&lt;br /&gt;
The source code of Simgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Simgear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Simgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Simgear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flightgear ==&lt;br /&gt;
The data for Flightgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here].&lt;br /&gt;
 rm -f -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 mkdir --parents -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/FlightGear-${FLIGHTGEAR_VERSION}-data.tar.bz2&amp;quot;&lt;br /&gt;
 popd&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 ln --symbolic -- &amp;quot;FlightGear-${FLIGHTGEAR_VERSION}/fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 git clone --depth 1 https://git.code.sf.net/p/flightgear/fgdata flightgear-fgdata&lt;br /&gt;
 ln --symbolic -- &amp;quot;flightgear-fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/flightgear-fgdata/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
The source code of Flightgear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Flightgear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Flightgear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX_LIB}/&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/Flightgear make --jobs=${NR_JOBS} -- test_suite&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
== Instructions ==&lt;br /&gt;
*  [[MSYS]] &lt;br /&gt;
*  [[MinGW/cross-compiler]] &lt;br /&gt;
*  [[CodeBlocks IDE]] &lt;br /&gt;
*  [[OpenSUSE 10.1 10.2]] &lt;br /&gt;
* [http://www.geoffmclane.com/fg/fgmsvc7.htm MSVC7 *.Net]&lt;br /&gt;
* [http://www.oflebbe.de/oflebbe/FlightGear/index.html MSVC8 aka Visual 2005]&lt;br /&gt;
* [http://macflightgear.sourceforge.net/home/documents/ Mac OS X]&lt;br /&gt;
= Important note for GIT users =&lt;br /&gt;
As of latest development in GIT, only cmake is now required for building both SimGear and FlightGear. So if you build GIT (for what any reason) please don't try to use autogen.sh as it is removed from repository.&lt;br /&gt;
&lt;br /&gt;
For detailed instructions, see page [[Building_using_CMake|Building using cmake]].&lt;br /&gt;
&lt;br /&gt;
{{Building}}&lt;br /&gt;
&lt;br /&gt;
[[fr:Compiler FlightGear sous GNU/Linux]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=123503</id>
		<title>Building Flightgear - CentOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=123503"/>
		<updated>2020-04-13T19:56:35Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Definitions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Preparation =&lt;br /&gt;
A &amp;quot;Minimal Install&amp;quot; of CentOS 8 (64 bits) is needed.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The user need  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages and add some repos.&lt;br /&gt;
&lt;br /&gt;
The following repos need to be added and enabled:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf config-manager --set-enabled PowerTools&lt;br /&gt;
 sudo dnf install epel-release&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;dnf&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install freeglut-devel.x86_64 openal-soft.x86_64 freetype-devel.x86_64 libjpeg-turbo-devel.x86_64 jasper-libs.x86_64 libxml2-devel.x86_64 libcurl-devel.x86_64 \&lt;br /&gt;
    cairo-devel.x86_64 poppler-glib.x86_64 librsvg2-devel.x86_64 gtk2-devel.x86_64 lua-libs.x86_64 lua.x86_64 fltk.x86_64 libpng-devel.x86_64 libtiff-devel.x86_64 \&lt;br /&gt;
    libXrandr-devel.x86_64 libXinerama-devel.x86_64 zlib-devel.x86_64 expat-devel.x86_64 boost.x86_64 openal-soft-devel.x86_64 cmake.x86_64 \&lt;br /&gt;
    mesa-libEGL-devel.x86_64 jasper-devel.x86_64 gstreamer1-devel.x86_64 SDL2-devel.x86_64 poppler-glib-devel.x86_64 lua-devel.x86_64 fltk-devel.x86_64 boost-devel.x86_64 \&lt;br /&gt;
    dbus-devel.x86_64 libevent-devel.x86_64 glew-devel.x86_64 qt5-qtdeclarative-devel.x86_64 qt5-qtsvg-devel.x86_64 qt5-linguist.x86_64&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;plib&amp;lt;/code&amp;gt; package is not available for CentOS 8. The package from CentOS 7 can be used instead. After downloading the following packages:&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-1.8.5-15.el7.x86_64.rpm.html plib-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-devel-1.8.5-15.el7.x86_64.rpm.html plib-devel-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
&lt;br /&gt;
The 2 packages can be installed manually using the following command:&lt;br /&gt;
&lt;br /&gt;
 sudo rpm --install plib-1.8.5-15.el7.x86_64.rpm &lt;br /&gt;
 sudo rpm --install plib-devel-1.8.5-15.el7.x86_64.rpm&lt;br /&gt;
&lt;br /&gt;
= Definitions =&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib64&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib64&amp;lt;/code&amp;gt; in the specific case of CentOS.&lt;br /&gt;
* &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION&amp;lt;/code&amp;gt;: Version of OpenSceneGraph. For example: &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION=3.6.5&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
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 &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; such that the full path of the file will be &amp;lt;code&amp;gt;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following commands can be used to build OpenSceneGraph:&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 OPENSCENEGRAPH_SRC=${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}.tar.gz&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${OPENSCENEGRAPH_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=Release \&lt;br /&gt;
       -DBUILD_OSG_EXAMPLES:BOOL=ON \&lt;br /&gt;
       -DOSG_USE_LOCAL_LUA_SOURCE:BOOL=OFF \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DLIB_POSTFIX=64 \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= [[Building FlightGear - Linux#Compiling | Compiling]] =&lt;br /&gt;
&lt;br /&gt;
= Start Flightgear =&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}&amp;quot;&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX}/lib64/&lt;br /&gt;
 ./bin/fgfs&lt;br /&gt;
&lt;br /&gt;
[[Category:Building from source]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=123455</id>
		<title>Building Flightgear - CentOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=123455"/>
		<updated>2020-04-13T17:34:35Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Preparation =&lt;br /&gt;
A &amp;quot;Minimal Install&amp;quot; of CentOS 8 (64 bits) is needed.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The user need  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages and add some repos.&lt;br /&gt;
&lt;br /&gt;
The following repos need to be added and enabled:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf config-manager --set-enabled PowerTools&lt;br /&gt;
 sudo dnf install epel-release&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;dnf&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install freeglut-devel.x86_64 openal-soft.x86_64 freetype-devel.x86_64 libjpeg-turbo-devel.x86_64 jasper-libs.x86_64 libxml2-devel.x86_64 libcurl-devel.x86_64 \&lt;br /&gt;
    cairo-devel.x86_64 poppler-glib.x86_64 librsvg2-devel.x86_64 gtk2-devel.x86_64 lua-libs.x86_64 lua.x86_64 fltk.x86_64 libpng-devel.x86_64 libtiff-devel.x86_64 \&lt;br /&gt;
    libXrandr-devel.x86_64 libXinerama-devel.x86_64 zlib-devel.x86_64 expat-devel.x86_64 boost.x86_64 openal-soft-devel.x86_64 cmake.x86_64 \&lt;br /&gt;
    mesa-libEGL-devel.x86_64 jasper-devel.x86_64 gstreamer1-devel.x86_64 SDL2-devel.x86_64 poppler-glib-devel.x86_64 lua-devel.x86_64 fltk-devel.x86_64 boost-devel.x86_64 \&lt;br /&gt;
    dbus-devel.x86_64 libevent-devel.x86_64 glew-devel.x86_64 qt5-qtdeclarative-devel.x86_64 qt5-qtsvg-devel.x86_64 qt5-linguist.x86_64&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;plib&amp;lt;/code&amp;gt; package is not available for CentOS 8. The package from CentOS 7 can be used instead. After downloading the following packages:&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-1.8.5-15.el7.x86_64.rpm.html plib-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-devel-1.8.5-15.el7.x86_64.rpm.html plib-devel-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
&lt;br /&gt;
The 2 packages can be installed manually using the following command:&lt;br /&gt;
&lt;br /&gt;
 sudo rpm --install plib-1.8.5-15.el7.x86_64.rpm &lt;br /&gt;
 sudo rpm --install plib-devel-1.8.5-15.el7.x86_64.rpm&lt;br /&gt;
&lt;br /&gt;
= Definitions =&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION&amp;lt;/code&amp;gt;: Version of OpenSceneGraph. For example: &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION=3.6.5&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
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 &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; such that the full path of the file will be &amp;lt;code&amp;gt;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following commands can be used to build OpenSceneGraph:&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 OPENSCENEGRAPH_SRC=${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}.tar.gz&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${OPENSCENEGRAPH_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=Release \&lt;br /&gt;
       -DBUILD_OSG_EXAMPLES:BOOL=ON \&lt;br /&gt;
       -DOSG_USE_LOCAL_LUA_SOURCE:BOOL=OFF \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DLIB_POSTFIX=64 \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= [[Building FlightGear - Linux#Compiling | Compiling]] =&lt;br /&gt;
&lt;br /&gt;
= Start Flightgear =&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}&amp;quot;&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX}/lib64/&lt;br /&gt;
 ./bin/fgfs&lt;br /&gt;
&lt;br /&gt;
[[Category:Building from source]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=123447</id>
		<title>Building FlightGear - Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=123447"/>
		<updated>2020-04-13T17:26:22Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Main article|Building Flightgear}} &lt;br /&gt;
&lt;br /&gt;
This section describes how to build [[FlightGear]] on Linux system.&lt;br /&gt;
&lt;br /&gt;
Compiling FlightGear is not a task for novice users. Thus, if you're a beginner (we all were once) on a platform which binaries are available for, we recommend postponing this task and just starting with the binary distribution to get you flying.&lt;br /&gt;
&lt;br /&gt;
openSUSE also provides binary packages of the latest development version, which are continuously updated.&lt;br /&gt;
Follow [http://software.opensuse.org/download.html?lang=en&amp;amp;project=games:FlightGear:Unstable&amp;amp;package=fgrun this link] to select your openSUSE version and install, or manually add ''games:FlightGear:Unstable'' to your ''YaST Software Repositories''.&lt;br /&gt;
&lt;br /&gt;
For Ubuntu, there is a PPA that provides the latest development version of FlightGear and SimGear and a recent version of FlightGear data. See [https://launchpad.net/~saiarcot895/+archive/flightgear-edge this page] for more info. To add the PPA, run &amp;lt;tt&amp;gt;sudo apt-add-repository ppa:saiarcot895/flightgear-edge&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Or if you develop on Ubuntu or Debian, consider trying the script described in [[Scripted Compilation on Linux Debian/Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
= Distro-specific instructions =&lt;br /&gt;
== Debian/Ubuntu ==&lt;br /&gt;
* You can use the [[Scripted Compilation on Linux Debian/Ubuntu]] script to have Flightgear compiled in one shot under both Ubuntu and Debian systems.&lt;br /&gt;
* Debian users who prefer to build it without script may look at [[Building Flightgear - Debian]].&lt;br /&gt;
* Hints for [[Ubuntu]] users.&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
* Gentoo users can also use overlays to build FlightGear without much hassle: [[Building Flightgear - Gentoo]].&lt;br /&gt;
&lt;br /&gt;
== CentOS ==&lt;br /&gt;
CentOS users can follow these instructions to build FlightGear on [[Building Flightgear - CentOS | CentOS 8]].&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
{{Note|as of 12/2017, people may have to build using at least OSG 3.4 due to some compilation issues -for details, refer to [[Howto:Building FlightGear without HiDPI support]]}}&lt;br /&gt;
&lt;br /&gt;
Before you can compile FlightGear, you need to have the following installed on your computer:&lt;br /&gt;
&lt;br /&gt;
'''C++ compiler'''&lt;br /&gt;
&lt;br /&gt;
These are: c++, g++ found under the &amp;lt;code&amp;gt;/usr/bin&amp;lt;/code&amp;gt; directory.  You will also need to have the tools '''CMake''' installed.&lt;br /&gt;
&lt;br /&gt;
'''GIT'''&lt;br /&gt;
&lt;br /&gt;
See [[FlightGear and Git]].&lt;br /&gt;
&lt;br /&gt;
'''[[OpenGL]] support'''&lt;br /&gt;
&lt;br /&gt;
More specifically, your system needs the support for hardware accelerated graphics.  You can check for this by running the following in a [[command line]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ glxinfo | grep direct&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: To run the above command, you need to have the tool '''mesa-utils''' installed.&lt;br /&gt;
&lt;br /&gt;
You should then see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: Yes&lt;br /&gt;
&lt;br /&gt;
This means you are good to go as far as OpenGL support is concerned.&lt;br /&gt;
&lt;br /&gt;
If you see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: No&lt;br /&gt;
&lt;br /&gt;
Don't panic yet.  This may just mean some required libraries for hardware accelerated graphic are missing.  Go ahead and try installing '''plib 1.8.5''' and its dependencies first.  If you still get the above message, then you will need to do some googling and troubleshoot yourself.&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
FlightGear is dependent on quite a few number of libraries.  You do not need to compile all of them yourself, but you will at least need to have their development version installed.  For example, the development version for package &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt;'''-dev'''.&lt;br /&gt;
&lt;br /&gt;
The dependency is summarized in the following tree.  Please note that each library has its own dependencies, and most of these are not shown here.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;FlightGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
** [http://kcat.strangesoft.net/openal.html &amp;lt;tt&amp;gt;OpenAL&amp;lt;/tt&amp;gt;]&lt;br /&gt;
** &amp;lt;tt&amp;gt;SimGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
*** [http://plib.sourceforge.net/ &amp;lt;tt&amp;gt;PLIB&amp;lt;/tt&amp;gt;]. Since March 2008, you will need version 1.8.5 - your distro probably supplies 1.8.4 still.&lt;br /&gt;
**** For versions pre March 2008: (Free)&amp;lt;tt&amp;gt;GLUT&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; (We recommend the use of &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; over &amp;lt;tt&amp;gt;Free/GLUT&amp;lt;/tt&amp;gt;, [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg16153.html however since March 2008, &amp;lt;tt&amp;gt;FreeGLUT&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; are both considered deprecated], please only use &amp;lt;code&amp;gt;--enable-osgviewer&amp;lt;/code&amp;gt; during configuration instead) &lt;br /&gt;
***  &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt;  (check link for compatible versions)&lt;br /&gt;
*** You also need the development files for several basic libraries to build the software, among them the following (the package names are for Debian and derivatives(?)):&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libfreetype6-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libjpeg62-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libungif4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libtiff4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libpng12-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxmu-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxi-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;zlib1g-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libglut3-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you attack the above dependencies in the order listed below, you should be good:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; Most distributions include glut packages, although you may have to hunt for them. Make sure you install both the &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;glut-devel&amp;lt;/tt&amp;gt; packages, otherwise FlightGear may be able to compile but won't run correctly.&lt;br /&gt;
# &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; Most distributions install the basic &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; libraries by default, but not the development portions. If you don't have &amp;lt;tt&amp;gt;zlib.h&amp;lt;/tt&amp;gt;, you probably need to install the &amp;lt;tt&amp;gt;zlib-devel&amp;lt;/tt&amp;gt; package for your distribution. &lt;br /&gt;
# &amp;lt;tt&amp;gt;plib&amp;lt;/tt&amp;gt; Portability libraries and scene graph. &lt;br /&gt;
# &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt; &lt;br /&gt;
# &amp;lt;tt&amp;gt;simgear&amp;lt;/tt&amp;gt; Simulation support libraries. If you are building FlightGear from Git, you need the Git version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.&lt;br /&gt;
&lt;br /&gt;
= Compiling =&lt;br /&gt;
&lt;br /&gt;
== Definitions ==&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB&amp;lt;/code&amp;gt;: The default &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directory is different between RedHat and Debian based distributions. Usually on Debian based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib&lt;br /&gt;
Usually on RedHat based distribution&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib64&lt;br /&gt;
&lt;br /&gt;
== Simgear ==&lt;br /&gt;
The source code of Simgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Simgear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Simgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Simgear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flightgear ==&lt;br /&gt;
The data for Flightgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here].&lt;br /&gt;
 rm -f -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 mkdir --parents -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/FlightGear-${FLIGHTGEAR_VERSION}-data.tar.bz2&amp;quot;&lt;br /&gt;
 popd&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 ln --symbolic -- &amp;quot;FlightGear-${FLIGHTGEAR_VERSION}/fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 git clone --depth 1 https://git.code.sf.net/p/flightgear/fgdata flightgear-fgdata&lt;br /&gt;
 ln --symbolic -- &amp;quot;flightgear-fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/flightgear-fgdata/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
The source code of Flightgear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Flightgear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Flightgear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX_LIB}/&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/Flightgear make --jobs=${NR_JOBS} -- test_suite&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
== Instructions ==&lt;br /&gt;
*  [[MSYS]] &lt;br /&gt;
*  [[MinGW/cross-compiler]] &lt;br /&gt;
*  [[CodeBlocks IDE]] &lt;br /&gt;
*  [[OpenSUSE 10.1 10.2]] &lt;br /&gt;
* [http://www.geoffmclane.com/fg/fgmsvc7.htm MSVC7 *.Net]&lt;br /&gt;
* [http://www.oflebbe.de/oflebbe/FlightGear/index.html MSVC8 aka Visual 2005]&lt;br /&gt;
* [http://macflightgear.sourceforge.net/home/documents/ Mac OS X]&lt;br /&gt;
= Important note for GIT users =&lt;br /&gt;
As of latest development in GIT, only cmake is now required for building both SimGear and FlightGear. So if you build GIT (for what any reason) please don't try to use autogen.sh as it is removed from repository.&lt;br /&gt;
&lt;br /&gt;
For detailed instructions, see page [[Building_using_CMake|Building using cmake]].&lt;br /&gt;
&lt;br /&gt;
{{Building}}&lt;br /&gt;
&lt;br /&gt;
[[fr:Compiler FlightGear sous GNU/Linux]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=123444</id>
		<title>Building FlightGear - Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=123444"/>
		<updated>2020-04-13T17:21:09Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: Update build for CMake&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Main article|Building Flightgear}} &lt;br /&gt;
&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
This section describes how to build [[FlightGear]] on Linux system.&lt;br /&gt;
&lt;br /&gt;
Compiling FlightGear is not a task for novice users. Thus, if you're a beginner (we all were once) on a platform which binaries are available for, we recommend postponing this task and just starting with the binary distribution to get you flying.&lt;br /&gt;
&lt;br /&gt;
openSUSE also provides binary packages of the latest development version, which are continuously updated.&lt;br /&gt;
Follow [http://software.opensuse.org/download.html?lang=en&amp;amp;project=games:FlightGear:Unstable&amp;amp;package=fgrun this link] to select your openSUSE version and install, or manually add ''games:FlightGear:Unstable'' to your ''YaST Software Repositories''.&lt;br /&gt;
&lt;br /&gt;
For Ubuntu, there is a PPA that provides the latest development version of FlightGear and SimGear and a recent version of FlightGear data. See [https://launchpad.net/~saiarcot895/+archive/flightgear-edge this page] for more info. To add the PPA, run &amp;lt;tt&amp;gt;sudo apt-add-repository ppa:saiarcot895/flightgear-edge&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Or if you develop on Ubuntu or Debian, consider trying the script described in [[Scripted Compilation on Linux Debian/Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
= Distro-specific instructions =&lt;br /&gt;
== Debian/Ubuntu ==&lt;br /&gt;
* You can use the [[Scripted Compilation on Linux Debian/Ubuntu]] script to have Flightgear compiled in one shot under both Ubuntu and Debian systems.&lt;br /&gt;
* Debian users who prefer to build it without script may look at [[Building Flightgear - Debian]].&lt;br /&gt;
* Hints for [[Ubuntu]] users.&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
* Gentoo users can also use overlays to build FlightGear without much hassle: [[Building Flightgear - Gentoo]].&lt;br /&gt;
&lt;br /&gt;
== CentOS ==&lt;br /&gt;
CentOS users can follow these instructions to build FlightGear on [[Building Flightgear - CentOS | CentOS 8]].&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
{{Note|as of 12/2017, people may have to build using at least OSG 3.4 due to some compilation issues -for details, refer to [[Howto:Building FlightGear without HiDPI support]]}}&lt;br /&gt;
&lt;br /&gt;
Before you can compile FlightGear, you need to have the following installed on your computer:&lt;br /&gt;
&lt;br /&gt;
'''C++ compiler'''&lt;br /&gt;
&lt;br /&gt;
These are: c++, g++ found under the &amp;lt;code&amp;gt;/usr/bin&amp;lt;/code&amp;gt; directory.  You will also need to have the tools '''CMake''' installed.&lt;br /&gt;
&lt;br /&gt;
'''GIT'''&lt;br /&gt;
&lt;br /&gt;
See [[FlightGear and Git]].&lt;br /&gt;
&lt;br /&gt;
'''[[OpenGL]] support'''&lt;br /&gt;
&lt;br /&gt;
More specifically, your system needs the support for hardware accelerated graphics.  You can check for this by running the following in a [[command line]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ glxinfo | grep direct&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: To run the above command, you need to have the tool '''mesa-utils''' installed.&lt;br /&gt;
&lt;br /&gt;
You should then see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: Yes&lt;br /&gt;
&lt;br /&gt;
This means you are good to go as far as OpenGL support is concerned.&lt;br /&gt;
&lt;br /&gt;
If you see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: No&lt;br /&gt;
&lt;br /&gt;
Don't panic yet.  This may just mean some required libraries for hardware accelerated graphic are missing.  Go ahead and try installing '''plib 1.8.5''' and its dependencies first.  If you still get the above message, then you will need to do some googling and troubleshoot yourself.&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
FlightGear is dependent on quite a few number of libraries.  You do not need to compile all of them yourself, but you will at least need to have their development version installed.  For example, the development version for package &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt;'''-dev'''.&lt;br /&gt;
&lt;br /&gt;
The dependency is summarized in the following tree.  Please note that each library has its own dependencies, and most of these are not shown here.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;FlightGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
** [http://kcat.strangesoft.net/openal.html &amp;lt;tt&amp;gt;OpenAL&amp;lt;/tt&amp;gt;]&lt;br /&gt;
** &amp;lt;tt&amp;gt;SimGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
*** [http://plib.sourceforge.net/ &amp;lt;tt&amp;gt;PLIB&amp;lt;/tt&amp;gt;]. Since March 2008, you will need version 1.8.5 - your distro probably supplies 1.8.4 still.&lt;br /&gt;
**** For versions pre March 2008: (Free)&amp;lt;tt&amp;gt;GLUT&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; (We recommend the use of &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; over &amp;lt;tt&amp;gt;Free/GLUT&amp;lt;/tt&amp;gt;, [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg16153.html however since March 2008, &amp;lt;tt&amp;gt;FreeGLUT&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; are both considered deprecated], please only use &amp;lt;code&amp;gt;--enable-osgviewer&amp;lt;/code&amp;gt; during configuration instead) &lt;br /&gt;
***  &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt;  (check link for compatible versions)&lt;br /&gt;
*** You also need the development files for several basic libraries to build the software, among them the following (the package names are for Debian and derivatives(?)):&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libfreetype6-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libjpeg62-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libungif4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libtiff4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libpng12-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxmu-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxi-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;zlib1g-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libglut3-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you attack the above dependencies in the order listed below, you should be good:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; Most distributions include glut packages, although you may have to hunt for them. Make sure you install both the &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;glut-devel&amp;lt;/tt&amp;gt; packages, otherwise FlightGear may be able to compile but won't run correctly.&lt;br /&gt;
# &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; Most distributions install the basic &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; libraries by default, but not the development portions. If you don't have &amp;lt;tt&amp;gt;zlib.h&amp;lt;/tt&amp;gt;, you probably need to install the &amp;lt;tt&amp;gt;zlib-devel&amp;lt;/tt&amp;gt; package for your distribution. &lt;br /&gt;
# &amp;lt;tt&amp;gt;plib&amp;lt;/tt&amp;gt; Portability libraries and scene graph. &lt;br /&gt;
# &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt; &lt;br /&gt;
# &amp;lt;tt&amp;gt;simgear&amp;lt;/tt&amp;gt; Simulation support libraries. If you are building FlightGear from Git, you need the Git version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.&lt;br /&gt;
&lt;br /&gt;
= Compiling =&lt;br /&gt;
&lt;br /&gt;
== Definitions ==&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX_LIB&amp;lt;/code&amp;gt;: The default &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directory is different between RedHat and Debian based distributions. Usually on Debian based distributions&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib&lt;br /&gt;
Usually on RedHat based distribution&lt;br /&gt;
 FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib64&lt;br /&gt;
&lt;br /&gt;
== Simgear ==&lt;br /&gt;
The source code of Simgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Simgear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Simgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Simgear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flightgear ==&lt;br /&gt;
The data for Flightgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here].&lt;br /&gt;
 rm -f -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 mkdir --parents -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/FlightGear-${FLIGHTGEAR_VERSION}-data.tar.bz2&amp;quot;&lt;br /&gt;
 popd&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 ln --symbolic -- &amp;quot;FlightGear-${FLIGHTGEAR_VERSION}/fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/&amp;quot;&lt;br /&gt;
 git clone --depth 1 https://git.code.sf.net/p/flightgear/fgdata flightgear-fgdata&lt;br /&gt;
 ln --symbolic -- &amp;quot;flightgear-fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX_LIB}/flightgear-fgdata/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
The source code of Flightgear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Flightgear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Flightgear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX_LIB}/&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX_LIB}/Flightgear make --jobs=${NR_JOBS} -- test_suite || true&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
== Instructions ==&lt;br /&gt;
*  [[MSYS]] &lt;br /&gt;
*  [[MinGW/cross-compiler]] &lt;br /&gt;
*  [[CodeBlocks IDE]] &lt;br /&gt;
*  [[OpenSUSE 10.1 10.2]] &lt;br /&gt;
* [http://www.geoffmclane.com/fg/fgmsvc7.htm MSVC7 *.Net]&lt;br /&gt;
* [http://www.oflebbe.de/oflebbe/FlightGear/index.html MSVC8 aka Visual 2005]&lt;br /&gt;
* [http://macflightgear.sourceforge.net/home/documents/ Mac OS X]&lt;br /&gt;
= Important note for GIT users =&lt;br /&gt;
As of latest development in GIT, only cmake is now required for building both SimGear and FlightGear. So if you build GIT (for what any reason) please don't try to use autogen.sh as it is removed from repository.&lt;br /&gt;
&lt;br /&gt;
For detailed instructions, see page [[Building_using_CMake|Building using cmake]].&lt;br /&gt;
&lt;br /&gt;
{{Building}}&lt;br /&gt;
&lt;br /&gt;
[[fr:Compiler FlightGear sous GNU/Linux]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=123439</id>
		<title>Building Flightgear - CentOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=123439"/>
		<updated>2020-04-13T16:43:12Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Preparation =&lt;br /&gt;
A &amp;quot;Minimal Install&amp;quot; of CentOS 8 (64 bits) is needed.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The user need  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages and add some repos.&lt;br /&gt;
&lt;br /&gt;
The following repos need to be added and enabled:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf config-manager --set-enabled PowerTools&lt;br /&gt;
 sudo dnf install epel-release&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;dnf&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install freeglut-devel.x86_64 openal-soft.x86_64 freetype-devel.x86_64 libjpeg-turbo-devel.x86_64 jasper-libs.x86_64 libxml2-devel.x86_64 libcurl-devel.x86_64 \&lt;br /&gt;
    cairo-devel.x86_64 poppler-glib.x86_64 librsvg2-devel.x86_64 gtk2-devel.x86_64 lua-libs.x86_64 lua.x86_64 fltk.x86_64 libpng-devel.x86_64 libtiff-devel.x86_64 \&lt;br /&gt;
    libXrandr-devel.x86_64 libXinerama-devel.x86_64 zlib-devel.x86_64 expat-devel.x86_64 boost.x86_64 openal-soft-devel.x86_64 cmake.x86_64 \&lt;br /&gt;
    mesa-libEGL-devel.x86_64 jasper-devel.x86_64 gstreamer1-devel.x86_64 SDL2-devel.x86_64 poppler-glib-devel.x86_64 lua-devel.x86_64 fltk-devel.x86_64 boost-devel.x86_64 \&lt;br /&gt;
    dbus-devel.x86_64 libevent-devel.x86_64 glew-devel.x86_64 qt5-qtdeclarative-devel.x86_64 qt5-qtsvg-devel.x86_64 qt5-linguist.x86_64&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;plib&amp;lt;/code&amp;gt; package is not available for CentOS 8. The package from CentOS 7 can be used instead. After downloading the following packages:&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-1.8.5-15.el7.x86_64.rpm.html plib-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-devel-1.8.5-15.el7.x86_64.rpm.html plib-devel-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
&lt;br /&gt;
The 2 packages can be installed manually using the following command:&lt;br /&gt;
&lt;br /&gt;
 sudo rpm --install plib-1.8.5-15.el7.x86_64.rpm &lt;br /&gt;
 sudo rpm --install plib-devel-1.8.5-15.el7.x86_64.rpm&lt;br /&gt;
&lt;br /&gt;
= Definitions =&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION&amp;lt;/code&amp;gt;: Version of OpenSceneGraph. For example: &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION=3.6.5&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
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 &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; such that the full path of the file will be &amp;lt;code&amp;gt;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following commands can be used to build OpenSceneGraph:&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 OPENSCENEGRAPH_SRC=${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}.tar.gz&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${OPENSCENEGRAPH_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=Release \&lt;br /&gt;
       -DBUILD_OSG_EXAMPLES:BOOL=ON \&lt;br /&gt;
       -DOSG_USE_LOCAL_LUA_SOURCE:BOOL=OFF \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DLIB_POSTFIX=64 \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Simgear =&lt;br /&gt;
The source code of Simgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Simgear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Simgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Simgear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Flightgear =&lt;br /&gt;
The source code of Flightgear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Flightgear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Flightgear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX}/lib64/&lt;br /&gt;
 FG_ROOT=${FGFS_PREFIX}/lib64/Flightgear make --jobs=${NR_JOBS} -- test_suite || true&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The data for Flightgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here].&lt;br /&gt;
 rm -f -- &amp;quot;${FGFS_PREFIX}/lib/FlightGear&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/lib/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 mkdir --parents -- &amp;quot;${FGFS_PREFIX}/lib/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/lib/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/FlightGear-${FLIGHTGEAR_VERSION}-data.tar.bz2&amp;quot;&lt;br /&gt;
 popd&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/lib64/&amp;quot;&lt;br /&gt;
 ln --symbolic -- &amp;quot;FlightGear-${FLIGHTGEAR_VERSION}/fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/lib64/&amp;quot;&lt;br /&gt;
 git clone --depth 1 https://git.code.sf.net/p/flightgear/fgdata flightgear-fgdata&lt;br /&gt;
 ln --symbolic -- &amp;quot;flightgear-fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/lib64/flightgear-fgdata/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
= Start Flightgear =&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}&amp;quot;&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX}/lib64/&lt;br /&gt;
 ./bin/fgfs&lt;br /&gt;
&lt;br /&gt;
[[Category:Building from source]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=121349</id>
		<title>Building Flightgear - CentOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=121349"/>
		<updated>2020-01-19T15:37:49Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under Construction}}&lt;br /&gt;
&lt;br /&gt;
= Preparation =&lt;br /&gt;
A &amp;quot;Minimal Install&amp;quot; of CentOS 8 (64 bits) is needed.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The user need  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages and add some repos.&lt;br /&gt;
&lt;br /&gt;
The following repos need to be added and enabled:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf config-manager --set-enabled PowerTools&lt;br /&gt;
 sudo dnf install epel-release&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;dnf&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install freeglut-devel.x86_64 openal-soft.x86_64 freetype-devel.x86_64 libjpeg-turbo-devel.x86_64 jasper-libs.x86_64 libxml2-devel.x86_64 libcurl-devel.x86_64 \&lt;br /&gt;
    cairo-devel.x86_64 poppler-glib.x86_64 librsvg2-devel.x86_64 gtk2-devel.x86_64 lua-libs.x86_64 lua.x86_64 fltk.x86_64 libpng-devel.x86_64 libtiff-devel.x86_64 \&lt;br /&gt;
    libXrandr-devel.x86_64 libXinerama-devel.x86_64 zlib-devel.x86_64 expat-devel.x86_64 boost.x86_64 openal-soft-devel.x86_64 cmake.x86_64 \&lt;br /&gt;
    mesa-libEGL-devel.x86_64 jasper-devel.x86_64 gstreamer1-devel.x86_64 SDL2-devel.x86_64 poppler-glib-devel.x86_64 lua-devel.x86_64 fltk-devel.x86_64 boost-devel.x86_64 \&lt;br /&gt;
    dbus-devel.x86_64 libevent-devel.x86_64 glew-devel.x86_64 qt5-qtdeclarative-devel.x86_64 qt5-qtsvg-devel.x86_64 qt5-linguist.x86_64&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;plib&amp;lt;/code&amp;gt; package is not available for CentOS 8. The package from CentOS 7 can be used instead. After downloading the following packages:&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-1.8.5-15.el7.x86_64.rpm.html plib-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-devel-1.8.5-15.el7.x86_64.rpm.html plib-devel-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
&lt;br /&gt;
The 2 packages can be installed manually using the following command:&lt;br /&gt;
&lt;br /&gt;
 sudo rpm --install plib-1.8.5-15.el7.x86_64.rpm &lt;br /&gt;
 sudo rpm --install plib-devel-1.8.5-15.el7.x86_64.rpm&lt;br /&gt;
&lt;br /&gt;
= Definitions =&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION&amp;lt;/code&amp;gt;: Version of OpenSceneGraph. For example: &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION=3.6.4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
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 &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; such that the full path of the file will be &amp;lt;code&amp;gt;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following commands can be used to build OpenSceneGraph:&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 OPENSCENEGRAPH_SRC=${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}.tar.gz&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${OPENSCENEGRAPH_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=Release \&lt;br /&gt;
       -DBUILD_OSG_EXAMPLES:BOOL=ON \&lt;br /&gt;
       -DOSG_USE_LOCAL_LUA_SOURCE:BOOL=OFF \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DLIB_POSTFIX=64 \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Simgear =&lt;br /&gt;
The source code of Simgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Simgear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Simgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Simgear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Flightgear =&lt;br /&gt;
The source code of Flightgear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Flightgear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Flightgear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The data for Flightgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here].&lt;br /&gt;
 rm -f -- &amp;quot;${FGFS_PREFIX}/lib/FlightGear&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/lib/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 mkdir --parents -- &amp;quot;${FGFS_PREFIX}/lib/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/lib/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/FlightGear-${FLIGHTGEAR_VERSION}-data.tar.bz2&amp;quot;&lt;br /&gt;
 popd&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/lib/&amp;quot;&lt;br /&gt;
 ln --symbolic -- &amp;quot;FlightGear-${FLIGHTGEAR_VERSION}/fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/lib64/&amp;quot;&lt;br /&gt;
 git clone --depth 1 https://git.code.sf.net/p/flightgear/fgdata flightgear-fgdata&lt;br /&gt;
 ln --symbolic -- &amp;quot;flightgear-fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/lib64/flightgear-fgdata/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
= Start Flightgear =&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}&amp;quot;&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX}/lib64&lt;br /&gt;
 ./bin/fgfs&lt;br /&gt;
&lt;br /&gt;
[[Category:Building from source]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=121348</id>
		<title>Building Flightgear - CentOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=121348"/>
		<updated>2020-01-19T12:49:43Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: Add data&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under Construction}}&lt;br /&gt;
&lt;br /&gt;
= Preparation =&lt;br /&gt;
A &amp;quot;Minimal Install&amp;quot; of CentOS 8 (64 bits) is needed.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The user need  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages and add some repos.&lt;br /&gt;
&lt;br /&gt;
The following repos need to be added and enabled:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf config-manager --set-enabled PowerTools&lt;br /&gt;
 sudo dnf install epel-release&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;dnf&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install freeglut-devel.x86_64 openal-soft.x86_64 freetype-devel.x86_64 libjpeg-turbo-devel.x86_64 jasper-libs.x86_64 libxml2-devel.x86_64 libcurl-devel.x86_64 \&lt;br /&gt;
    cairo-devel.x86_64 poppler-glib.x86_64 librsvg2-devel.x86_64 gtk2-devel.x86_64 lua-libs.x86_64 lua.x86_64 fltk.x86_64 libpng-devel.x86_64 libtiff-devel.x86_64 \&lt;br /&gt;
    libXrandr-devel.x86_64 libXinerama-devel.x86_64 zlib-devel.x86_64 expat-devel.x86_64 boost.x86_64 openal-soft-devel.x86_64 cmake.x86_64 \&lt;br /&gt;
    mesa-libEGL-devel.x86_64 jasper-devel.x86_64 gstreamer1-devel.x86_64 SDL2-devel.x86_64 poppler-glib-devel.x86_64 lua-devel.x86_64 fltk-devel.x86_64 boost-devel.x86_64 \&lt;br /&gt;
    dbus-devel.x86_64 libevent-devel.x86_64 glew-devel.x86_64 qt5-qtdeclarative-devel.x86_64 qt5-qtsvg-devel.x86_64 qt5-linguist.x86_64&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;plib&amp;lt;/code&amp;gt; package is not available for CentOS 8. The package from CentOS 7 can be used instead. After downloading the following packages:&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-1.8.5-15.el7.x86_64.rpm.html plib-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-devel-1.8.5-15.el7.x86_64.rpm.html plib-devel-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
&lt;br /&gt;
The 2 packages can be installed manually using the following command:&lt;br /&gt;
&lt;br /&gt;
 sudo rpm --install plib-1.8.5-15.el7.x86_64.rpm &lt;br /&gt;
 sudo rpm --install plib-devel-1.8.5-15.el7.x86_64.rpm&lt;br /&gt;
&lt;br /&gt;
= Definitions =&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION&amp;lt;/code&amp;gt;: Version of OpenSceneGraph. For example: &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION=3.6.4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
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 &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; such that the full path of the file will be &amp;lt;code&amp;gt;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following commands can be used to build OpenSceneGraph:&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 OPENSCENEGRAPH_SRC=${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}.tar.gz&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${OPENSCENEGRAPH_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=Release \&lt;br /&gt;
       -DBUILD_OSG_EXAMPLES:BOOL=ON \&lt;br /&gt;
       -DOSG_USE_LOCAL_LUA_SOURCE:BOOL=OFF \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DLIB_POSTFIX=64 \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Simgear =&lt;br /&gt;
The source code of Simgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Simgear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Simgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Simgear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Flightgear =&lt;br /&gt;
The source code of Flightgear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Flightgear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Flightgear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The data for Flightgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here].&lt;br /&gt;
 rm -f -- &amp;quot;${FGFS_PREFIX}/lib/FlightGear&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/lib/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 mkdir --parents -- &amp;quot;${FGFS_PREFIX}/lib/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/lib/FlightGear-${FLIGHTGEAR_VERSION}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/FlightGear-${FLIGHTGEAR_VERSION}-data.tar.bz2&amp;quot;&lt;br /&gt;
 popd&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/lib/&amp;quot;&lt;br /&gt;
 ln --symbolic -- &amp;quot;FlightGear-${FLIGHTGEAR_VERSION}/fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/lib64/&amp;quot;&lt;br /&gt;
 git clone --depth 1 https://git.code.sf.net/p/flightgear/fgdata flightgear-fgdata&lt;br /&gt;
 ln --symbolic -- &amp;quot;flightgear-fgdata/&amp;quot; FlightGear&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/lib64/flightgear-fgdata/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
= Start Flightgear =&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}&amp;quot;&lt;br /&gt;
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FGFS_PREFIX}/lib64&lt;br /&gt;
 ./bin/fgfs&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=121346</id>
		<title>Building Flightgear - CentOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=121346"/>
		<updated>2020-01-18T22:38:44Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: Add Qt5&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under Construction}}&lt;br /&gt;
&lt;br /&gt;
= Preparation =&lt;br /&gt;
A &amp;quot;Minimal Install&amp;quot; of CentOS 8 (64 bits) is needed.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The user need  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages and add some repos.&lt;br /&gt;
&lt;br /&gt;
The following repos need to be added and enabled:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf config-manager --set-enabled PowerTools&lt;br /&gt;
 sudo dnf install epel-release&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;dnf&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install freeglut-devel.x86_64 openal-soft.x86_64 freetype-devel.x86_64 libjpeg-turbo-devel.x86_64 jasper-libs.x86_64 libxml2-devel.x86_64 libcurl-devel.x86_64 \&lt;br /&gt;
    cairo-devel.x86_64 poppler-glib.x86_64 librsvg2-devel.x86_64 gtk2-devel.x86_64 lua-libs.x86_64 lua.x86_64 fltk.x86_64 libpng-devel.x86_64 libtiff-devel.x86_64 \&lt;br /&gt;
    libXrandr-devel.x86_64 libXinerama-devel.x86_64 zlib-devel.x86_64 expat-devel.x86_64 boost.x86_64 openal-soft-devel.x86_64 cmake.x86_64 \&lt;br /&gt;
    mesa-libEGL-devel.x86_64 jasper-devel.x86_64 gstreamer1-devel.x86_64 SDL2-devel.x86_64 poppler-glib-devel.x86_64 lua-devel.x86_64 fltk-devel.x86_64 boost-devel.x86_64 \&lt;br /&gt;
    dbus-devel.x86_64 libevent-devel.x86_64 glew-devel.x86_64 qt5-qtdeclarative-devel.x86_64 qt5-qtsvg-devel.x86_64 qt5-linguist.x86_64&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;plib&amp;lt;/code&amp;gt; package is not available for CentOS 8. The package from CentOS 7 can be used instead. After downloading the following packages:&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-1.8.5-15.el7.x86_64.rpm.html plib-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-devel-1.8.5-15.el7.x86_64.rpm.html plib-devel-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
&lt;br /&gt;
The 2 packages can be installed manually using the following command:&lt;br /&gt;
&lt;br /&gt;
 sudo rpm --install plib-1.8.5-15.el7.x86_64.rpm &lt;br /&gt;
 sudo rpm --install plib-devel-1.8.5-15.el7.x86_64.rpm&lt;br /&gt;
&lt;br /&gt;
= Definitions =&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION&amp;lt;/code&amp;gt;: Version of OpenSceneGraph. For example: &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION=3.6.4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
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 &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; such that the full path of the file will be &amp;lt;code&amp;gt;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following commands can be used to build OpenSceneGraph:&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 OPENSCENEGRAPH_SRC=${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}.tar.gz&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${OPENSCENEGRAPH_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=Release \&lt;br /&gt;
       -DBUILD_OSG_EXAMPLES:BOOL=ON \&lt;br /&gt;
       -DOSG_USE_LOCAL_LUA_SOURCE:BOOL=OFF \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DLIB_POSTFIX=64 \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Simgear =&lt;br /&gt;
The source code of Simgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Simgear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Simgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Simgear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Flightgear =&lt;br /&gt;
The source code of Flightgear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Flightgear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Flightgear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=121345</id>
		<title>Building Flightgear - CentOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=121345"/>
		<updated>2020-01-18T17:46:04Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: Fix OSG build: lib64&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under Construction}}&lt;br /&gt;
&lt;br /&gt;
= Preparation =&lt;br /&gt;
A &amp;quot;Minimal Install&amp;quot; of CentOS 8 (64 bits) is needed.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The user need  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages and add some repos.&lt;br /&gt;
&lt;br /&gt;
The following repos need to be added and enabled:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf config-manager --set-enabled PowerTools&lt;br /&gt;
 sudo dnf install epel-release&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;dnf&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install freeglut-devel.x86_64 openal-soft.x86_64 freetype-devel.x86_64 libjpeg-turbo-devel.x86_64 jasper-libs.x86_64 libxml2-devel.x86_64 libcurl-devel.x86_64 \&lt;br /&gt;
    cairo-devel.x86_64 poppler-glib.x86_64 librsvg2-devel.x86_64 gtk2-devel.x86_64 lua-libs.x86_64 lua.x86_64 fltk.x86_64 libpng-devel.x86_64 libtiff-devel.x86_64 \&lt;br /&gt;
    libXrandr-devel.x86_64 libXinerama-devel.x86_64 zlib-devel.x86_64 expat-devel.x86_64 boost.x86_64 openal-soft-devel.x86_64 cmake.x86_64 \&lt;br /&gt;
    mesa-libEGL-devel.x86_64 jasper-devel.x86_64 gstreamer1-devel.x86_64 SDL2-devel.x86_64 poppler-glib-devel.x86_64 lua-devel.x86_64 fltk-devel.x86_64 boost-devel.x86_64 \&lt;br /&gt;
    dbus-devel.x86_64 libevent-devel.x86_64 glew-devel.x86_64&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;plib&amp;lt;/code&amp;gt; package is not available for CentOS 8. The package from CentOS 7 can be used instead. After downloading the following packages:&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-1.8.5-15.el7.x86_64.rpm.html plib-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-devel-1.8.5-15.el7.x86_64.rpm.html plib-devel-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
&lt;br /&gt;
The 2 packages can be installed manually using the following command:&lt;br /&gt;
&lt;br /&gt;
 sudo rpm --install plib-1.8.5-15.el7.x86_64.rpm &lt;br /&gt;
 sudo rpm --install plib-devel-1.8.5-15.el7.x86_64.rpm&lt;br /&gt;
&lt;br /&gt;
= Definitions =&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION&amp;lt;/code&amp;gt;: Version of OpenSceneGraph. For example: &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION=3.6.4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
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 &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; such that the full path of the file will be &amp;lt;code&amp;gt;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following commands can be used to build OpenSceneGraph:&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 OPENSCENEGRAPH_SRC=${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}.tar.gz&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${OPENSCENEGRAPH_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=Release \&lt;br /&gt;
       -DBUILD_OSG_EXAMPLES:BOOL=ON \&lt;br /&gt;
       -DOSG_USE_LOCAL_LUA_SOURCE:BOOL=OFF \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DLIB_POSTFIX=64 \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Simgear =&lt;br /&gt;
The source code of Simgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Simgear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Simgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Simgear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Flightgear =&lt;br /&gt;
The source code of Flightgear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Flightgear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Flightgear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=121344</id>
		<title>Building Flightgear - CentOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=121344"/>
		<updated>2020-01-18T11:38:31Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under Construction}}&lt;br /&gt;
&lt;br /&gt;
= Preparation =&lt;br /&gt;
A &amp;quot;Minimal Install&amp;quot; of CentOS 8 (64 bits) is needed.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The user need  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages and add some repos.&lt;br /&gt;
&lt;br /&gt;
The following repos need to be added and enabled:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf config-manager --set-enabled PowerTools&lt;br /&gt;
 sudo dnf install epel-release&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;dnf&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install freeglut-devel.x86_64 openal-soft.x86_64 freetype-devel.x86_64 libjpeg-turbo-devel.x86_64 jasper-libs.x86_64 libxml2-devel.x86_64 libcurl-devel.x86_64 \&lt;br /&gt;
    cairo-devel.x86_64 poppler-glib.x86_64 librsvg2-devel.x86_64 gtk2-devel.x86_64 lua-libs.x86_64 lua.x86_64 fltk.x86_64 libpng-devel.x86_64 libtiff-devel.x86_64 \&lt;br /&gt;
    libXrandr-devel.x86_64 libXinerama-devel.x86_64 zlib-devel.x86_64 expat-devel.x86_64 boost.x86_64 openal-soft-devel.x86_64 cmake.x86_64 \&lt;br /&gt;
    mesa-libEGL-devel.x86_64 jasper-devel.x86_64 gstreamer1-devel.x86_64 SDL2-devel.x86_64 poppler-glib-devel.x86_64 lua-devel.x86_64 fltk-devel.x86_64 boost-devel.x86_64 \&lt;br /&gt;
    dbus-devel.x86_64 libevent-devel.x86_64 glew-devel.x86_64&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;plib&amp;lt;/code&amp;gt; package is not available for CentOS 8. The package from CentOS 7 can be used instead. After downloading the following packages:&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-1.8.5-15.el7.x86_64.rpm.html plib-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-devel-1.8.5-15.el7.x86_64.rpm.html plib-devel-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
&lt;br /&gt;
The 2 packages can be installed manually using the following command:&lt;br /&gt;
&lt;br /&gt;
 sudo rpm --install plib-1.8.5-15.el7.x86_64.rpm &lt;br /&gt;
 sudo rpm --install plib-devel-1.8.5-15.el7.x86_64.rpm&lt;br /&gt;
&lt;br /&gt;
= Definitions =&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;. All the source code must be located under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; and the installation will be done under the directory &amp;lt;code&amp;gt;${FGFS_PREFIX}&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;${FGFS_PREFIX}/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/include&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;${FGFS_PREFIX}/lib&amp;lt;/code&amp;gt;,...&lt;br /&gt;
* &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION&amp;lt;/code&amp;gt;: Version of OpenSceneGraph. For example: &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION=3.6.4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
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 &amp;lt;code&amp;gt;${FGFS_PREFIX}/src&amp;lt;/code&amp;gt; such that the full path of the file will be &amp;lt;code&amp;gt;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following commands can be used to build OpenSceneGraph:&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 OPENSCENEGRAPH_SRC=${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}.tar.gz&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${OPENSCENEGRAPH_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=Release \&lt;br /&gt;
       -DBUILD_OSG_EXAMPLES:BOOL=ON \&lt;br /&gt;
       -DOSG_USE_LOCAL_LUA_SOURCE:BOOL=OFF \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Simgear =&lt;br /&gt;
The source code of Simgear can be provided:&lt;br /&gt;
* as an official release that can be downloaded from [https://sourceforge.net/projects/flightgear/files/ here]. The environment variable &amp;lt;code&amp;gt;SIMGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Simgear, for example &amp;lt;code&amp;gt;SIMGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/simgear-${SIMGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Simgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Simgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 SIMGEAR_SRC=${FGFS_PREFIX}/src/flightgear-simgear&lt;br /&gt;
 pushd -- &amp;quot;${SIMGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Simgear is available under the directory &amp;lt;code&amp;gt;${SIMGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Flightgear =&lt;br /&gt;
The source code of Flightgear can be provided:&lt;br /&gt;
* 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 &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION&amp;lt;/code&amp;gt; must be set to the relevant version of Flightgear, for example &amp;lt;code&amp;gt;FLIGHTGEAR_VERSION=2019.1.1&amp;lt;/code&amp;gt; and then using the following commands to extract the source code:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/flightgear-${FLIGHTGEAR_VERSION}.tar.bz2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* as a clone of the Flightgear Git repo by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
&lt;br /&gt;
* if you have already a clone of the Flightgear Git repo, the local copy can be updated using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 FLIGHTGEAR_SRC=${FGFS_PREFIX}/src/flightgear-flightgear&lt;br /&gt;
 pushd -- &amp;quot;${FLIGHTGEAR_SRC}/&amp;quot;&lt;br /&gt;
 git pull&lt;br /&gt;
 popd&lt;br /&gt;
&lt;br /&gt;
Now that the source code of Flightgear is available under the directory &amp;lt;code&amp;gt;${FLIGHTGEAR_SRC}&amp;lt;/code&amp;gt;, the build can be started using the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=121343</id>
		<title>Building Flightgear - CentOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=121343"/>
		<updated>2020-01-18T10:46:39Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: Under construction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under Construction}}&lt;br /&gt;
&lt;br /&gt;
= Preparation =&lt;br /&gt;
A &amp;quot;Minimal Install&amp;quot; of CentOS 8 (64 bits) is needed.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The user need  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages and add some repos.&lt;br /&gt;
&lt;br /&gt;
The following repos need to be added and enabled:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf config-manager --set-enabled PowerTools&lt;br /&gt;
 sudo dnf install epel-release&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;dnf&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install freeglut-devel.x86_64 openal-soft.x86_64 freetype-devel.x86_64 libjpeg-turbo-devel.x86_64 jasper-libs.x86_64 libxml2-devel.x86_64 libcurl-devel.x86_64 \&lt;br /&gt;
    cairo-devel.x86_64 poppler-glib.x86_64 librsvg2-devel.x86_64 gtk2-devel.x86_64 lua-libs.x86_64 lua.x86_64 fltk.x86_64 libpng-devel.x86_64 libtiff-devel.x86_64 \&lt;br /&gt;
    libXrandr-devel.x86_64 libXinerama-devel.x86_64 zlib-devel.x86_64 expat-devel.x86_64 boost.x86_64 openal-soft-devel.x86_64 cmake.x86_64 \&lt;br /&gt;
    mesa-libEGL-devel.x86_64 jasper-devel.x86_64 gstreamer1-devel.x86_64 SDL2-devel.x86_64 poppler-glib-devel.x86_64 lua-devel.x86_64 fltk-devel.x86_64 boost-devel.x86_64 \&lt;br /&gt;
    dbus-devel.x86_64 libevent-devel.x86_64 glew-devel.x86_64&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;plib&amp;lt;/code&amp;gt; package is not available for CentOS 8. The package from CentOS 7 can be used instead. After downloading the following packages:&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-1.8.5-15.el7.x86_64.rpm.html plib-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-devel-1.8.5-15.el7.x86_64.rpm.html plib-devel-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
&lt;br /&gt;
The 2 packages can be installed manually using the following command:&lt;br /&gt;
&lt;br /&gt;
 sudo rpm --install plib-1.8.5-15.el7.x86_64.rpm &lt;br /&gt;
 sudo rpm --install plib-devel-1.8.5-15.el7.x86_64.rpm&lt;br /&gt;
&lt;br /&gt;
= Definitions =&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION&amp;lt;/code&amp;gt;: Version of OpenSceneGraph. For example: &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION=3.6.4&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
OpenSceneGraph is not available as a RPM for CentOS 8 and, for this reason, needs to build from sources. The latest stable version of OpenSceneGraph can be downloaded from [http://www.openscenegraph.org/index.php/download-section/stable-releases here].&lt;br /&gt;
&lt;br /&gt;
The following commands can be used to build OpenSceneGraph:&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 OPENSCENEGRAPH_SRC=${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}.tar.gz&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${OPENSCENEGRAPH_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=Release \&lt;br /&gt;
       -DBUILD_OSG_EXAMPLES:BOOL=ON \&lt;br /&gt;
       -DOSG_USE_LOCAL_LUA_SOURCE:BOOL=OFF \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Simgear =&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Flightgear =&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=121339</id>
		<title>Building Flightgear - CentOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_Flightgear_-_CentOS&amp;diff=121339"/>
		<updated>2020-01-17T23:10:52Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: Initial version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Preparation =&lt;br /&gt;
A &amp;quot;Minimal Install&amp;quot; of CentOS 8 (64 bits) is needed.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
All the commands are run in &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; as normal user (not &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;). The user need  &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; access to install packages and add some repos.&lt;br /&gt;
&lt;br /&gt;
The following repos need to be added and enabled:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf config-manager --set-enabled PowerTools&lt;br /&gt;
 sudo dnf install epel-release&lt;br /&gt;
&lt;br /&gt;
The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the &amp;lt;code&amp;gt;dnf&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install freeglut-devel.x86_64 openal-soft.x86_64 freetype-devel.x86_64 libjpeg-turbo-devel.x86_64 jasper-libs.x86_64 libxml2-devel.x86_64 libcurl-devel.x86_64 \&lt;br /&gt;
    cairo-devel.x86_64 poppler-glib.x86_64 librsvg2-devel.x86_64 gtk2-devel.x86_64 lua-libs.x86_64 lua.x86_64 fltk.x86_64 libpng-devel.x86_64 libtiff-devel.x86_64 \&lt;br /&gt;
    libXrandr-devel.x86_64 libXinerama-devel.x86_64 zlib-devel.x86_64 expat-devel.x86_64 boost.x86_64 openal-soft-devel.x86_64 cmake.x86_64 \&lt;br /&gt;
    mesa-libEGL-devel.x86_64 jasper-devel.x86_64 gstreamer1-devel.x86_64 SDL2-devel.x86_64 poppler-glib-devel.x86_64 lua-devel.x86_64 fltk-devel.x86_64 boost-devel.x86_64 \&lt;br /&gt;
    dbus-devel.x86_64 libevent-devel.x86_64 glew-devel.x86_64&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;plib&amp;lt;/code&amp;gt; package is not available for CentOS 8. The package from CentOS 7 can be used instead. After downloading the following packages:&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-1.8.5-15.el7.x86_64.rpm.html plib-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
* [https://centos.pkgs.org/7/epel-x86_64/plib-devel-1.8.5-15.el7.x86_64.rpm.html plib-devel-1.8.5-15.el7.x86_64.rpm]&lt;br /&gt;
&lt;br /&gt;
The 2 packages can be installed manually using the following command:&lt;br /&gt;
&lt;br /&gt;
 sudo rpm --install plib-1.8.5-15.el7.x86_64.rpm &lt;br /&gt;
 sudo rpm --install plib-devel-1.8.5-15.el7.x86_64.rpm&lt;br /&gt;
&lt;br /&gt;
= Definitions =&lt;br /&gt;
The following environment variables must be set because they will be used in shell commands:&lt;br /&gt;
* &amp;lt;code&amp;gt;NR_JOBS&amp;lt;/code&amp;gt;: Number of jobs for parallel compilation. For example: &amp;lt;code&amp;gt;NR_JOBS=$(/usr/bin/nproc)&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;FGFS_PREFIX&amp;lt;/code&amp;gt;: Prefix of the Flightgear installation. For example: &amp;lt;code&amp;gt;FGFS_PREFIX=${HOME}/Flightgear&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION&amp;lt;/code&amp;gt;: Version of OpenSceneGraph. For example: &amp;lt;code&amp;gt;OPENSCENEGRAPH_VERSION=3.6.4&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= OpenSceneGraph =&lt;br /&gt;
OpenSceneGraph is not available as a RPM for CentOS 8 and, for this reason, needs to build from sources. The latest stable version of OpenSceneGraph can be downloaded from [http://www.openscenegraph.org/index.php/download-section/stable-releases here].&lt;br /&gt;
&lt;br /&gt;
The following commands can be used to build OpenSceneGraph:&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 OPENSCENEGRAPH_SRC=${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 tar axvf &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph-OpenSceneGraph-${OPENSCENEGRAPH_VERSION}.tar.gz&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${OPENSCENEGRAPH_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=Release \&lt;br /&gt;
       -DBUILD_OSG_EXAMPLES:BOOL=ON \&lt;br /&gt;
       -DOSG_USE_LOCAL_LUA_SOURCE:BOOL=OFF \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${OPENSCENEGRAPH_SRC}/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/OpenSceneGraph_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Simgear =&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${SIMGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/sg_build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Flightgear =&lt;br /&gt;
&lt;br /&gt;
 cd -- &amp;quot;${FGFS_PREFIX}/src/&amp;quot;&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 mkdir -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 pushd -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;br /&gt;
 cmake &amp;quot;${FLIGHTGEAR_SRC}&amp;quot; \&lt;br /&gt;
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \&lt;br /&gt;
       -DCMAKE_INSTALL_PREFIX=&amp;quot;${FGFS_PREFIX}&amp;quot; \&lt;br /&gt;
       -DCMAKE_VERBOSE_MAKEFILE=TRUE&lt;br /&gt;
 make --jobs=${NR_JOBS}&lt;br /&gt;
 make -- test&lt;br /&gt;
 make -- install&lt;br /&gt;
 popd&lt;br /&gt;
 rm -Rf -- &amp;quot;${FGFS_PREFIX}/src/fg_build/&amp;quot;&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=121338</id>
		<title>Building FlightGear - Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Linux&amp;diff=121338"/>
		<updated>2020-01-17T22:08:28Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: Add CentOS&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Main article|Building Flightgear}} &lt;br /&gt;
&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
This section describes how to build [[FlightGear]] on Linux system.&lt;br /&gt;
&lt;br /&gt;
Compiling FlightGear is not a task for novice users. Thus, if you're a beginner (we all were once) on a platform which binaries are available for, we recommend postponing this task and just starting with the binary distribution to get you flying.&lt;br /&gt;
&lt;br /&gt;
openSUSE also provides binary packages of the latest development version, which are continuously updated.&lt;br /&gt;
Follow [http://software.opensuse.org/download.html?lang=en&amp;amp;project=games:FlightGear:Unstable&amp;amp;package=fgrun this link] to select your openSUSE version and install, or manually add ''games:FlightGear:Unstable'' to your ''YaST Software Repositories''.&lt;br /&gt;
&lt;br /&gt;
For Ubuntu, there is a PPA that provides the latest development version of FlightGear and SimGear and a recent version of FlightGear data. See [https://launchpad.net/~saiarcot895/+archive/flightgear-edge this page] for more info. To add the PPA, run &amp;lt;tt&amp;gt;sudo apt-add-repository ppa:saiarcot895/flightgear-edge&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Or if you develop on Ubuntu or Debian, consider trying the script described in [[Scripted Compilation on Linux Debian/Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
== Distro-specific instructions ==&lt;br /&gt;
=== Debian/Ubuntu ===&lt;br /&gt;
* You can use the [[Scripted Compilation on Linux Debian/Ubuntu]] script to have Flightgear compiled in one shot under both Ubuntu and Debian systems.&lt;br /&gt;
* Debian users who prefer to build it without script may look at [[Building Flightgear - Debian]].&lt;br /&gt;
* Hints for [[Ubuntu]] users.&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
* Gentoo users can also use overlays to build FlightGear without much hassle: [[Building Flightgear - Gentoo]].&lt;br /&gt;
&lt;br /&gt;
=== CentOS ===&lt;br /&gt;
CentOS users can follow these instructions to build FlightGear on [[Building Flightgear - CentOS | CentOS 8]].&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
{{Note|as of 12/2017, people may have to build using at least OSG 3.4 due to some compilation issues -for details, refer to [[Howto:Building FlightGear without HiDPI support]]}}&lt;br /&gt;
Edit 12/9/15 - These instructions are out of date! Do not use for compiling.&lt;br /&gt;
&lt;br /&gt;
Before you can compile FlightGear, you need to have the following installed on your computer:&lt;br /&gt;
&lt;br /&gt;
'''C++ compiler'''&lt;br /&gt;
&lt;br /&gt;
These are: c++, cpp, gcc, g++ found under the &amp;lt;code&amp;gt;/usr/bin&amp;lt;/code&amp;gt; directory.  You will also need to have the tools '''autoconf''' and '''automake1.9''' installed.&lt;br /&gt;
&lt;br /&gt;
'''GIT'''&lt;br /&gt;
&lt;br /&gt;
See [[FlightGear and Git]].&lt;br /&gt;
&lt;br /&gt;
'''[[OpenGL]] support'''&lt;br /&gt;
&lt;br /&gt;
More specifically, your system needs the support for hardware accelerated graphics.  You can check for this by running the following in a [[command line]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ glxinfo | grep direct&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: To run the above command, you need to have the tool '''mesa-utils''' installed.&lt;br /&gt;
&lt;br /&gt;
You should then see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: Yes&lt;br /&gt;
&lt;br /&gt;
This means you are good to go as far as OpenGL support is concerned.&lt;br /&gt;
&lt;br /&gt;
If you see:&lt;br /&gt;
&lt;br /&gt;
 direct rendering: No&lt;br /&gt;
&lt;br /&gt;
Don't panic yet.  This may just mean some required libraries for hardware accelerated graphic are missing.  Go ahead and try installing '''plib 1.8.5''' and its dependencies first.  If you still get the above message, then you will need to do some googling and troubleshoot yourself.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
FlightGear is dependent on quite a few number of libraries.  You do not need to compile all of them yourself, but you will at least need to have their development version installed.  For example, the development version for package &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;plib1.8.5&amp;lt;/tt&amp;gt;'''-dev'''.&lt;br /&gt;
&lt;br /&gt;
The dependency is summarized in the following tree.  Please note that each library has its own dependencies, and most of these are not shown here.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;FlightGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
** [http://kcat.strangesoft.net/openal.html &amp;lt;tt&amp;gt;OpenAL&amp;lt;/tt&amp;gt;]&lt;br /&gt;
** &amp;lt;tt&amp;gt;SimGear&amp;lt;/tt&amp;gt;&lt;br /&gt;
*** [http://plib.sourceforge.net/ &amp;lt;tt&amp;gt;PLIB&amp;lt;/tt&amp;gt;]. Since March 2008, you will need version 1.8.5 - your distro probably supplies 1.8.4 still.&lt;br /&gt;
**** For versions pre March 2008: (Free)&amp;lt;tt&amp;gt;GLUT&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; (We recommend the use of &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; over &amp;lt;tt&amp;gt;Free/GLUT&amp;lt;/tt&amp;gt;, [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg16153.html however since March 2008, &amp;lt;tt&amp;gt;FreeGLUT&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;SDL&amp;lt;/tt&amp;gt; are both considered deprecated], please only use &amp;lt;code&amp;gt;--enable-osgviewer&amp;lt;/code&amp;gt; during configuration instead) &lt;br /&gt;
***  &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt;  (check link for compatible versions)&lt;br /&gt;
*** You also need the development files for several basic libraries to build the software, among them the following (the package names are for Debian and derivatives(?)):&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libfreetype6-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libjpeg62-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libungif4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libtiff4-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libpng12-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxmu-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libxi-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;zlib1g-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
**** &amp;lt;tt&amp;gt;libglut3-dev&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you attack the above dependencies in the order listed below, you should be good:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; Most distributions include glut packages, although you may have to hunt for them. Make sure you install both the &amp;lt;tt&amp;gt;glut&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;glut-devel&amp;lt;/tt&amp;gt; packages, otherwise FlightGear may be able to compile but won't run correctly.&lt;br /&gt;
# &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; Most distributions install the basic &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt; libraries by default, but not the development portions. If you don't have &amp;lt;tt&amp;gt;zlib.h&amp;lt;/tt&amp;gt;, you probably need to install the &amp;lt;tt&amp;gt;zlib-devel&amp;lt;/tt&amp;gt; package for your distribution. &lt;br /&gt;
# &amp;lt;tt&amp;gt;plib&amp;lt;/tt&amp;gt; Portability libraries and scene graph. &lt;br /&gt;
# &amp;lt;tt&amp;gt;[[OpenSceneGraph]]&amp;lt;/tt&amp;gt; &lt;br /&gt;
# &amp;lt;tt&amp;gt;simgear&amp;lt;/tt&amp;gt; Simulation support libraries. If you are building FlightGear from Git, you need the Git version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.&lt;br /&gt;
&lt;br /&gt;
== Compiling ==&lt;br /&gt;
Assuming you are root, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# cd /usr/local/src&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' When tracking a fast changing software like FlightGear/Git it is highly advisable to install it in a separate directory. That way one can also easily build and reinstall without being root, which greatly reduces the risk of messing up one's system.&lt;br /&gt;
To install in a directory of your choice add the &amp;lt;tt&amp;gt;--prefix&amp;lt;/tt&amp;gt; argument to configure. E.g. &amp;lt;tt&amp;gt;./configure --prefix=$HOME/FlightGear&amp;lt;/tt&amp;gt;. I would recommend installing all of OSG, plib, SimGear and FlightGear with the same prefix.&lt;br /&gt;
&lt;br /&gt;
=== Getting and compiling SimGear ===&lt;br /&gt;
&lt;br /&gt;
'''Step 1:'''&lt;br /&gt;
&lt;br /&gt;
Clone the SimGear git repository and set it up to track the 'next' branch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone git://git.code.sf.net/p/flightgear/simgear simgear&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or if the git port is firewalled on you network, use the http transport&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://git.code.sf.net/p/flightgear/simgear simgear&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default after cloning you should have a local next branch that tracks the master next branch. It can be updated it with &amp;lt;code&amp;gt;git pull&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Step 2:'''&lt;br /&gt;
&lt;br /&gt;
The source code will be downloaded into a directory called '''simgear'''.&lt;br /&gt;
&lt;br /&gt;
Next, go into the directory and make preparations for the compilation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd simgear&lt;br /&gt;
$ cmake .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
'''Note''' that if you don't want to install &amp;lt;tt&amp;gt;simgear&amp;lt;/tt&amp;gt; globally on the system but in a specific directory, you can do so by adding &amp;lt;code&amp;gt;-DCMAKE_INSTALL_PREFIX=/path/to/your/fgInstallation&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; command&lt;br /&gt;
&lt;br /&gt;
'''Step 3:'''&lt;br /&gt;
&lt;br /&gt;
Compile and install SimGear by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ make; make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' with &amp;lt;tt&amp;gt;gcc&amp;lt;/tt&amp;gt; 4.2 or later,on some platforms, you can get compiling errors about &amp;lt;tt&amp;gt;alc.h&amp;lt;/tt&amp;gt; like: &lt;br /&gt;
&lt;br /&gt;
 '&amp;lt;anonymous&amp;gt;' has incomplete type &lt;br /&gt;
take a look at http://bugs.gentoo.org/166723&lt;br /&gt;
&lt;br /&gt;
=== Getting and compiling FlightGear ===&lt;br /&gt;
&lt;br /&gt;
'''Step 1:'''&lt;br /&gt;
&lt;br /&gt;
Clone the FlightGear git repository and set it up to track the 'next' branch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone git://git.code.sf.net/p/flightgear/flightgear&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default after cloning you should have a local next branch that tracks the master next branch. It can be updated it with git pull.&lt;br /&gt;
&lt;br /&gt;
'''Step 2:'''&lt;br /&gt;
&lt;br /&gt;
Next, go into the folder and make preparations for the compilation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd flightgear&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you don't want to install simgear globally on the system but in a specific directory, you can do so by adding --prefix=/path/to/your/fgInstallation to the ./configure command.&lt;br /&gt;
If you didn't install OSG globally or in the same prefix as SimGear and FlightGear, you have to pass the OSG directory to the configure-command like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ ./configure --prefix=/path/to/fgInstallation --with-osg=/path/to/osg/installation --enable-osgviewer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case you have to tell your system where to find the OSG libraries before you can run flightgear:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ export LD_LIBRARY_PATH=/path/to/osgInstallation/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Step 3:'''&lt;br /&gt;
&lt;br /&gt;
Now you can compile and install Flightgear by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ make; make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Step 4:'''&lt;br /&gt;
&lt;br /&gt;
Clone the data directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone git://git.code.sf.net/p/flightgear/fgdata&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data directory is large (almost 2.5GB) so it will take considerable time to download.&lt;br /&gt;
There mirror of fgdata that might be faster to download from:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone git://mapserver.flightgear.org/fgdata&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mirror is synchronized with the master so either will do.&lt;br /&gt;
&lt;br /&gt;
And install it in (or as) /usr/local/share/FlightGear&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ mv fgdata /usr/local/share/flightgear&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
=== Instructions ===&lt;br /&gt;
*  [[MSYS]] &lt;br /&gt;
*  [[MinGW/cross-compiler]] &lt;br /&gt;
*  [[CodeBlocks IDE]] &lt;br /&gt;
*  [[OpenSUSE 10.1 10.2]] &lt;br /&gt;
* [http://www.geoffmclane.com/fg/fgmsvc7.htm MSVC7 *.Net]&lt;br /&gt;
* [http://www.oflebbe.de/oflebbe/FlightGear/index.html MSVC8 aka Visual 2005]&lt;br /&gt;
* [http://macflightgear.sourceforge.net/home/documents/ Mac OS X]&lt;br /&gt;
== Important note for GIT users ==&lt;br /&gt;
As of latest development in GIT, only cmake is now required for building both SimGear and FlightGear. So if you build GIT (for what any reason) please don't try to use autogen.sh as it is removed from repository.&lt;br /&gt;
&lt;br /&gt;
For detailed instructions, see page [[Building_using_CMake|Building using cmake]].&lt;br /&gt;
&lt;br /&gt;
{{Building}}&lt;br /&gt;
&lt;br /&gt;
[[fr:Compiler FlightGear sous GNU/Linux]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=FGPanel&amp;diff=107699</id>
		<title>FGPanel</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=FGPanel&amp;diff=107699"/>
		<updated>2017-04-28T18:49:30Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: Add FGPanel for Raspberry Pi&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:FGPanel_SenecaII.png|thumb|300px|The 2D panel of a [[SenecaII]].]]&lt;br /&gt;
'''FGPanel''' is designed as a standalone lightweight panel rendering engine to draw 2D panels on a low-cost computer/graphic card without 3D acceleration at reasonable frame rates.&lt;br /&gt;
&lt;br /&gt;
FGPanel was not part of the FlightGear 2.4.0 release for Windows. Windows users can get the executable from [http://flightgear.simpits.org:8080/job/FlightGear-Win-Cmake/lastSuccessfulBuild/artifact/install/msvc100/FlightGear/bin/fgpanel.exe Jenkins].&lt;br /&gt;
&lt;br /&gt;
== FGPanel Live System ==&lt;br /&gt;
[[File:C172MiniCockpit1.jpg|thumb|200px|right|A complete display setup for the [[Cessna C172P]] using FGPanel.]]&lt;br /&gt;
FGPanel is now available as a ''Live System'', a complete, stand-alone software setup, including FGPanel, (partial) FGData, Linux operating system and necessary start-up scripts. The ISO image (350MB download) needs to be programmed on a CD/DVD, USB flash or hard disk drive. Just insert the CD/DVD or connect the USB/HDD drive to your (old) PC, add an (old) graphics card, and an (old) TFT or monitor - and you've made the first step to your own cockpit home setup! The PC boots the image, immediately starts FGPanel and displays C172p cockpit instruments. Run the FlightGear Simulator on your main PC and enable the C172 FGPanel Protocol to transmit data to your cockpit panel PC.&lt;br /&gt;
&lt;br /&gt;
The live CD is a freely available SUSE Studio project. It can also be cloned/modified/adapted to personal needs via SUSE Studio (web interface). Operating system is based on OpenSuSE Linux 12.1. FlightGear binaries (fgpanel) are directly pulled from the OpenSuSE build service (OBS).&lt;br /&gt;
&lt;br /&gt;
More information available at the [http://susestudio.com/a/sBTdmU/flightgear-fgpanel SUSEStudio FGPanel] project.&lt;br /&gt;
&lt;br /&gt;
== FGPanel on Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
FGPanel has been ported to run on a Raspberry Pi. All what you need is:&lt;br /&gt;
* a Raspberry Pi;&lt;br /&gt;
* a network to connect the Raspberry Pi with an instance of FlightGear Simulator;&lt;br /&gt;
* Raspbian installed on the Raspberry Pi;&lt;br /&gt;
* follow the procedure described in &amp;lt;tt&amp;gt;utils/fgpanel/README.RPi&amp;lt;/tt&amp;gt; to build FGPanel.&lt;br /&gt;
&lt;br /&gt;
This FGPanel on Raspberry Pi makes it easy and cheap to build a panel for your own procedure trainer.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[ Howto: Build your own procedure trainer]], describes how you can create a &amp;quot;cheap&amp;quot; procedure trainer, making use of FGPanel to draw the instruments.&lt;br /&gt;
&lt;br /&gt;
== External link ==&lt;br /&gt;
* {{flightgear source|utils/fgpanel|text=Source}}&lt;br /&gt;
* {{flightgear source|utils/fgpanel/README|text=README}}&lt;br /&gt;
* {{flightgear source|utils/fgpanel/README.RPi|text=README.RPi}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Software]]&lt;br /&gt;
[[Category:Cockpit building]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Talk:Using_TerraGear&amp;diff=106347</id>
		<title>Talk:Using TerraGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Talk:Using_TerraGear&amp;diff=106347"/>
		<updated>2016-12-13T13:29:01Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--[[User:Hamster|Hamster]] ([[User talk:Hamster|talk]]) 17:46, 21 October 2016 (EDT)&lt;br /&gt;
I think ogr-decode should be updated to poly-decode. Are there other differences between the tools despite the name?&lt;br /&gt;
&lt;br /&gt;
[[User:Puchacz|Puchacz]] ([[User talk:Puchacz|talk]]) 08:28, 13 December 2016 (EST)&lt;br /&gt;
* Poly-decode is only available from the master branch. The scenery/ws2.0 branch should be used instead with ogr-decode.&lt;br /&gt;
* TerraGogrear looks like a typo for TerraGear in the last edit. Can someone confirm?&lt;br /&gt;
* http://mapserver.flightgear.org/ is not responding any more. Should the page be updated to use http://gis-lab.info/qa/vmap0-eng.html instead?&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Fr/Utiliser_TerraGear&amp;diff=106324</id>
		<title>Fr/Utiliser TerraGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Fr/Utiliser_TerraGear&amp;diff=106324"/>
		<updated>2016-12-11T13:14:16Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: ogr-decode =&amp;gt; poly-decode&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Terragearprocesschart.png|thumb|Organigramme de TerraGear]]&lt;br /&gt;
Le projet logiciel [[Fr/TerraGear|TerraGear]] participe au projet [[Fr/FlightGear|FlightGear]] en créant les fichiers utilisés par celui-ci pour représenter le relief et la texture de la Terre, ce qui comprend les aéroports, villes, champs, forêts, rivières, routes, etc. Le logiciel TerraGear lit des fichiers de données contenant l'élévation du sol, le positionnement et l'agencement des aéroports, les données géographiques d'occupation du sol, entre autres et produit les fichiers de scènes utilisés par Flightgear pour représenter la surface de la planète.&lt;br /&gt;
&lt;br /&gt;
Par simplicité et commodité, la plupart des utilisateurs de FlightGear téléchargent simplement les fichiers plug-and-play des scènes à partir du serveur de scènes de FlightGear, ou utilisent [[Fr/TerraSync|TerraSync]] pour télécharger automatiquement les scènes à la demande. Mais il peut y avoir des cas où vous voudriez utiliser TerraGear pour générer vos propres fichiers terrain, plutôt que de télécharger les scènes standard de FlightGear.&lt;br /&gt;
&lt;br /&gt;
Par exemple, si vous utilisez  [[WorldEditor]] pour modifier/améliorer les information concernant un taxiway/une aire de trafic d'un [[:Category:Airports|aéroport]], vous pourriez avoir envie de visualiser à quoi ressemblerait cet aéroport modifié dans les scènes avant de décider que les résultats vous conviennent. Peut-être que les scènes officielles sont trop détaillées pour votre machine un peu ancienne, et que vous voudriez construire un terrain avec un modèle numérique de d'élévation (DEM) de plus faible résolution, afin de diminuer le nombre de polygones et ainsi augmenter votre taux de rafraîchissement d'image. Soit vous avez une machine ultra-rapide, et vous voulez construire votre propre terrain avec des données vectorielles de plus haute résolution (vmap1, Tiger, osm) pour obtenir de meilleures routes/rivières. Pour toutes ces raisons, apprendre à utiliser TerraGear est une bonne idée.&lt;br /&gt;
&lt;br /&gt;
== Obtenir TerraGear ==&lt;br /&gt;
Vous pouvez soit compiler TerraGear vous-même, ou bien télécharger un binaire pré-compilé, cette dernière démarche étant plus aisée et donc recommandée pour les débutants.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1 - Télécharger TerraGear pré-compilé (recommandé aux débutants) sur Windows'''&lt;br /&gt;
*# Téléchargez la dernière version de TerraGear sur le [http://build.flightgear.org:8080/job/TerraGear-Win-Cmake/lastSuccessfulBuild/artifact/*zip*/archive.zip Serveur de compilation de FlightGear].&lt;br /&gt;
*# Créez ou choisissez un répertoire pour contenir les outils TerraGear. &lt;br /&gt;
*# Dé-zippez le paquetage et déplacez les fichiers de &amp;lt;tt&amp;gt;archive/install/msvc100/TerraGear/bin&amp;lt;/tt&amp;gt; dans un sous-répertoire nommé &amp;lt;tt&amp;gt;Terragear/&amp;lt;/tt&amp;gt; dans le répertoire de base.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1b - Télécharger les paquetages ppa pour Ubuntu Linux'''&lt;br /&gt;
&lt;br /&gt;
https://launchpad.net/~saiarcot895/+archive/ubuntu/flightgear-edge/+index?batch=75&amp;amp;memo=75&amp;amp;start=75&lt;br /&gt;
&lt;br /&gt;
* '''Option 2 - Compiler TerraGear à partir du code source, comme expliqué dans [[Fr/TerraGear#Compilation|cet article]].&lt;br /&gt;
&lt;br /&gt;
{{note|1=Vous pourriez avoir besoin du fichier &amp;lt;code&amp;gt;default_priorities.txt&amp;lt;/code&amp;gt; qui peut être obtenu à partir du {{terragear source|path=src/BuildTiles/Main/default_priorities.txt|text=dépôt Git}} ou à partir de l'archive téléchargée à partir du serveur de compilation (dans le sous-répertoire &amp;lt;code&amp;gt;archive/install/msvc100/TerraGear/share&amp;lt;/code&amp;gt;). Voir [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;p=77950 ce lien du forum] pour les détails.}}&lt;br /&gt;
&lt;br /&gt;
=== Interface graphique ===&lt;br /&gt;
L'interface graphique [[TerraGear GUI]] est disponible pour ceux voudraient utiliser TerraGear sans avoir à connaître/utiliser les options de ligne de commande.&lt;br /&gt;
&lt;br /&gt;
== Utilisation de TerraGear ==&lt;br /&gt;
Tout d'abord, choisissez les limites de la zone de scène que vous voulez construire, en termes de latitude et de longitude. Plus la zone à générer sera restreinte, plus la quantité de données et le temps CPU nécessaire seront limités. Par exemple, si vous voulez juste générer une nouvelle disposition d'aéroport à la position 12°3 Ouest et 34°4 Nord, la génération des scènes entre 34°N 12°O et 35°N 13°O sera suffisante. &lt;br /&gt;
&lt;br /&gt;
Notez la boîte de délimitation (longitudes et latitudes minimum et maximum) pour la scène que vous voulez générer. Rappelez-vous que Ouest et Sud sont négatifs - c'est-à-dire que 4° Ouest 10° Sud doit être -4, -10. Essayez de ne pas vous mélanger les pinceaux, sinon la scène ou l'aéroport que vous créez se retrouvera de l'autre côté de la planète !&lt;br /&gt;
&lt;br /&gt;
Vous aurez affaire avec différents types de données utilisant des formats variés. Créez un nouveau répertoire pour votre travail de scène. A l'intérieur de ce répertoire, créez les sous-répertoires suivants: &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;data/&amp;lt;/code&amp;gt;:   Pour les données brutes et pré-calculées (par exemple, les fichiers d'élévation)&lt;br /&gt;
; &amp;lt;code&amp;gt;output/&amp;lt;/code&amp;gt;: Pour les fichiers de scènes que vous créerez&lt;br /&gt;
; &amp;lt;code&amp;gt;work/&amp;lt;/code&amp;gt;:   Pour les données qui ont été calculez (par exemple par shape-decode) et qui sont prêtes à être intégrées dans la scène&lt;br /&gt;
&lt;br /&gt;
=== Obtenir et traiter les données ===&lt;br /&gt;
Terragear utilise trois sortes d'informations différentes pour générer une scène :&lt;br /&gt;
&lt;br /&gt;
# L'élévation du terrain (fournie par SRTM)&lt;br /&gt;
# L'emplacement et la disposition des aéroports (fournis par apt.dat ou un fichier .dat personnalisé) &lt;br /&gt;
# Si une lat/lon donnée correspond à la mer, la terre, une ville, une forêt, un village, une route, un chemin de fer (fourni par VMAP0, [[CORINE]], etc. ou par des fichiers personnalisés de formes)&lt;br /&gt;
&lt;br /&gt;
Cet article décrit comment obtenir et traiter chacun de ces types de données dans l'ordre, et les fournir ensemble, pour que FlightGear les utilise. L'ordre de ces étapes est important. Par exemple, l'étape des données d'un aéroport a besoin des données d'élévation pour déterminer l'élévation des aéroports. Ainsi, vous commencerez par préparer les données d'élévation.&lt;br /&gt;
&lt;br /&gt;
{{caution|Pour l'inclusion dans les scènes officielles de FlightGear, toutes les données ''doivent'' provenir de sources compatibles avec la licence [[GNU GPL]]!}}&lt;br /&gt;
&lt;br /&gt;
==== Données d'élévation ====&lt;br /&gt;
Les meilleures données d'élévation actuellement disponibles proviennent du projet Shuttle Radar Topography Mission (SRTM). Il y a deux types de données SRTM :&lt;br /&gt;
* Données de haute précision (résolution 1-arc seconde), ou SRTM-1, pour les USA&lt;br /&gt;
* Données de précision moindre (résolution 3-arc second), ou SRTM-3, pour le reste du monde.&lt;br /&gt;
&lt;br /&gt;
A partir de maintenant, nous supposerons que vous utilisez les données SRTM-3. Sauf mention contraire, le processus est identique pour SRTM-1.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez télécharger les données appropriées à partir du site http://dds.cr.usgs.gov/srtm/version2_1/. Vous devrez récupérer tous les fichiers .hgt.zip couvrant la région qui vous intéresse. Selon la taille de votre scène, cela peut représenter un grand nombre de fichiers. Téléchargez les vers l'emplacement &amp;lt;tt&amp;gt;data/SRTM-1/&amp;lt;/tt&amp;gt; (ou SRTM-3/SRTM-30 en fonction du type de données que vous téléchargez) dans votre répertoire de base. (Genapts recherche les données d'élévation parmi un ensemble de noms de répertoires prédéfinis dans son répertoire de travail. SRTM-30 est l'un d'eux, c'est le moins déroutant dans cette liste. Notez que, à compter du 31 juillet 2010, l'outil genapts prend également en compte l'existence de répertoires SRTM-1/SRTM-3. Si vous utilisez une version plus ancienne, pensez à fournir les répertoires en utilisant --dem-path).&lt;br /&gt;
&lt;br /&gt;
Maintenant que nous avons les données, nous devons les convertir pour qu'elles puissent servir à TerraGear. Tout d'abord, dézippez chacun des fichiers .hgt. Ensuite, ouvrez la ligne de commande (Sous Windows: Démarrer &amp;gt; Exécuter &amp;gt; &amp;lt;code&amp;gt;cmd.exe&amp;lt;/code&amp;gt;) et placez-vous dans le répertoire de base (&amp;lt;code&amp;gt;cd .../.../TerraGear&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{note|Selon [[TerraGear_Documentation]], hgtchop est remplacé par gdalchop.}}&lt;br /&gt;
{{note|Pour les données SRTM-1, remplacez le &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; par un &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; dans le premier argument fourni à hgtchop}}&lt;br /&gt;
{{tip|Si vous voulez créer un fichier batch, remplacez &amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt; avec &amp;lt;code&amp;gt;%%f&amp;lt;/code&amp;gt;, voir à ce sujet : [http://technet.microsoft.com/en-us/library/bb490909.aspx]}}&lt;br /&gt;
&lt;br /&gt;
Pour Windows :&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 %f .\work\SRTM-3&lt;br /&gt;
ou&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 .\data\SRTM-3\%f .\work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
Pour Linux :&lt;br /&gt;
 for f in ${PWD}/data/SRTM-3/*.hgt; do ./Terragear/hgtchop 3 &amp;quot;${f}&amp;quot; &amp;quot;${PWD}/work/SRTM-3&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
Maintenant, vous allez obtenir une quantité importante de fichiers .arr.gz dans votre répertoire work/SRTM-3/. Il nous faut les convertir au format .fit.gz. Utilisez à nouveau la ligne de commande avec&lt;br /&gt;
{{note|L'espace et le point à la fin sont importants!}}&lt;br /&gt;
&lt;br /&gt;
Pour Windows :&lt;br /&gt;
 .\Terragear\terrafit.exe work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
Pour Linux :&lt;br /&gt;
 ./Terragear/terrafit work/SRTM-3&lt;br /&gt;
&lt;br /&gt;
==== Données d'aéroports ====&lt;br /&gt;
Maintenant que nous avons les données d'élévation, nous pouvons générer nos aéroports. Tout d'abord, créons un répertoire &amp;lt;code&amp;gt;data/airports/&amp;lt;/code&amp;gt; et copions-y votre fichier apt.dat. Celui-ci peut-être soit directement celui de votre paquetage de donnés FlightGear (bien que vous devrez le dé-zipper), soit un fichier que vous auriez modifié avec [[WorldEditor]].&lt;br /&gt;
&lt;br /&gt;
La commande pour créer les aéroports est &amp;quot;genapts850&amp;quot;. Lancez-la sans aucun arguments afin de visualiser les différentes options de ligne de commande.&lt;br /&gt;
&lt;br /&gt;
Si elle est simplement lancée avec un fichier apt.dat spécifié et le répertoire de travail, elle générera les agencements d'aéroports pour chaque aéroport contenu dans le fichier, ce qui peut être long. Vérifiez que l'entrée n'est pas le fichier apt.dat.gz, mais le fichier décompressé. Sinon genapts850 bloquera et ne produira aucune sortie.&lt;br /&gt;
&lt;br /&gt;
Si vous créez juste un seul aéroport, et que vous connaissez son identifiant OACI (par exemple [[Fr/Aéroport international de San Francisco|KSFO]], EGPH, EG32), utilisez le comme suit à partir du répertoire racine des scènes (c'est à dire à partir du répertoire parent de vos répertoires data, work et output). Si vous utilisez un fichier apt.dat contenant un seul aéroport, vous pouvez omettre le paramètre &amp;lt;code&amp;gt;--airport&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
 genapts850 --input=data/airports/apt.dat --work=./work --airport=&amp;lt;IDENTIFIANT_OACI_AEROPORT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ou, si vous avez les données d'élévation disponible:&lt;br /&gt;
&lt;br /&gt;
 genapts850 --input=data/airports/apt.dat --work=./work --dem-path=SRTM-3&lt;br /&gt;
&lt;br /&gt;
Si vous générez des scènes plus grandes, alors vous pouvez spécifier les longitudes et latitudes minimum et maximum.&lt;br /&gt;
&lt;br /&gt;
Genapts va créer deux sous-répertoires dans votre répertoire work:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;AirportArea/&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;AirportObj/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ils contiennent les définitions des agencement de l'aéroport, et de tous les objets présents (par exemple les manches à air et balises).&lt;br /&gt;
&lt;br /&gt;
==== Données d'utilisation du sol ====&lt;br /&gt;
Les dernières données que nous avons besoin de générer sont celles correspondant au type d'utilisation du sol. En général, elles proviennent du lot de données VMAP0 en tant que fichiers de formes en provenance du serveur de carte de la base de données des scènes, mais d'autres sources peuvent aussi être utilisées.&lt;br /&gt;
&lt;br /&gt;
Les données d'utilisation du sol peuvent être séparées en différents types :&lt;br /&gt;
&lt;br /&gt;
; Landmass: Sépare la terre de la mer. Ces données peuvent être utilisées comme un masque pour toutes les autres données. Les plus couramment utilisées sont le Landmass VMAP0, mais GSHHS peut également être utilisé. Pendant l'exécution de tg-construct avec l'argument &amp;lt;code&amp;gt;--ignore-landmass&amp;lt;/code&amp;gt;, toutes les entrées des fichiers de formes seront tenues en compte, ainsi le masque de Landmass n'est alors plus nécessaire.&lt;br /&gt;
; Land use data: Définit si une portion de terrain correspond à une forêt, une zone urbaine, du sable, de la lave, des glaciers, etc. Ce sont généralement des données VMAP0, définies en tant que polygones.&lt;br /&gt;
; Line data: Comprend les lignes de chemins de fer, les rivières, les routes. Typiquement VMAP0, mais aussi OpenStreetMap pour les routes.&lt;br /&gt;
; Point data: Est actuellement uniquement utilisé pour définir les villes.&lt;br /&gt;
&lt;br /&gt;
De loin, le moyen le plus facile pour obtenir ces données est de télécharger les fichiers de formes à partir du magnifique [http://mapserver.flightgear.org MapServer]. Le MapServer vous permet de télécharger les fichiers de formes pour chaque région de scènes sélectionnée. Cliquez sur le lien &amp;quot;Download Shapefiles&amp;quot; (ou allez directement à : http://mapserver.flightgear.org/download.psp). Entrez dans la boîte de délimitation de la scène que vous désirez générer, sélectionnez le type de données de fichier de formes que vous voulez, et cliquez sur download.&lt;br /&gt;
&lt;br /&gt;
==== Layers ====&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;v0&amp;lt;/code&amp;gt;: Couverture globale, faible niveau de détails. C'est &amp;quot;la dernière chance&amp;quot;, mais malheureusement c'est la seul couche qui couvre le monde entier.&lt;br /&gt;
; &amp;lt;code&amp;gt;cs&amp;lt;/code&amp;gt;: C'est v0 avec la contribution d'un certain nombre de personnes dans le passé. Utilisez la au lieu de v0.&lt;br /&gt;
; &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt;: Seulement des parties de certains pays sont disponibles, plus haut niveau de détails que v0.&lt;br /&gt;
; &amp;lt;code&amp;gt;clc06&amp;lt;/code&amp;gt;: Européen '''seulement'''. Très haut niveau de détails, c'est le choix préféré pour les pays européens.&lt;br /&gt;
; &amp;lt;code&amp;gt;osm&amp;lt;/code&amp;gt;: Couverture globale, haute résolution mais très bas niveau de détails.&lt;br /&gt;
: Cela signifie: si vous êtes intéressés par une région en dehors de l'Europe et que les forêts sont définies dans OpenStreetMaps pour cette région, cela sera la meilleure source de données. Si les forêts ne sont pas définies, vous obtiendrez un terne, interminable DEFAULT landclass. OSM fournit le meilleur littoral et je vous encourage à utiliser ce littoral même en Europe. [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;t=25549&amp;amp;sid=d501cb651ef9e34ca9dc8fae429d51ab&amp;amp;p=234002#p234002]&lt;br /&gt;
&lt;br /&gt;
Téléchargez chaque fichier-forme dans un répertoire séparé (!) &amp;lt;tt&amp;gt;data/shapefiles/...&amp;lt;/tt&amp;gt;. Ainsi, pour v0_landmass, vous obtiendriez &amp;lt;tt&amp;gt;data/shapefiles/v0_landmass/v0_landmass.shp&amp;lt;/tt&amp;gt;, etc.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez charger ces fichiers-formes dans un éditeur SIG tel que [[QGIS]] ou GRASS pour les visualiser et les éditer. C'est une bonne idée pour vérifier que vous avez bien les bons fichiers ! Plus tard, vous pourrez expérimenter en remplaçant divers fichiers-formes avec d'autres versions (GSHHS pour la côte, OSM pour les routes, etc.).&lt;br /&gt;
&lt;br /&gt;
L'étape suivante décode les fichiers-formes vers le format TerraGear en utilisant la commande '''ogr-decode''' (renommée '''poly-decode''' dans les versions récentes de TerraGear). &lt;br /&gt;
&lt;br /&gt;
Il y a trois arguments de ligne de commande importants pour ogr-decode :&lt;br /&gt;
* le répertoire de destination pour les données décodées,&lt;br /&gt;
* la localisation du répertoire de fichiers-formes,&lt;br /&gt;
* le type de matériau.&lt;br /&gt;
&lt;br /&gt;
Chaque fichier-forme correspond avec un des types de matériau défini dans les fichiers materials.xml. La correspondance est assez évidente. Par exemple, v0_mixedcroppasturecover correspond à MixedCropPastureCover. Notez que les types de matériau sont sensibles à la casse, donc il est bon de se référer au fichier &amp;lt;tt&amp;gt;[[$FG ROOT]]/materials.xml&amp;lt;/tt&amp;gt; pour vérifier. L'exception est v0_landmass, qui DOIT correspondre au type Default.&lt;br /&gt;
&lt;br /&gt;
En complément, il existe de nombreux arguments optionnels pour indiquer la largeur des données linéaires (pour les routes, les rivières, les voies de chemin de fer), quelle largeur utiliser pour les données de type point (pour les villes) et quelle est la plus grande longueur acceptable pour une ligne droite.&lt;br /&gt;
&lt;br /&gt;
Par exemple, pour décoder le fichier-forme v0_landmass, vous entrez la commande suivante :&lt;br /&gt;
&lt;br /&gt;
ogr-decode --max-segment 500 --area-type Default work/Landmass data/shapefiles/v0_landmass&lt;br /&gt;
&lt;br /&gt;
Pour créer des rivières de 10 mètres de large :&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --max-segment 500 --line-width 10 --area-type Stream work/Stream data/shapefiles/v0_stream&lt;br /&gt;
&lt;br /&gt;
Pour générer des villes d'environ 1 kilomètre de diagonale :&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --point-width 500 --area-type Town work/Town data/shapefiles/v0_town&lt;br /&gt;
&lt;br /&gt;
Lancez cette commande pour chaque fichier-forme du lot de données.&lt;br /&gt;
&lt;br /&gt;
== Générer les scènes ==&lt;br /&gt;
Vous avez maintenant un répertoire de travail, avec des sous-répertoires comme :&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
: AirportArea&lt;br /&gt;
: AirportObj&lt;br /&gt;
: Bog&lt;br /&gt;
: DryCropPastureCover&lt;br /&gt;
: EvergreenBroadCover&lt;br /&gt;
: GrassCover&lt;br /&gt;
: IrrCropPastureCover&lt;br /&gt;
: Lake&lt;br /&gt;
: Landmass&lt;br /&gt;
: Marsh&lt;br /&gt;
: MixedCropPastureCover&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
: MixedForestCover&lt;br /&gt;
: Railroad&lt;br /&gt;
: Road&lt;br /&gt;
: Sand&lt;br /&gt;
: ScrubCover&lt;br /&gt;
: Shared&lt;br /&gt;
: SRTM-3&lt;br /&gt;
: Stream&lt;br /&gt;
: Town&lt;br /&gt;
: Urban&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Nous pouvons maintenant générer les scènes en utilisant la commande fgfs-construct. Lancez la commande avec &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; pour obtenir les informations d'utilisation. &lt;br /&gt;
&lt;br /&gt;
Nous devons définir :&lt;br /&gt;
* Les répertoires de travail (--work-dir) et de sortie (--output-dir) .&lt;br /&gt;
** '''Notez''', au sujet du répertoire de sortie : il doit pointer vers le répertoire &amp;lt;tt&amp;gt;Terrain/&amp;lt;/tt&amp;gt;, sinon, les versions récentes FlightGear seront incapables de charger le terrain.&lt;br /&gt;
* Le centre de la scène que nous voulons générer (--lat, --lon).&lt;br /&gt;
* Le rayon (--xdist, --ydist) à partir duquel on génère.&lt;br /&gt;
* Tous les répertoires de travail à inclure dans la scène.&lt;br /&gt;
&lt;br /&gt;
Par exemple :&lt;br /&gt;
{{Pre2|&amp;lt;nowiki&amp;gt;fgfs-construct --work-dir=./work --output-dir=./output/Terrain --lon=55 --lat=60 --xdist=3 --ydist=3 AirportArea SRTM-3 AirportObj Stream Bog IrrCropPastureCover Town Lake Urban Landmass Railroad DryCropPastureCover Road EvergreenBroadCover Marsh Sand MixedCropPastureCover ScrubCover GrassCover MixedForestCover&amp;lt;/nowiki&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Lorsque cette commande se termine, le répertoire de sortie contiendra un sous-répertoire scenery. Pointez vers lui en paramétrant [[$FG_SCENERY]] ou en utilisant l'option de ligne de commande --fg-scenery à fgfs, et testez votre nouvelle scène !&lt;br /&gt;
&lt;br /&gt;
== Un soucis ? ==&lt;br /&gt;
Vous trouverez ci-dessous une liste de problèmes courants et leur solutions. Dans le doute, copiez/collez votre erreur dans Google. La plupart des problèmes (en particulier lors de la compilation de TerraGear) ont déjà été évoqués :&lt;br /&gt;
&lt;br /&gt;
* Crash de genapts. Quelquefois, genapts plante avec certains aéroports. Dans ce cas, essayez de le relancer avec l'argument --start-id pour démarrer à l'aéroport sur lequel il a planté, et l'argument --nudge pour essayer de remettre les calculs dans la bonne voie.&lt;br /&gt;
* fgfs-construct tué. Le processus fgfs-construct peut se suicider s'il consomme trop de ressources système. L'augmentation des valeurs pour setrlimit dans src/BuildTiles/Main/main.cxx est la meilleure solution.&lt;br /&gt;
* Les aéroports apparaissent au fond de trous, ou il y a des espaces entre les aéroports et la scène. Ceci arrive lorsque genapts est incapable de trouver la donnée d'élévation correcte, ou alors la donnée d'élévation a changé entre le lancement de genapts et celui de shape-decode. Essayez de générer un seul aéroport dans votre zone de scène en utilisant genapts, et visualisez la sortie. En particulier, soyez sûr que le répertoire work/SRTM-3 existe. &lt;br /&gt;
* Seuls les aéroports apparaissent dans la scène. Il existe trois explications typiques :&lt;br /&gt;
** vous n'avez pas téléchargé les fichiers-formes corrects de la zone;&lt;br /&gt;
** vous n'avez pas lancé shape-decode sur le fichier-forme v0_landmass comme Default &lt;br /&gt;
** vous n'avez pas inclus les répertoires corrects dans fgfs-construct. &lt;br /&gt;
* La scène générée contient des données effacées des fichiers-formes. Si vous éditez des fichiers-formes, vous devez effacer le sous-répertoire work approprié avant de lancer shape-decode. Sinon, vos changements s'ajouteront à ceux qui existent déjà.&lt;br /&gt;
* La scène entière est plate et au niveau de la mer. C'est généralement dû au fait que vous n'avez pas inclus les données d'élévation dans votre commande fgfs-construct. Assurez-vous qu'il existe un répertoire STRM-3 précisé dans la ligne de commande. &lt;br /&gt;
* Tout terrain copie le matériel d'un fichier-forme. Vous avez probablement oublié de mettre chacun des fichiers-formes téléchargés dans un répertoire séparé à l'intérieur du répertoire Data/shapefiles. &lt;br /&gt;
&lt;br /&gt;
{{Terra}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery enhancement]]&lt;br /&gt;
[[en:Using TerraGear]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Fr/Utiliser_TerraGear&amp;diff=106033</id>
		<title>Fr/Utiliser TerraGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Fr/Utiliser_TerraGear&amp;diff=106033"/>
		<updated>2016-11-21T23:44:06Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Données d'utilisation du sol */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Terragearprocesschart.png|thumb|Organigramme de TerraGear]]&lt;br /&gt;
Le projet logiciel [[Fr/TerraGear|TerraGear]] participe au projet [[Fr/FlightGear|FlightGear]] en créant les fichiers utilisés par celui-ci pour représenter le relief et la texture de la Terre, ce qui comprend les aéroports, villes, champs, forêts, rivières, routes, etc. Le logiciel TerraGear lit des fichiers de données contenant l'élévation du sol, le positionnement et l'agencement des aéroports, les données géographiques d'occupation du sol, entre autres et produit les fichiers de scènes utilisés par Flightgear pour représenter la surface de la planète.&lt;br /&gt;
&lt;br /&gt;
Par simplicité et commodité, la plupart des utilisateurs de FlightGear téléchargent simplement les fichiers plug-and-play des scènes à partir du serveur de scènes de FlightGear, ou utilisent [[Fr/TerraSync|TerraSync]] pour télécharger automatiquement les scènes à la demande. Mais il peut y avoir des cas où vous voudriez utiliser TerraGear pour générer vos propres fichiers terrain, plutôt que de télécharger les scènes standard de FlightGear.&lt;br /&gt;
&lt;br /&gt;
Par exemple, si vous utilisez  [[WorldEditor]] pour modifier/améliorer les information concernant un taxiway/une aire de trafic d'un [[:Category:Airports|aéroport]], vous pourriez avoir envie de visualiser à quoi ressemblerait cet aéroport modifié dans les scènes avant de décider que les résultats vous conviennent. Peut-être que les scènes officielles sont trop détaillées pour votre machine un peu ancienne, et que vous voudriez construire un terrain avec un modèle numérique de d'élévation (DEM) de plus faible résolution, afin de diminuer le nombre de polygones et ainsi augmenter votre taux de rafraîchissement d'image. Soit vous avez une machine ultra-rapide, et vous voulez construire votre propre terrain avec des données vectorielles de plus haute résolution (vmap1, Tiger, osm) pour obtenir de meilleures routes/rivières. Pour toutes ces raisons, apprendre à utiliser TerraGear est une bonne idée.&lt;br /&gt;
&lt;br /&gt;
== Obtenir TerraGear ==&lt;br /&gt;
Vous pouvez soit compiler TerraGear vous-même, ou bien télécharger un binaire pré-compilé, cette dernière démarche étant plus aisée et donc recommandée pour les débutants.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1 - Télécharger TerraGear pré-compilé (recommandé aux débutants) sur Windows'''&lt;br /&gt;
*# Téléchargez la dernière version de TerraGear sur le [http://build.flightgear.org:8080/job/TerraGear-Win-Cmake/lastSuccessfulBuild/artifact/*zip*/archive.zip Serveur de compilation de FlightGear].&lt;br /&gt;
*# Créez ou choisissez un répertoire pour contenir les outils TerraGear. &lt;br /&gt;
*# Dé-zippez le paquetage et déplacez les fichiers de &amp;lt;tt&amp;gt;archive/install/msvc100/TerraGear/bin&amp;lt;/tt&amp;gt; dans un sous-répertoire nommé &amp;lt;tt&amp;gt;Terragear/&amp;lt;/tt&amp;gt; dans le répertoire de base.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1b - Télécharger les paquetages ppa pour Ubuntu Linux'''&lt;br /&gt;
&lt;br /&gt;
https://launchpad.net/~saiarcot895/+archive/ubuntu/flightgear-edge/+index?batch=75&amp;amp;memo=75&amp;amp;start=75&lt;br /&gt;
&lt;br /&gt;
* '''Option 2 - Compiler TerraGear à partir du code source, comme expliqué dans [[Fr/TerraGear#Compilation|cet article]].&lt;br /&gt;
&lt;br /&gt;
{{note|1=Vous pourriez avoir besoin du fichier &amp;lt;code&amp;gt;default_priorities.txt&amp;lt;/code&amp;gt; qui peut être obtenu à partir du {{terragear source|path=src/BuildTiles/Main/default_priorities.txt|text=dépôt Git}} ou à partir de l'archive téléchargée à partir du serveur de compilation (dans le sous-répertoire &amp;lt;code&amp;gt;archive/install/msvc100/TerraGear/share&amp;lt;/code&amp;gt;). Voir [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;p=77950 ce lien du forum] pour les détails.}}&lt;br /&gt;
&lt;br /&gt;
=== Interface graphique ===&lt;br /&gt;
L'interface graphique [[TerraGear GUI]] est disponible pour ceux voudraient utiliser TerraGear sans avoir à connaître/utiliser les options de ligne de commande.&lt;br /&gt;
&lt;br /&gt;
== Utilisation de TerraGear ==&lt;br /&gt;
Tout d'abord, choisissez les limites de la zone de scène que vous voulez construire, en termes de latitude et de longitude. Plus la zone à générer sera restreinte, plus la quantité de données et le temps CPU nécessaire seront limités. Par exemple, si vous voulez juste générer une nouvelle disposition d'aéroport à la position 12°3 Ouest et 34°4 Nord, la génération des scènes entre 34°N 12°O et 35°N 13°O sera suffisante. &lt;br /&gt;
&lt;br /&gt;
Notez la boîte de délimitation (longitudes et latitudes minimum et maximum) pour la scène que vous voulez générer. Rappelez-vous que Ouest et Sud sont négatifs - c'est-à-dire que 4° Ouest 10° Sud doit être -4, -10. Essayez de ne pas vous mélanger les pinceaux, sinon la scène ou l'aéroport que vous créez se retrouvera de l'autre côté de la planète !&lt;br /&gt;
&lt;br /&gt;
Vous aurez affaire avec différents types de données utilisant des formats variés. Créez un nouveau répertoire pour votre travail de scène. A l'intérieur de ce répertoire, créez les sous-répertoires suivants: &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;data/&amp;lt;/code&amp;gt;:   Pour les données brutes et pré-calculées (par exemple, les fichiers d'élévation)&lt;br /&gt;
; &amp;lt;code&amp;gt;output/&amp;lt;/code&amp;gt;: Pour les fichiers de scènes que vous créerez&lt;br /&gt;
; &amp;lt;code&amp;gt;work/&amp;lt;/code&amp;gt;:   Pour les données qui ont été calculez (par exemple par shape-decode) et qui sont prêtes à être intégrées dans la scène&lt;br /&gt;
&lt;br /&gt;
=== Obtenir et traiter les données ===&lt;br /&gt;
Terragear utilise trois sortes d'informations différentes pour générer une scène :&lt;br /&gt;
&lt;br /&gt;
# L'élévation du terrain (fournie par SRTM)&lt;br /&gt;
# L'emplacement et la disposition des aéroports (fournis par apt.dat ou un fichier .dat personnalisé) &lt;br /&gt;
# Si une lat/lon donnée correspond à la mer, la terre, une ville, une forêt, un village, une route, un chemin de fer (fourni par VMAP0, [[CORINE]], etc. ou par des fichiers personnalisés de formes)&lt;br /&gt;
&lt;br /&gt;
Cet article décrit comment obtenir et traiter chacun de ces types de données dans l'ordre, et les fournir ensemble, pour que FlightGear les utilise. L'ordre de ces étapes est important. Par exemple, l'étape des données d'un aéroport a besoin des données d'élévation pour déterminer l'élévation des aéroports. Ainsi, vous commencerez par préparer les données d'élévation.&lt;br /&gt;
&lt;br /&gt;
{{caution|Pour l'inclusion dans les scènes officielles de FlightGear, toutes les données ''doivent'' provenir de sources compatibles avec la licence [[GNU GPL]]!}}&lt;br /&gt;
&lt;br /&gt;
==== Données d'élévation ====&lt;br /&gt;
Les meilleures données d'élévation actuellement disponibles proviennent du projet Shuttle Radar Topography Mission (SRTM). Il y a deux types de données SRTM :&lt;br /&gt;
* Données de haute précision (résolution 1-arc seconde), ou SRTM-1, pour les USA&lt;br /&gt;
* Données de précision moindre (résolution 3-arc second), ou SRTM-3, pour le reste du monde.&lt;br /&gt;
&lt;br /&gt;
A partir de maintenant, nous supposerons que vous utilisez les données SRTM-3. Sauf mention contraire, le processus est identique pour SRTM-1.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez télécharger les données appropriées à partir du site http://dds.cr.usgs.gov/srtm/version2_1/. Vous devrez récupérer tous les fichiers .hgt.zip couvrant la région qui vous intéresse. Selon la taille de votre scène, cela peut représenter un grand nombre de fichiers. Téléchargez les vers l'emplacement &amp;lt;tt&amp;gt;data/SRTM-1/&amp;lt;/tt&amp;gt; (ou SRTM-3/SRTM-30 en fonction du type de données que vous téléchargez) dans votre répertoire de base. (Genapts recherche les données d'élévation parmi un ensemble de noms de répertoires prédéfinis dans son répertoire de travail. SRTM-30 est l'un d'eux, c'est le moins déroutant dans cette liste. Notez que, à compter du 31 juillet 2010, l'outil genapts prend également en compte l'existence de répertoires SRTM-1/SRTM-3. Si vous utilisez une version plus ancienne, pensez à fournir les répertoires en utilisant --dem-path).&lt;br /&gt;
&lt;br /&gt;
Maintenant que nous avons les données, nous devons les convertir pour qu'elles puissent servir à TerraGear. Tout d'abord, dézippez chacun des fichiers .hgt. Ensuite, ouvrez la ligne de commande (Sous Windows: Démarrer &amp;gt; Exécuter &amp;gt; &amp;lt;code&amp;gt;cmd.exe&amp;lt;/code&amp;gt;) et placez-vous dans le répertoire de base (&amp;lt;code&amp;gt;cd .../.../TerraGear&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{note|Selon [[TerraGear_Documentation]], hgtchop est remplacé par gdalchop.}}&lt;br /&gt;
{{note|Pour les données SRTM-1, remplacez le &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; par un &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; dans le premier argument fourni à hgtchop}}&lt;br /&gt;
{{tip|Si vous voulez créer un fichier batch, remplacez &amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt; avec &amp;lt;code&amp;gt;%%f&amp;lt;/code&amp;gt;, voir à ce sujet : [http://technet.microsoft.com/en-us/library/bb490909.aspx]}}&lt;br /&gt;
&lt;br /&gt;
Pour Windows :&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 %f .\work\SRTM-3&lt;br /&gt;
ou&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 .\data\SRTM-3\%f .\work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
Pour Linux :&lt;br /&gt;
 for f in ${PWD}/data/SRTM-3/*.hgt; do ./Terragear/hgtchop 3 &amp;quot;${f}&amp;quot; &amp;quot;${PWD}/work/SRTM-3&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
Maintenant, vous allez obtenir une quantité importante de fichiers .arr.gz dans votre répertoire work/SRTM-3/. Il nous faut les convertir au format .fit.gz. Utilisez à nouveau la ligne de commande avec&lt;br /&gt;
{{note|L'espace et le point à la fin sont importants!}}&lt;br /&gt;
&lt;br /&gt;
Pour Windows :&lt;br /&gt;
 .\Terragear\terrafit.exe work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
Pour Linux :&lt;br /&gt;
 ./Terragear/terrafit work/SRTM-3&lt;br /&gt;
&lt;br /&gt;
==== Données d'aéroports ====&lt;br /&gt;
Maintenant que nous avons les données d'élévation, nous pouvons générer nos aéroports. Tout d'abord, créons un répertoire &amp;lt;code&amp;gt;data/airports/&amp;lt;/code&amp;gt; et copions-y votre fichier apt.dat. Celui-ci peut-être soit directement celui de votre paquetage de donnés FlightGear (bien que vous devrez le dé-zipper), soit un fichier que vous auriez modifié avec [[WorldEditor]].&lt;br /&gt;
&lt;br /&gt;
La commande pour créer les aéroports est &amp;quot;genapts850&amp;quot;. Lancez-la sans aucun arguments afin de visualiser les différentes options de ligne de commande.&lt;br /&gt;
&lt;br /&gt;
Si elle est simplement lancée avec un fichier apt.dat spécifié et le répertoire de travail, elle générera les agencements d'aéroports pour chaque aéroport contenu dans le fichier, ce qui peut être long. Vérifiez que l'entrée n'est pas le fichier apt.dat.gz, mais le fichier décompressé. Sinon genapts850 bloquera et ne produira aucune sortie.&lt;br /&gt;
&lt;br /&gt;
Si vous créez juste un seul aéroport, et que vous connaissez son identifiant OACI (par exemple [[Fr/Aéroport international de San Francisco|KSFO]], EGPH, EG32), utilisez le comme suit à partir du répertoire racine des scènes (c'est à dire à partir du répertoire parent de vos répertoires data, work et output). Si vous utilisez un fichier apt.dat contenant un seul aéroport, vous pouvez omettre le paramètre &amp;lt;code&amp;gt;--airport&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
 genapts850 --input=data/airports/apt.dat --work=./work --airport=&amp;lt;IDENTIFIANT_OACI_AEROPORT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ou, si vous avez les données d'élévation disponible:&lt;br /&gt;
&lt;br /&gt;
 genapts850 --input=data/airports/apt.dat --work=./work --dem-path=SRTM-3&lt;br /&gt;
&lt;br /&gt;
Si vous générez des scènes plus grandes, alors vous pouvez spécifier les longitudes et latitudes minimum et maximum.&lt;br /&gt;
&lt;br /&gt;
Genapts va créer deux sous-répertoires dans votre répertoire work:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;AirportArea/&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;AirportObj/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ils contiennent les définitions des agencement de l'aéroport, et de tous les objets présents (par exemple les manches à air et balises).&lt;br /&gt;
&lt;br /&gt;
==== Données d'utilisation du sol ====&lt;br /&gt;
Les dernières données que nous avons besoin de générer sont celles correspondant au type d'utilisation du sol. En général, elles proviennent du lot de données VMAP0 en tant que fichiers de formes en provenance du serveur de carte de la base de données des scènes, mais d'autres sources peuvent aussi être utilisées.&lt;br /&gt;
&lt;br /&gt;
Les données d'utilisation du sol peuvent être séparées en différents types :&lt;br /&gt;
&lt;br /&gt;
; Landmass: Sépare la terre de la mer. Ces données peuvent être utilisées comme un masque pour toutes les autres données. Les plus couramment utilisées sont le Landmass VMAP0, mais GSHHS peut également être utilisé. Pendant l'exécution de tg-construct avec l'argument &amp;lt;code&amp;gt;--ignore-landmass&amp;lt;/code&amp;gt;, toutes les entrées des fichiers de formes seront tenues en compte, ainsi le masque de Landmass n'est alors plus nécessaire.&lt;br /&gt;
; Land use data: Définit si une portion de terrain correspond à une forêt, une zone urbaine, du sable, de la lave, des glaciers, etc. Ce sont généralement des données VMAP0, définies en tant que polygones.&lt;br /&gt;
; Line data: Comprend les lignes de chemins de fer, les rivières, les routes. Typiquement VMAP0, mais aussi OpenStreetMap pour les routes.&lt;br /&gt;
; Point data: Est actuellement uniquement utilisé pour définir les villes.&lt;br /&gt;
&lt;br /&gt;
De loin, le moyen le plus facile pour obtenir ces données est de télécharger les fichiers de formes à partir du magnifique [http://mapserver.flightgear.org MapServer]. Le MapServer vous permet de télécharger les fichiers de formes pour chaque région de scènes sélectionnée. Cliquez sur le lien &amp;quot;Download Shapefiles&amp;quot; (ou allez directement à : http://mapserver.flightgear.org/download.psp). Entrez dans la boîte de délimitation de la scène que vous désirez générer, sélectionnez le type de données de fichier de formes que vous voulez, et cliquez sur download.&lt;br /&gt;
&lt;br /&gt;
==== Layers ====&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;v0&amp;lt;/code&amp;gt;: Couverture globale, faible niveau de détails. C'est &amp;quot;la dernière chance&amp;quot;, mais malheureusement c'est la seul couche qui couvre le monde entier.&lt;br /&gt;
; &amp;lt;code&amp;gt;cs&amp;lt;/code&amp;gt;: C'est v0 avec la contribution d'un certain nombre de personnes dans le passé. Utilisez la au lieu de v0.&lt;br /&gt;
; &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt;: Seulement des parties de certains pays sont disponibles, plus haut niveau de détails que v0.&lt;br /&gt;
; &amp;lt;code&amp;gt;clc06&amp;lt;/code&amp;gt;: Européen '''seulement'''. Très haut niveau de détails, c'est le choix préféré pour les pays européens.&lt;br /&gt;
; &amp;lt;code&amp;gt;osm&amp;lt;/code&amp;gt;: Couverture globale, haute résolution mais très bas niveau de détails.&lt;br /&gt;
: Cela signifie: si vous êtes intéressés par une région en dehors de l'Europe et que les forêts sont définies dans OpenStreetMaps pour cette région, cela sera la meilleure source de données. Si les forêts ne sont pas définies, vous obtiendrez un terne, interminable DEFAULT landclass. OSM fournit le meilleur littoral et je vous encourage à utiliser ce littoral même en Europe. [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;t=25549&amp;amp;sid=d501cb651ef9e34ca9dc8fae429d51ab&amp;amp;p=234002#p234002]&lt;br /&gt;
&lt;br /&gt;
Téléchargez chaque fichier-forme dans un répertoire séparé (!) &amp;lt;tt&amp;gt;data/shapefiles/...&amp;lt;/tt&amp;gt;. Ainsi, pour v0_landmass, vous obtiendriez &amp;lt;tt&amp;gt;data/shapefiles/v0_landmass/v0_landmass.shp&amp;lt;/tt&amp;gt;, etc.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez charger ces fichiers-formes dans un éditeur SIG tel que [[QGIS]] ou GRASS pour les visualiser et les éditer. C'est une bonne idée pour vérifier que vous avez bien les bons fichiers ! Plus tard, vous pourrez expérimenter en remplaçant divers fichiers-formes avec d'autres versions (GSHHS pour la côte, OSM pour les routes, etc.).&lt;br /&gt;
&lt;br /&gt;
L'étape suivante décode les fichiers-formes vers le format TerraGear en utilisant la commande '''ogr-decode''' . &lt;br /&gt;
&lt;br /&gt;
Il y a trois arguments de ligne de commande importants pour ogr-decode :&lt;br /&gt;
* le répertoire de destination pour les données décodées,&lt;br /&gt;
* la localisation du répertoire de fichiers-formes,&lt;br /&gt;
* le type de matériau.&lt;br /&gt;
&lt;br /&gt;
Chaque fichier-forme correspond avec un des types de matériau défini dans les fichiers materials.xml. La correspondance est assez évidente. Par exemple, v0_mixedcroppasturecover correspond à MixedCropPastureCover. Notez que les types de matériau sont sensibles à la casse, donc il est bon de se référer au fichier &amp;lt;tt&amp;gt;[[$FG ROOT]]/materials.xml&amp;lt;/tt&amp;gt; pour vérifier. L'exception est v0_landmass, qui DOIT correspondre au type Default.&lt;br /&gt;
&lt;br /&gt;
En complément, il existe de nombreux arguments optionnels pour indiquer la largeur des données linéaires (pour les routes, les rivières, les voies de chemin de fer), quelle largeur utiliser pour les données de type point (pour les villes) et quelle est la plus grande longueur acceptable pour une ligne droite.&lt;br /&gt;
&lt;br /&gt;
Par exemple, pour décoder le fichier-forme v0_landmass, vous entrez la commande suivante :&lt;br /&gt;
&lt;br /&gt;
ogr-decode --max-segment 500 --area-type Default work/Landmass data/shapefiles/v0_landmass&lt;br /&gt;
&lt;br /&gt;
Pour créer des rivières de 10 mètres de large :&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --max-segment 500 --line-width 10 --area-type Stream work/Stream data/shapefiles/v0_stream&lt;br /&gt;
&lt;br /&gt;
Pour générer des villes d'environ 1 kilomètre de diagonale :&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --point-width 500 --area-type Town work/Town data/shapefiles/v0_town&lt;br /&gt;
&lt;br /&gt;
Lancez cette commande pour chaque fichier-forme du lot de données.&lt;br /&gt;
&lt;br /&gt;
== Générer les scènes ==&lt;br /&gt;
Vous avez maintenant un répertoire de travail, avec des sous-répertoires comme :&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
: AirportArea&lt;br /&gt;
: AirportObj&lt;br /&gt;
: Bog&lt;br /&gt;
: DryCropPastureCover&lt;br /&gt;
: EvergreenBroadCover&lt;br /&gt;
: GrassCover&lt;br /&gt;
: IrrCropPastureCover&lt;br /&gt;
: Lake&lt;br /&gt;
: Landmass&lt;br /&gt;
: Marsh&lt;br /&gt;
: MixedCropPastureCover&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
: MixedForestCover&lt;br /&gt;
: Railroad&lt;br /&gt;
: Road&lt;br /&gt;
: Sand&lt;br /&gt;
: ScrubCover&lt;br /&gt;
: Shared&lt;br /&gt;
: SRTM-3&lt;br /&gt;
: Stream&lt;br /&gt;
: Town&lt;br /&gt;
: Urban&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Nous pouvons maintenant générer les scènes en utilisant la commande fgfs-construct. Lancez la commande avec &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; pour obtenir les informations d'utilisation. &lt;br /&gt;
&lt;br /&gt;
Nous devons définir :&lt;br /&gt;
* Les répertoires de travail (--work-dir) et de sortie (--output-dir) .&lt;br /&gt;
** '''Notez''', au sujet du répertoire de sortie : il doit pointer vers le répertoire &amp;lt;tt&amp;gt;Terrain/&amp;lt;/tt&amp;gt;, sinon, les versions récentes FlightGear seront incapables de charger le terrain.&lt;br /&gt;
* Le centre de la scène que nous voulons générer (--lat, --lon).&lt;br /&gt;
* Le rayon (--xdist, --ydist) à partir duquel on génère.&lt;br /&gt;
* Tous les répertoires de travail à inclure dans la scène.&lt;br /&gt;
&lt;br /&gt;
Par exemple :&lt;br /&gt;
{{Pre2|&amp;lt;nowiki&amp;gt;fgfs-construct --work-dir=./work --output-dir=./output/Terrain --lon=55 --lat=60 --xdist=3 --ydist=3 AirportArea SRTM-3 AirportObj Stream Bog IrrCropPastureCover Town Lake Urban Landmass Railroad DryCropPastureCover Road EvergreenBroadCover Marsh Sand MixedCropPastureCover ScrubCover GrassCover MixedForestCover&amp;lt;/nowiki&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Lorsque cette commande se termine, le répertoire de sortie contiendra un sous-répertoire scenery. Pointez vers lui en paramétrant [[$FG_SCENERY]] ou en utilisant l'option de ligne de commande --fg-scenery à fgfs, et testez votre nouvelle scène !&lt;br /&gt;
&lt;br /&gt;
== Un soucis ? ==&lt;br /&gt;
Vous trouverez ci-dessous une liste de problèmes courants et leur solutions. Dans le doute, copiez/collez votre erreur dans Google. La plupart des problèmes (en particulier lors de la compilation de TerraGear) ont déjà été évoqués :&lt;br /&gt;
&lt;br /&gt;
* Crash de genapts. Quelquefois, genapts plante avec certains aéroports. Dans ce cas, essayez de le relancer avec l'argument --start-id pour démarrer à l'aéroport sur lequel il a planté, et l'argument --nudge pour essayer de remettre les calculs dans la bonne voie.&lt;br /&gt;
* fgfs-construct tué. Le processus fgfs-construct peut se suicider s'il consomme trop de ressources système. L'augmentation des valeurs pour setrlimit dans src/BuildTiles/Main/main.cxx est la meilleure solution.&lt;br /&gt;
* Les aéroports apparaissent au fond de trous, ou il y a des espaces entre les aéroports et la scène. Ceci arrive lorsque genapts est incapable de trouver la donnée d'élévation correcte, ou alors la donnée d'élévation a changé entre le lancement de genapts et celui de shape-decode. Essayez de générer un seul aéroport dans votre zone de scène en utilisant genapts, et visualisez la sortie. En particulier, soyez sûr que le répertoire work/SRTM-3 existe. &lt;br /&gt;
* Seuls les aéroports apparaissent dans la scène. Il existe trois explications typiques :&lt;br /&gt;
** vous n'avez pas téléchargé les fichiers-formes corrects de la zone;&lt;br /&gt;
** vous n'avez pas lancé shape-decode sur le fichier-forme v0_landmass comme Default &lt;br /&gt;
** vous n'avez pas inclus les répertoires corrects dans fgfs-construct. &lt;br /&gt;
* La scène générée contient des données effacées des fichiers-formes. Si vous éditez des fichiers-formes, vous devez effacer le sous-répertoire work approprié avant de lancer shape-decode. Sinon, vos changements s'ajouteront à ceux qui existent déjà.&lt;br /&gt;
* La scène entière est plate et au niveau de la mer. C'est généralement dû au fait que vous n'avez pas inclus les données d'élévation dans votre commande fgfs-construct. Assurez-vous qu'il existe un répertoire STRM-3 précisé dans la ligne de commande. &lt;br /&gt;
* Tout terrain copie le matériel d'un fichier-forme. Vous avez probablement oublié de mettre chacun des fichiers-formes téléchargés dans un répertoire séparé à l'intérieur du répertoire Data/shapefiles. &lt;br /&gt;
&lt;br /&gt;
{{Terra}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery enhancement]]&lt;br /&gt;
[[en:Using TerraGear]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Using_TerraGear&amp;diff=106032</id>
		<title>Using TerraGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Using_TerraGear&amp;diff=106032"/>
		<updated>2016-11-21T23:43:46Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Landuse data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Out of date}}&lt;br /&gt;
&lt;br /&gt;
[[File:Terragearprocesschart.png|thumb|TerraGear Process Flow Chart]]&lt;br /&gt;
The [[TerraGear]] software project supports [[FlightGear]] by creating the files used by FlightGear to represent the elevation and texture of the earth, including airports, cities, fields, forests, rivers, roads and so on. The TerraGear software reads data files containing ground elevation, airport locations and layouts, geographical land-cover data, and more, and produces the scenery files used by FlightGear to represent the terrain of the world.&lt;br /&gt;
&lt;br /&gt;
For simplicity and convenience, most FlightGear users simply download the plug-and-play scenery files from the FlightGear scenery server, or use [[TerraSync]] to automatically download scenery as needed. But there is a variety of reasons you might want to use TerraGear to produce your own terrain files, rather than downloading the standard FlightGear scenery. &lt;br /&gt;
&lt;br /&gt;
For instance, if you use [[WorldEditor]] to modify/improve information about an [[:Category:Airports|airport]]'s taxiway/apron layout, you might wish to see how that modified airport would look in the scenery before deciding you're happy with the results. Maybe the official scenery is too detailed for your slow machine, and you'd like to build terrain using a digital elevation model (DEM) with poorer resolution, to decrease the number of polygons and thus improve your framerates. Or maybe you've got a fantastically fast machine, and you want to build your own terrain using higher-resolution vector data (vmap1, Tiger, osm) to get better roads/streams. For all these reasons, learning how to use TerraGear is a good idea.&lt;br /&gt;
&lt;br /&gt;
== Obtaining TerraGear ==&lt;br /&gt;
You can either build TerraGear yourself, or download a pre-compiled binary. The later is the easiest and advised for starters.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1a - Download TerraGear pre-compiled (recommended for beginners) on Windows'''&lt;br /&gt;
*# Download the latest TerraGear build from the [http://build.flightgear.org:8080/job/TerraGear-Win-Cmake/lastSuccessfulBuild/artifact/*zip*/archive.zip FlightGear Build Server].&lt;br /&gt;
*# Create or choose a directory to hold the TerraGear tools. &lt;br /&gt;
*# Unzip the package and move the files from &amp;lt;code&amp;gt;archive/install/msvc100/TerraGear/bin&amp;lt;/code&amp;gt; into a sub-directory named &amp;lt;code&amp;gt;Terragear/&amp;lt;/code&amp;gt; in the base directory.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1b - Download ppa packages for Ubuntu Linux'''&lt;br /&gt;
&lt;br /&gt;
https://launchpad.net/~saiarcot895/+archive/ubuntu/flightgear-edge/+index?batch=75&amp;amp;memo=75&amp;amp;start=75&lt;br /&gt;
&lt;br /&gt;
* '''Option 2 - Compile TerraGear from source code''' as explained in [[Building TerraGear|this article]].&lt;br /&gt;
&lt;br /&gt;
{{note|1=You might need &amp;lt;code&amp;gt;default_priorities.txt&amp;lt;/code&amp;gt; from the {{terragear source|path=src/BuildTiles/Main/default_priorities.txt|text=git repository}} or from the archive downloaded from the build server (in the &amp;lt;code&amp;gt;archive/install/msvc100/TerraGear/share&amp;lt;/code&amp;gt; subdirectory). See [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;p=77950 this forum thread] for details.}}&lt;br /&gt;
&lt;br /&gt;
=== GUI tool ===&lt;br /&gt;
A [[TerraGear GUI]] is available for those that would like to use TerraGear without knowing/using the command line options.&lt;br /&gt;
&lt;br /&gt;
== Using TerraGear ==&lt;br /&gt;
First, choose the boundaries for the area of scenery you want to build, in terms of latitude and longitude. The smaller the area of scenery you generate, the smaller the amount of data you will need, and the less CPU time it will take. For example, if you are just interested in generating a new airport layout at 12.3W 34.4N, then simply generating the scenery between 12W 34N and 13W 35N would be sufficient. &lt;br /&gt;
&lt;br /&gt;
Write down the bounding box (minimum and maximum longitude and latitude) for the scenery you want to generate. Remember that West and South are negative - in essence 4W 10S would be -4, -10. Try not to get mixed up, otherwise you'll end up generating scenery or airports on the other side of the planet! &lt;br /&gt;
&lt;br /&gt;
You'll be dealing with multiple different types of data in various formats. Create a new directory for your scenery work. Within that directory, create the following sub-directories: &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;data/&amp;lt;/code&amp;gt;:    For raw and pre-processed data (eg elevation files) &lt;br /&gt;
; &amp;lt;code&amp;gt;output/&amp;lt;/code&amp;gt;:  For the scenery files you will create &lt;br /&gt;
; &amp;lt;code&amp;gt;work/&amp;lt;/code&amp;gt;:    For data that has been processed (eg by shape-decode) and is ready to be munged into scenery &lt;br /&gt;
&lt;br /&gt;
=== Obtaining and processing data ===&lt;br /&gt;
TerraGear uses three different kinds of information to generate scenery:&lt;br /&gt;
&lt;br /&gt;
# The elevation of the land (provided by SRTM) &lt;br /&gt;
# The location and layout of airports (provided by apt.dat or a custom .dat) &lt;br /&gt;
# Whether a given lat/lon is sea, land, city, forest, town, road, railway (provided by VMAP0, [[CORINE]] etc. or custom shapefiles) &lt;br /&gt;
&lt;br /&gt;
This article describes how obtain and process each of these types of data in order, and bring it together for use by FlightGear. The order of these steps is important. For example, the airport data step needs the elevation data to determine the elevation of the airports and thus you should start with preparing elevation data.&lt;br /&gt;
&lt;br /&gt;
{{caution|For inclusion in the official FlightGear scenery, all data '''must''' come from [[GNU GPL]] compatible sources!}}&lt;br /&gt;
&lt;br /&gt;
==== Elevation data ====&lt;br /&gt;
The best worldwide elevation data currently available is from the Shuttle Radar Topography Mission (SRTM). There are two types of SRTM data: &lt;br /&gt;
* Highly accurate 1-arcsecond resolution data, known as SRTM-1, for the USA &lt;br /&gt;
* Less accurate 3-arcsecond resolution data, known as SRTM-3, for the rest of the world. &lt;br /&gt;
From now on, we'll assume you are using SRTM-3 data. Unless otherwise noted, the process for SRTM-1 is identical.&lt;br /&gt;
&lt;br /&gt;
You can download the appropriate data from http://dds.cr.usgs.gov/srtm/version2_1/. You want all .hgt.zip files covering your region of interest. Depending on the size of your scenery, there may be quite a few. Download them to &amp;lt;code&amp;gt;data/SRTM-1/&amp;lt;/code&amp;gt; (or SRTM-3/SRTM-30 depending on the type you downloaded) in your base directory. (Genapts looks for a few known, hardcoded elevation data directories in its working directory. SRTM-30 is one of them and this is the least confusing in that list. Note: W.E.F. 31st July 2010, the genapts tool now also looks for SRTM-1/SRTM-3 directories. If you are using an older version, please supply the directories using --dem-path).&lt;br /&gt;
&lt;br /&gt;
Now we've got the data, we need to convert it into something of use to TerraGear. First, you need to unzip each of the .hgt files. After that, open the commandline (Windows: Start &amp;gt; Run &amp;gt; &amp;lt;code&amp;gt;cmd.exe&amp;lt;/code&amp;gt;) and change into the base directory (&amp;lt;code&amp;gt;cd .../.../TerraGear&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{note|According to [[TerraGear_Documentation]], hgtchop is superseded by gdalchop.}}&lt;br /&gt;
{{note|For SRTM-1 data, replace the &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; by a &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; in the first argument to hgtchop}}&lt;br /&gt;
{{tip|If you want to create a batch-file, replace &amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;%%f&amp;lt;/code&amp;gt;, see [http://technet.microsoft.com/en-us/library/bb490909.aspx]}}&lt;br /&gt;
&lt;br /&gt;
For Windows:&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 %f .\work\SRTM-3&lt;br /&gt;
or&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 .\data\SRTM-3\%f .\work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
For Linux:&lt;br /&gt;
 for f in ${PWD}/data/SRTM-3/*.hgt; do ./Terragear/hgtchop 3 &amp;quot;${f}&amp;quot; &amp;quot;${PWD}/work/SRTM-3&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
Now you will get a lot of .arr.gz files in your work/SRTM-3/ directory. We need to convert these to the .fit.gz format. Run the commandline again with&lt;br /&gt;
&lt;br /&gt;
{{note|The space and dot at the and are important!}}&lt;br /&gt;
&lt;br /&gt;
For Windows:&lt;br /&gt;
 .\Terragear\terrafit.exe work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
For Linux:&lt;br /&gt;
 ./Terragear/terrafit work/SRTM-3&lt;br /&gt;
&lt;br /&gt;
==== Airport data ====&lt;br /&gt;
Now we've got elevation data, we can generate our airports. First, create a &amp;lt;code&amp;gt;data/airports/&amp;lt;/code&amp;gt; directory and copy in your apt.dat file. This may be direct from your FlightGear data package (though you'll need to unzip it), or it may be one that you've modified with [[WorldEditor]]. &lt;br /&gt;
&lt;br /&gt;
The command to create airports is &amp;quot;genapts850&amp;quot;. Run it without any arguments to see the various command-line options. &lt;br /&gt;
&lt;br /&gt;
If it is simply run with a specified apt.dat and work directory, it will generate airport layouts for every airport in the file, which can take a long time. Make sure the input is not the apt.dat.gz, but an uncompressed file. Otherwise genapts850 will block and not produce any output.&lt;br /&gt;
&lt;br /&gt;
If you are just creating a single airport and you know the ICAO ID (for example [[San Francisco International Airport|KSFO]], EGPH or EG32), use it as follows from your root scenery directory (in essence the directory above your data, work and output directories). If you use an apt.dat file with one single airport in it you should omit the &amp;lt;code&amp;gt;--airport&amp;lt;/code&amp;gt; parameter. &lt;br /&gt;
&lt;br /&gt;
 genapts850 --input=data/airports/apt.dat --work=./work --airport=&amp;lt;AIRPORT_ID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or, if you have elevation data available:&lt;br /&gt;
&lt;br /&gt;
 genapts850 --input=data/airports/apt.dat --work=./work --dem-path=SRTM-3&lt;br /&gt;
&lt;br /&gt;
If you are generating a larger set of scenery, then you can specify the minimum and maximum longitude and latitude. &lt;br /&gt;
&lt;br /&gt;
Genapts will create two sub-directories in your work directory:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;AirportArea/&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;AirportObj/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These contain the definitions of the airport layout and any objects present (e.g. windsocks and beacons).&lt;br /&gt;
&lt;br /&gt;
==== Landuse data ====&lt;br /&gt;
The final piece of data we need to generate is the landuse data. In general, this is taken from the VMAP0 dataset as shapefiles from the scenery database mapserver, but other sources can also be used.&lt;br /&gt;
&lt;br /&gt;
The landuse data can be split into a number of different types:&lt;br /&gt;
&lt;br /&gt;
; Landmass:  Separates the land from the sea. It can be used as a mask for all other data. The most commonly used is the VMAP0 Landmass, but GSHHS can also be used. When running tg-construct with &amp;lt;code&amp;gt;--ignore-landmass&amp;lt;/code&amp;gt;, all input shapefiles will be taken into consideration, so no landmass mask is required then.&lt;br /&gt;
; Land use data:  Defines whether a piece of land is forest, urban, sand, lava, glacier etc. These are usually VMAP0 data, defined as polygons.&lt;br /&gt;
; Line data:  Includes railroads, streams, roads. Typically VMAP0, but also OpenStreetMap for roads.&lt;br /&gt;
; Point data:  Is currently only used for defining towns.&lt;br /&gt;
 &lt;br /&gt;
By far the easiest way to get this data is to download shapefiles from the wonderful [http://mapserver.flightgear.org MapServer]. The MapServer lets you download the shapefiles for any selected scenery area. Click on the &amp;quot;Download Shapefiles&amp;quot; link (or go direct: http://mapserver.flightgear.org/download.psp). Enter in the bounding box of the scenery you want to generate, select the type of shapefile data you want, and click download.&lt;br /&gt;
&lt;br /&gt;
==== Layers ====&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;v0&amp;lt;/code&amp;gt;:  Global coverage, low detail. This is &amp;quot;the last resort&amp;quot;, but unfortunately it is the only layer that covers the entire world.&lt;br /&gt;
; &amp;lt;code&amp;gt;cs&amp;lt;/code&amp;gt;:  It is v0 with some contributions someone did in the past. Get this instead of v0.&lt;br /&gt;
; &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt;:  Only parts of some countries available, higher detail than v0.&lt;br /&gt;
; &amp;lt;code&amp;gt;clc06&amp;lt;/code&amp;gt;:  European '''only'''. Very high detail, this is the preferred choice for an European country.&lt;br /&gt;
; &amp;lt;code&amp;gt;osm&amp;lt;/code&amp;gt;:  Global coverage, high resolution but very low detail.&lt;br /&gt;
: This means: if you are interested in an area out of Europe and forests are defined in OpenStreetMaps for your area, this is going to be the best data source. If forests are not defined, you will get a dull, neverending DEFAULT landclass. OSM provides the best coastline and I encourage you to use this coastline even in Europe. [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;t=25549&amp;amp;sid=d501cb651ef9e34ca9dc8fae429d51ab&amp;amp;p=234002#p234002]&lt;br /&gt;
&lt;br /&gt;
{{caution|Make sure each shape file is in its own directory whether you download shape files or create your own otherwise the ogrDecode step will fail.}}&lt;br /&gt;
Download each shapefile into a seperate (!) &amp;lt;code&amp;gt;data/shapefiles/...&amp;lt;/code&amp;gt; directory. So, for v0_landmass, you would end up with &amp;lt;code&amp;gt;data/shapefiles/v0_landmass/v0_landmass.shp&amp;lt;/code&amp;gt; etc.&lt;br /&gt;
&lt;br /&gt;
You can load these shapefiles into a GIS editor such as [[QGIS]] or GRASS to view and edit. This is a good idea to verify you have the correct files! Later on, you can experiment with replacing various shapefiles with other versions (GSHHS for coastline, OSM for roads etc.).&lt;br /&gt;
&lt;br /&gt;
The next step is to decode the shape-files into TerraGear format using the '''ogr-decode''' command. &lt;br /&gt;
&lt;br /&gt;
There are three important command-line arguments for ogr-decode:&lt;br /&gt;
* the destination directory for the decoded data&lt;br /&gt;
* the location of the shapefile's directory&lt;br /&gt;
* the material type&lt;br /&gt;
&lt;br /&gt;
Each shape-file corresponds with one of the material types defined in the materials.xml files. The mapping is pretty obvious. For example, &amp;lt;code&amp;gt;v0_mixedcroppasturecover&amp;lt;/code&amp;gt; maps to &amp;lt;code&amp;gt;MixedCropPastureCover&amp;lt;/code&amp;gt;. Note that the material types are case-sensitive, so it is a good idea to refer to the &amp;lt;code&amp;gt;[[$FG_ROOT]]/Materials/default/materials.xml&amp;lt;/code&amp;gt; file (&amp;lt;code&amp;gt;[[$FG ROOT]]/materials.xml&amp;lt;/code&amp;gt; in FlightGear 2.6.0 and older) to hand so you can check. The exception is landmass, which - when used - MUST be mapped onto the type Default.&lt;br /&gt;
&lt;br /&gt;
Additionally, there are a number of optional arguments, to indicate the width of line data (for roads, streams, railways), how large to make point data (for towns) and how long the longest straight line is allowed to be.&lt;br /&gt;
&lt;br /&gt;
For example, to decode the &amp;lt;code&amp;gt;v0_landmass&amp;lt;/code&amp;gt; shapefile, you use the following command:&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --max-segment 500 --area-type Default work/Default data/shapefiles/v0_landmass&lt;br /&gt;
&lt;br /&gt;
To create streams of width 10 metres&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --max-segment 500 --line-width 10 --area-type Stream work/Stream data/shapefiles/v0_stream&lt;br /&gt;
&lt;br /&gt;
To generate some towns about 1km across&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --point-width 500 --area-type Town work/Town data/shapefiles/v0_town&lt;br /&gt;
&lt;br /&gt;
Run this command for each shapefile in the set.&lt;br /&gt;
&lt;br /&gt;
== Generating scenery ==&lt;br /&gt;
You will now have a work directory, with subdirectories like:&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
: AirportArea&lt;br /&gt;
: AirportObj&lt;br /&gt;
: Bog&lt;br /&gt;
: Default&lt;br /&gt;
: DryCropPastureCover&lt;br /&gt;
: EvergreenBroadCover&lt;br /&gt;
: GrassCover&lt;br /&gt;
: IrrCropPastureCover&lt;br /&gt;
: Lake&lt;br /&gt;
: Marsh&lt;br /&gt;
: MixedCropPastureCover&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
: MixedForestCover&lt;br /&gt;
: Railroad&lt;br /&gt;
: Road&lt;br /&gt;
: Sand&lt;br /&gt;
: ScrubCover&lt;br /&gt;
: Shared&lt;br /&gt;
: SRTM-3&lt;br /&gt;
: Stream&lt;br /&gt;
: Town&lt;br /&gt;
: Urban&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Now we can actually generate the scenery. This is done by the tg-construct command. Run the command with &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; to get usage information. &lt;br /&gt;
&lt;br /&gt;
We need to define:&lt;br /&gt;
* The work (&amp;lt;code&amp;gt;--work-dir&amp;lt;/code&amp;gt;) and output (&amp;lt;code&amp;gt;--output-dir&amp;lt;/code&amp;gt;) directories.&lt;br /&gt;
* The center of the scenery we want to generate (&amp;lt;code&amp;gt;--lat&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--lon&amp;lt;/code&amp;gt;).&lt;br /&gt;
* The radius (&amp;lt;code&amp;gt;--xdist&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--ydist&amp;lt;/code&amp;gt;) from which to generate.&lt;br /&gt;
* All the work directories to include in the scenery.&lt;br /&gt;
&lt;br /&gt;
{{note|The output directory must point to a &amp;lt;code&amp;gt;Terrain/&amp;lt;/code&amp;gt; directory, else recent FlightGear versions will be unable to load the terrain.}}&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
{{Pre2|&amp;lt;nowiki&amp;gt;tg-construct --work-dir=./work --output-dir=./output/Terrain --min-lon=55 --max-lon=57 --min-lat=60 --max-lat=62 AirportArea SRTM-3 AirportObj Default Stream Bog IrrCropPastureCover Town Lake Urban Railroad DryCropPastureCover Road EvergreenBroadCover Marsh Sand MixedCropPastureCover ScrubCover GrassCover MixedForestCover&amp;lt;/nowiki&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
When this finishes, the output directory will contain a scenery sub-tree. Point to it by setting either [[$FG_SCENERY]] or by using the &amp;lt;code&amp;gt;--fg-scenery&amp;lt;/code&amp;gt; command-line option to fgfs, and give your new scenery a try!&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Below is a list of common problems and solutions. If in doubt - Google it. Many problems (particularly when compiling TerraGear) have been hit before: &lt;br /&gt;
&lt;br /&gt;
* Crashes in genapts. Sometimes genapts will crash when dealing with a particular airport. In that case, try running it again with the &amp;lt;code&amp;gt;--start-id&amp;lt;/code&amp;gt; argument to start at the airport it failed on, and the &amp;lt;code&amp;gt;--nudge&amp;lt;/code&amp;gt; argument which tries to nudge the calculations in the right direction. &lt;br /&gt;
* tg-construct killed. The tg-construct process may kill itself if it is using too many system resources. Increasing the values for &amp;lt;code&amp;gt;setrlimit&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;src/BuildTiles/Main/main.cxx&amp;lt;/code&amp;gt; is the best solution. &lt;br /&gt;
* tg-construct silently stops immediately without an error and nothing goes to the &amp;quot;output&amp;quot; directory: make sure that lon/lat values correspond to tiles boundaries. See [[Tile Index Scheme]]&lt;br /&gt;
* Airports appear in the bottom of holes, or there are spaces between the airports and the scenery. This typically happens when genapts is unable to find the correct elevation data, or the elevation data changed between running genapts and shape-decode. Try generating a single airport in your scenery area using genapts, and look at the output. In particular, make sure there is a work/SRTM-3 directory. &lt;br /&gt;
* Only the airports appear in the scenery. There are three typical causes for this: &lt;br /&gt;
** You didn't download the correct shapefiles for the area. &lt;br /&gt;
** You haven't run shape-decode on the &amp;lt;code&amp;gt;v0_landmass&amp;lt;/code&amp;gt; shapefile as Default &lt;br /&gt;
** You didn't include the correct directories in tg-construct. &lt;br /&gt;
* Generate scenery includes data removed from the shapefiles. If you are editing shapefiles, you need to delete the appropriate work subdirectory before running shape-decode. Otherwise your changes will be in addition to those already present. &lt;br /&gt;
* All the scenery is flat and at sea-level. Typically this is because you didn't include any elevation data in your tg-construct command. Make sure there's a STRM-3 directory included in the command-line. &lt;br /&gt;
* All terrain copies the material of a certain shapefile. You have probably forgotten to put each of the downloaded shapefiles in a seperate directory inside the Data/shapefiles directory.&lt;br /&gt;
* genapts850 never passes the stage &amp;quot;Adding airport &amp;lt;ICAO&amp;gt; to parse list&amp;quot;: did you unzip &amp;lt;code&amp;gt;apt.dat.gz&amp;lt;/code&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
== General comments from forum discussion ==&lt;br /&gt;
{{cquote|f-ojac, you are right, the parameters used in scenery 2.0 were &amp;quot;-e 5 -x 20000&amp;quot; according to the wiki. I don't know why I had the impression these parameters were not public. In any case, it does not matter because using the same parameters will create closer results, but they are not guaranteed to be the same.&lt;br /&gt;
&lt;br /&gt;
The parameters used to create scenery 2,0 seem to be:&lt;br /&gt;
&lt;br /&gt;
-m ??: the minimum number of vertices in a tile. In FG, any number bellow 100 (and probably, any number below 1000) will do. I don't think there is any surface on the world perfectly flat for several kilometers. The default value is 50 and I'm sure is ok for any normal use.&lt;br /&gt;
-e 5: the max allowed error for elevation, in meters. That is: if terrafit calculates a simplification of the terrain where all points are at most this distance from the real elevation, no more vertices are created. The default value is 40 meters: a point may have an elevation error up to 40m (~100ft) High values for this parameter create less detailed mountains and smaller (in disk size) and more efficient (in FPS) terrain.&lt;br /&gt;
-x 20000: the max number of vertices in a tile. If this number of vertices is reached, terrafit stop regardless the max error of the vertices. The default value is 1000&lt;br /&gt;
&lt;br /&gt;
Keep in mind you can set values that do not make sense:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;-e 1 -x 100&amp;quot; does not make sense because it is going to be impossible to calculate errors less than 1 meters using only 100 vertices. The max number of vertices will be reached always and the max error will be probably ignored.&lt;br /&gt;
* &amp;quot;-e 300 -x 20000&amp;quot; does not make sense, tiles are going to use for sure much less vertices than 20,000 because you are allowing huge elevation errors.&lt;br /&gt;
&lt;br /&gt;
If you want an efficient scenery (less vertices), use the default values &amp;quot;-e 40 -x 1000&amp;quot;. If you want more accurate elevation at the cost of disk space and FPS, use values similar to scenery 2.0 (&amp;quot;-e 5 -x 20000&amp;quot;) Anything in the middle will produce performance and disk use in the middle.&amp;lt;ref&amp;gt;{{cite web |url=http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;t=24681#p225363 &lt;br /&gt;
|title=Re: Terrasync Help (surprinsingly!) :)&lt;br /&gt;
|author=ludomotico |date= Mon Nov 24, 2014 4:28 am}}&amp;lt;/ref&amp;gt;|ludomotico}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto:Create custom terrain]], editing/making terrain data.&lt;br /&gt;
* [[TerraGear CORINE]], building terrain from CORINE data.&lt;br /&gt;
* [[TerraGear Documentation]], using TerraGear details.&lt;br /&gt;
&lt;br /&gt;
{{Terra}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery enhancement|TerraGear, Using]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Utiliser TerraGear]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Fr/Utiliser_TerraGear&amp;diff=106019</id>
		<title>Fr/Utiliser TerraGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Fr/Utiliser_TerraGear&amp;diff=106019"/>
		<updated>2016-11-20T20:28:25Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Terragearprocesschart.png|thumb|Organigramme de TerraGear]]&lt;br /&gt;
Le projet logiciel [[Fr/TerraGear|TerraGear]] participe au projet [[Fr/FlightGear|FlightGear]] en créant les fichiers utilisés par celui-ci pour représenter le relief et la texture de la Terre, ce qui comprend les aéroports, villes, champs, forêts, rivières, routes, etc. Le logiciel TerraGear lit des fichiers de données contenant l'élévation du sol, le positionnement et l'agencement des aéroports, les données géographiques d'occupation du sol, entre autres et produit les fichiers de scènes utilisés par Flightgear pour représenter la surface de la planète.&lt;br /&gt;
&lt;br /&gt;
Par simplicité et commodité, la plupart des utilisateurs de FlightGear téléchargent simplement les fichiers plug-and-play des scènes à partir du serveur de scènes de FlightGear, ou utilisent [[Fr/TerraSync|TerraSync]] pour télécharger automatiquement les scènes à la demande. Mais il peut y avoir des cas où vous voudriez utiliser TerraGear pour générer vos propres fichiers terrain, plutôt que de télécharger les scènes standard de FlightGear.&lt;br /&gt;
&lt;br /&gt;
Par exemple, si vous utilisez  [[WorldEditor]] pour modifier/améliorer les information concernant un taxiway/une aire de trafic d'un [[:Category:Airports|aéroport]], vous pourriez avoir envie de visualiser à quoi ressemblerait cet aéroport modifié dans les scènes avant de décider que les résultats vous conviennent. Peut-être que les scènes officielles sont trop détaillées pour votre machine un peu ancienne, et que vous voudriez construire un terrain avec un modèle numérique de d'élévation (DEM) de plus faible résolution, afin de diminuer le nombre de polygones et ainsi augmenter votre taux de rafraîchissement d'image. Soit vous avez une machine ultra-rapide, et vous voulez construire votre propre terrain avec des données vectorielles de plus haute résolution (vmap1, Tiger, osm) pour obtenir de meilleures routes/rivières. Pour toutes ces raisons, apprendre à utiliser TerraGear est une bonne idée.&lt;br /&gt;
&lt;br /&gt;
== Obtenir TerraGear ==&lt;br /&gt;
Vous pouvez soit compiler TerraGear vous-même, ou bien télécharger un binaire pré-compilé, cette dernière démarche étant plus aisée et donc recommandée pour les débutants.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1 - Télécharger TerraGear pré-compilé (recommandé aux débutants) sur Windows'''&lt;br /&gt;
*# Téléchargez la dernière version de TerraGear sur le [http://build.flightgear.org:8080/job/TerraGear-Win-Cmake/lastSuccessfulBuild/artifact/*zip*/archive.zip Serveur de compilation de FlightGear].&lt;br /&gt;
*# Créez ou choisissez un répertoire pour contenir les outils TerraGear. &lt;br /&gt;
*# Dé-zippez le paquetage et déplacez les fichiers de &amp;lt;tt&amp;gt;archive/install/msvc100/TerraGear/bin&amp;lt;/tt&amp;gt; dans un sous-répertoire nommé &amp;lt;tt&amp;gt;Terragear/&amp;lt;/tt&amp;gt; dans le répertoire de base.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1b - Télécharger les paquetages ppa pour Ubuntu Linux'''&lt;br /&gt;
&lt;br /&gt;
https://launchpad.net/~saiarcot895/+archive/ubuntu/flightgear-edge/+index?batch=75&amp;amp;memo=75&amp;amp;start=75&lt;br /&gt;
&lt;br /&gt;
* '''Option 2 - Compiler TerraGear à partir du code source, comme expliqué dans [[Fr/TerraGear#Compilation|cet article]].&lt;br /&gt;
&lt;br /&gt;
{{note|1=Vous pourriez avoir besoin du fichier &amp;lt;code&amp;gt;default_priorities.txt&amp;lt;/code&amp;gt; qui peut être obtenu à partir du {{terragear source|path=src/BuildTiles/Main/default_priorities.txt|text=dépôt Git}} ou à partir de l'archive téléchargée à partir du serveur de compilation (dans le sous-répertoire &amp;lt;code&amp;gt;archive/install/msvc100/TerraGear/share&amp;lt;/code&amp;gt;). Voir [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;p=77950 ce lien du forum] pour les détails.}}&lt;br /&gt;
&lt;br /&gt;
=== Interface graphique ===&lt;br /&gt;
L'interface graphique [[TerraGear GUI]] est disponible pour ceux voudraient utiliser TerraGear sans avoir à connaître/utiliser les options de ligne de commande.&lt;br /&gt;
&lt;br /&gt;
== Utilisation de TerraGear ==&lt;br /&gt;
Tout d'abord, choisissez les limites de la zone de scène que vous voulez construire, en termes de latitude et de longitude. Plus la zone à générer sera restreinte, plus la quantité de données et le temps CPU nécessaire seront limités. Par exemple, si vous voulez juste générer une nouvelle disposition d'aéroport à la position 12°3 Ouest et 34°4 Nord, la génération des scènes entre 34°N 12°O et 35°N 13°O sera suffisante. &lt;br /&gt;
&lt;br /&gt;
Notez la boîte de délimitation (longitudes et latitudes minimum et maximum) pour la scène que vous voulez générer. Rappelez-vous que Ouest et Sud sont négatifs - c'est-à-dire que 4° Ouest 10° Sud doit être -4, -10. Essayez de ne pas vous mélanger les pinceaux, sinon la scène ou l'aéroport que vous créez se retrouvera de l'autre côté de la planète !&lt;br /&gt;
&lt;br /&gt;
Vous aurez affaire avec différents types de données utilisant des formats variés. Créez un nouveau répertoire pour votre travail de scène. A l'intérieur de ce répertoire, créez les sous-répertoires suivants: &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;data/&amp;lt;/code&amp;gt;:   Pour les données brutes et pré-calculées (par exemple, les fichiers d'élévation)&lt;br /&gt;
; &amp;lt;code&amp;gt;output/&amp;lt;/code&amp;gt;: Pour les fichiers de scènes que vous créerez&lt;br /&gt;
; &amp;lt;code&amp;gt;work/&amp;lt;/code&amp;gt;:   Pour les données qui ont été calculez (par exemple par shape-decode) et qui sont prêtes à être intégrées dans la scène&lt;br /&gt;
&lt;br /&gt;
=== Obtenir et traiter les données ===&lt;br /&gt;
Terragear utilise trois sortes d'informations différentes pour générer une scène :&lt;br /&gt;
&lt;br /&gt;
# L'élévation du terrain (fournie par SRTM)&lt;br /&gt;
# L'emplacement et la disposition des aéroports (fournis par apt.dat ou un fichier .dat personnalisé) &lt;br /&gt;
# Si une lat/lon donnée correspond à la mer, la terre, une ville, une forêt, un village, une route, un chemin de fer (fourni par VMAP0, [[CORINE]], etc. ou par des fichiers personnalisés de formes)&lt;br /&gt;
&lt;br /&gt;
Cet article décrit comment obtenir et traiter chacun de ces types de données dans l'ordre, et les fournir ensemble, pour que FlightGear les utilise. L'ordre de ces étapes est important. Par exemple, l'étape des données d'un aéroport a besoin des données d'élévation pour déterminer l'élévation des aéroports. Ainsi, vous commencerez par préparer les données d'élévation.&lt;br /&gt;
&lt;br /&gt;
{{caution|Pour l'inclusion dans les scènes officielles de FlightGear, toutes les données ''doivent'' provenir de sources compatibles avec la licence [[GNU GPL]]!}}&lt;br /&gt;
&lt;br /&gt;
==== Données d'élévation ====&lt;br /&gt;
Les meilleures données d'élévation actuellement disponibles proviennent du projet Shuttle Radar Topography Mission (SRTM). Il y a deux types de données SRTM :&lt;br /&gt;
* Données de haute précision (résolution 1-arc seconde), ou SRTM-1, pour les USA&lt;br /&gt;
* Données de précision moindre (résolution 3-arc second), ou SRTM-3, pour le reste du monde.&lt;br /&gt;
&lt;br /&gt;
A partir de maintenant, nous supposerons que vous utilisez les données SRTM-3. Sauf mention contraire, le processus est identique pour SRTM-1.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez télécharger les données appropriées à partir du site http://dds.cr.usgs.gov/srtm/version2_1/. Vous devrez récupérer tous les fichiers .hgt.zip couvrant la région qui vous intéresse. Selon la taille de votre scène, cela peut représenter un grand nombre de fichiers. Téléchargez les vers l'emplacement &amp;lt;tt&amp;gt;data/SRTM-1/&amp;lt;/tt&amp;gt; (ou SRTM-3/SRTM-30 en fonction du type de données que vous téléchargez) dans votre répertoire de base. (Genapts recherche les données d'élévation parmi un ensemble de noms de répertoires prédéfinis dans son répertoire de travail. SRTM-30 est l'un d'eux, c'est le moins déroutant dans cette liste. Notez que, à compter du 31 juillet 2010, l'outil genapts prend également en compte l'existence de répertoires SRTM-1/SRTM-3. Si vous utilisez une version plus ancienne, pensez à fournir les répertoires en utilisant --dem-path).&lt;br /&gt;
&lt;br /&gt;
Maintenant que nous avons les données, nous devons les convertir pour qu'elles puissent servir à TerraGear. Tout d'abord, dézippez chacun des fichiers .hgt. Ensuite, ouvrez la ligne de commande (Sous Windows: Démarrer &amp;gt; Exécuter &amp;gt; &amp;lt;code&amp;gt;cmd.exe&amp;lt;/code&amp;gt;) et placez-vous dans le répertoire de base (&amp;lt;code&amp;gt;cd .../.../TerraGear&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{note|Selon [[TerraGear_Documentation]], hgtchop est remplacé par gdalchop.}}&lt;br /&gt;
{{note|Pour les données SRTM-1, remplacez le &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; par un &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; dans le premier argument fourni à hgtchop}}&lt;br /&gt;
{{tip|Si vous voulez créer un fichier batch, remplacez &amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt; avec &amp;lt;code&amp;gt;%%f&amp;lt;/code&amp;gt;, voir à ce sujet : [http://technet.microsoft.com/en-us/library/bb490909.aspx]}}&lt;br /&gt;
&lt;br /&gt;
Pour Windows :&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 %f .\work\SRTM-3&lt;br /&gt;
ou&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 .\data\SRTM-3\%f .\work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
Pour Linux :&lt;br /&gt;
 for f in ${PWD}/data/SRTM-3/*.hgt; do ./Terragear/hgtchop 3 &amp;quot;${f}&amp;quot; &amp;quot;${PWD}/work/SRTM-3&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
Maintenant, vous allez obtenir une quantité importante de fichiers .arr.gz dans votre répertoire work/SRTM-3/. Il nous faut les convertir au format .fit.gz. Utilisez à nouveau la ligne de commande avec&lt;br /&gt;
{{note|L'espace et le point à la fin sont importants!}}&lt;br /&gt;
&lt;br /&gt;
Pour Windows :&lt;br /&gt;
 .\Terragear\terrafit.exe work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
Pour Linux :&lt;br /&gt;
 ./Terragear/terrafit work/SRTM-3&lt;br /&gt;
&lt;br /&gt;
==== Données d'aéroports ====&lt;br /&gt;
Maintenant que nous avons les données d'élévation, nous pouvons générer nos aéroports. Tout d'abord, créons un répertoire &amp;lt;code&amp;gt;data/airports/&amp;lt;/code&amp;gt; et copions-y votre fichier apt.dat. Celui-ci peut-être soit directement celui de votre paquetage de donnés FlightGear (bien que vous devrez le dé-zipper), soit un fichier que vous auriez modifié avec [[WorldEditor]].&lt;br /&gt;
&lt;br /&gt;
La commande pour créer les aéroports est &amp;quot;genapts850&amp;quot;. Lancez-la sans aucun arguments afin de visualiser les différentes options de ligne de commande.&lt;br /&gt;
&lt;br /&gt;
Si elle est simplement lancée avec un fichier apt.dat spécifié et le répertoire de travail, elle générera les agencements d'aéroports pour chaque aéroport contenu dans le fichier, ce qui peut être long. Vérifiez que l'entrée n'est pas le fichier apt.dat.gz, mais le fichier décompressé. Sinon genapts850 bloquera et ne produira aucune sortie.&lt;br /&gt;
&lt;br /&gt;
Si vous créez juste un seul aéroport, et que vous connaissez son identifiant OACI (par exemple [[Fr/Aéroport international de San Francisco|KSFO]], EGPH, EG32), utilisez le comme suit à partir du répertoire racine des scènes (c'est à dire à partir du répertoire parent de vos répertoires data, work et output). Si vous utilisez un fichier apt.dat contenant un seul aéroport, vous pouvez omettre le paramètre &amp;lt;code&amp;gt;--airport&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
 genapts850 --input=data/airports/apt.dat --work=./work --airport=&amp;lt;IDENTIFIANT_OACI_AEROPORT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ou, si vous avez les données d'élévation disponible:&lt;br /&gt;
&lt;br /&gt;
 genapts850 --input=data/airports/apt.dat --work=./work --dem-path=SRTM-3&lt;br /&gt;
&lt;br /&gt;
Si vous générez des scènes plus grandes, alors vous pouvez spécifier les longitudes et latitudes minimum et maximum.&lt;br /&gt;
&lt;br /&gt;
Genapts va créer deux sous-répertoires dans votre répertoire work:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;AirportArea/&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;AirportObj/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ils contiennent les définitions des agencement de l'aéroport, et de tous les objets présents (par exemple les manches à air et balises).&lt;br /&gt;
&lt;br /&gt;
==== Données d'utilisation du sol ====&lt;br /&gt;
Les dernières données que nous avons besoin de générer sont celles correspondant au type d'utilisation du sol. En général, elles proviennent du lot de données VMAP0 en tant que fichiers de formes en provenance du serveur de carte de la base de données des scènes, mais d'autres sources peuvent aussi être utilisées.&lt;br /&gt;
&lt;br /&gt;
Les données d'utilisation du sol peuvent être séparées en différents types :&lt;br /&gt;
&lt;br /&gt;
; Landmass: Sépare la terre de la mer. Ces données peuvent être utilisées comme un masque pour toutes les autres données. Les plus couramment utilisées sont le Landmass VMAP0, mais GSHHS peut également être utilisé. Pendant l'exécution de tg-construct avec l'argument &amp;lt;code&amp;gt;--ignore-landmass&amp;lt;/code&amp;gt;, toutes les entrées des fichiers de formes seront tenues en compte, ainsi le masque de Landmass n'est alors plus nécessaire.&lt;br /&gt;
; Land use data: Définit si une portion de terrain correspond à une forêt, une zone urbaine, du sable, de la lave, des glaciers, etc. Ce sont généralement des données VMAP0, définies en tant que polygones.&lt;br /&gt;
; Line data: Comprend les lignes de chemins de fer, les rivières, les routes. Typiquement VMAP0, mais aussi Open Street Map pour les routes.&lt;br /&gt;
; Point data: Est actuellement uniquement utilisé pour définir les villes.&lt;br /&gt;
&lt;br /&gt;
De loin, le moyen le plus facile pour obtenir ces données est de télécharger les fichiers de formes à partir du magnifique [http://mapserver.flightgear.org MapServer]. Le MapServer vous permet de télécharger les fichiers de formes pour chaque région de scènes sélectionnée. Cliquez sur le lien &amp;quot;Download Shapefiles&amp;quot; (ou allez directement à : http://mapserver.flightgear.org/download.psp). Entrez dans la boîte de délimitation de la scène que vous désirez générer, sélectionnez le type de données de fichier de formes que vous voulez, et cliquez sur download.&lt;br /&gt;
&lt;br /&gt;
==== Layers ====&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;v0&amp;lt;/code&amp;gt;: Couverture globale, faible niveau de détails. C'est &amp;quot;la dernière chance&amp;quot;, mais malheureusement c'est la seul couche qui couvre le monde entier.&lt;br /&gt;
; &amp;lt;code&amp;gt;cs&amp;lt;/code&amp;gt;: C'est v0 avec la contribution d'un certain nombre de personnes dans le passé. Utilisez la au lieu de v0.&lt;br /&gt;
; &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt;: Seulement des parties de certains pays sont disponibles, plus haut niveau de détails que v0.&lt;br /&gt;
; &amp;lt;code&amp;gt;clc06&amp;lt;/code&amp;gt;: Européen '''seulement'''. Très haut niveau de détails, c'est le choix préféré pour les pays européens.&lt;br /&gt;
; &amp;lt;code&amp;gt;osm&amp;lt;/code&amp;gt;: Couverture globale, haute résolution mais très bas niveau de détails.&lt;br /&gt;
: Cela signifie: si vous êtes intéressés par une région en dehors de l'Europe et que les forêts sont définies dans OpenStreetMaps pour cette région, cela sera la meilleure source de données. Si les forêts ne sont pas définies, vous obtiendrez un terne, interminable DEFAULT landclass. OSM fournit le meilleur littoral et je vous encourage à utiliser ce littoral même en Europe. [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;t=25549&amp;amp;sid=d501cb651ef9e34ca9dc8fae429d51ab&amp;amp;p=234002#p234002]&lt;br /&gt;
&lt;br /&gt;
Téléchargez chaque fichier-forme dans un répertoire séparé (!) &amp;lt;tt&amp;gt;data/shapefiles/...&amp;lt;/tt&amp;gt;. Ainsi, pour v0_landmass, vous obtiendriez &amp;lt;tt&amp;gt;data/shapefiles/v0_landmass/v0_landmass.shp&amp;lt;/tt&amp;gt;, etc.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez charger ces fichiers-formes dans un éditeur SIG tel que [[QGIS]] ou GRASS pour les visualiser et les éditer. C'est une bonne idée pour vérifier que vous avez bien les bons fichiers ! Plus tard, vous pourrez expérimenter en remplaçant divers fichiers-formes avec d'autres versions (GSHHS pour la côte, OSM pour les routes, etc.).&lt;br /&gt;
&lt;br /&gt;
L'étape suivante décode les fichiers-formes vers le format TerraGear en utilisant la commande '''ogr-decode''' . &lt;br /&gt;
&lt;br /&gt;
Il y a trois arguments de ligne de commande importants pour ogr-decode :&lt;br /&gt;
* le répertoire de destination pour les données décodées,&lt;br /&gt;
* la localisation du répertoire de fichiers-formes,&lt;br /&gt;
* le type de matériau.&lt;br /&gt;
&lt;br /&gt;
Chaque fichier-forme correspond avec un des types de matériau défini dans les fichiers materials.xml. La correspondance est assez évidente. Par exemple, v0_mixedcroppasturecover correspond à MixedCropPastureCover. Notez que les types de matériau sont sensibles à la casse, donc il est bon de se référer au fichier &amp;lt;tt&amp;gt;[[$FG ROOT]]/materials.xml&amp;lt;/tt&amp;gt; pour vérifier. L'exception est v0_landmass, qui DOIT correspondre au type Default.&lt;br /&gt;
&lt;br /&gt;
En complément, il existe de nombreux arguments optionnels pour indiquer la largeur des données linéaires (pour les routes, les rivières, les voies de chemin de fer), quelle largeur utiliser pour les données de type point (pour les villes) et quelle est la plus grande longueur acceptable pour une ligne droite.&lt;br /&gt;
&lt;br /&gt;
Par exemple, pour décoder le fichier-forme v0_landmass, vous entrez la commande suivante :&lt;br /&gt;
&lt;br /&gt;
ogr-decode --max-segment 500 --area-type Default work/Landmass data/shapefiles/v0_landmass&lt;br /&gt;
&lt;br /&gt;
Pour créer des rivières de 10 mètres de large :&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --max-segment 500 --line-width 10 --area-type Stream work/Stream data/shapefiles/v0_stream&lt;br /&gt;
&lt;br /&gt;
Pour générer des villes d'environ 1 kilomètre de diagonale :&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --point-width 500 --area-type Town work/Town data/shapefiles/v0_town&lt;br /&gt;
&lt;br /&gt;
Lancez cette commande pour chaque fichier-forme du lot de données.&lt;br /&gt;
&lt;br /&gt;
== Générer les scènes ==&lt;br /&gt;
Vous avez maintenant un répertoire de travail, avec des sous-répertoires comme :&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
: AirportArea&lt;br /&gt;
: AirportObj&lt;br /&gt;
: Bog&lt;br /&gt;
: DryCropPastureCover&lt;br /&gt;
: EvergreenBroadCover&lt;br /&gt;
: GrassCover&lt;br /&gt;
: IrrCropPastureCover&lt;br /&gt;
: Lake&lt;br /&gt;
: Landmass&lt;br /&gt;
: Marsh&lt;br /&gt;
: MixedCropPastureCover&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
: MixedForestCover&lt;br /&gt;
: Railroad&lt;br /&gt;
: Road&lt;br /&gt;
: Sand&lt;br /&gt;
: ScrubCover&lt;br /&gt;
: Shared&lt;br /&gt;
: SRTM-3&lt;br /&gt;
: Stream&lt;br /&gt;
: Town&lt;br /&gt;
: Urban&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Nous pouvons maintenant générer les scènes en utilisant la commande fgfs-construct. Lancez la commande avec &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; pour obtenir les informations d'utilisation. &lt;br /&gt;
&lt;br /&gt;
Nous devons définir :&lt;br /&gt;
* Les répertoires de travail (--work-dir) et de sortie (--output-dir) .&lt;br /&gt;
** '''Notez''', au sujet du répertoire de sortie : il doit pointer vers le répertoire &amp;lt;tt&amp;gt;Terrain/&amp;lt;/tt&amp;gt;, sinon, les versions récentes FlightGear seront incapables de charger le terrain.&lt;br /&gt;
* Le centre de la scène que nous voulons générer (--lat, --lon).&lt;br /&gt;
* Le rayon (--xdist, --ydist) à partir duquel on génère.&lt;br /&gt;
* Tous les répertoires de travail à inclure dans la scène.&lt;br /&gt;
&lt;br /&gt;
Par exemple :&lt;br /&gt;
{{Pre2|&amp;lt;nowiki&amp;gt;fgfs-construct --work-dir=./work --output-dir=./output/Terrain --lon=55 --lat=60 --xdist=3 --ydist=3 AirportArea SRTM-3 AirportObj Stream Bog IrrCropPastureCover Town Lake Urban Landmass Railroad DryCropPastureCover Road EvergreenBroadCover Marsh Sand MixedCropPastureCover ScrubCover GrassCover MixedForestCover&amp;lt;/nowiki&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Lorsque cette commande se termine, le répertoire de sortie contiendra un sous-répertoire scenery. Pointez vers lui en paramétrant [[$FG_SCENERY]] ou en utilisant l'option de ligne de commande --fg-scenery à fgfs, et testez votre nouvelle scène !&lt;br /&gt;
&lt;br /&gt;
== Un soucis ? ==&lt;br /&gt;
Vous trouverez ci-dessous une liste de problèmes courants et leur solutions. Dans le doute, copiez/collez votre erreur dans Google. La plupart des problèmes (en particulier lors de la compilation de TerraGear) ont déjà été évoqués :&lt;br /&gt;
&lt;br /&gt;
* Crash de genapts. Quelquefois, genapts plante avec certains aéroports. Dans ce cas, essayez de le relancer avec l'argument --start-id pour démarrer à l'aéroport sur lequel il a planté, et l'argument --nudge pour essayer de remettre les calculs dans la bonne voie.&lt;br /&gt;
* fgfs-construct tué. Le processus fgfs-construct peut se suicider s'il consomme trop de ressources système. L'augmentation des valeurs pour setrlimit dans src/BuildTiles/Main/main.cxx est la meilleure solution.&lt;br /&gt;
* Les aéroports apparaissent au fond de trous, ou il y a des espaces entre les aéroports et la scène. Ceci arrive lorsque genapts est incapable de trouver la donnée d'élévation correcte, ou alors la donnée d'élévation a changé entre le lancement de genapts et celui de shape-decode. Essayez de générer un seul aéroport dans votre zone de scène en utilisant genapts, et visualisez la sortie. En particulier, soyez sûr que le répertoire work/SRTM-3 existe. &lt;br /&gt;
* Seuls les aéroports apparaissent dans la scène. Il existe trois explications typiques :&lt;br /&gt;
** vous n'avez pas téléchargé les fichiers-formes corrects de la zone;&lt;br /&gt;
** vous n'avez pas lancé shape-decode sur le fichier-forme v0_landmass comme Default &lt;br /&gt;
** vous n'avez pas inclus les répertoires corrects dans fgfs-construct. &lt;br /&gt;
* La scène générée contient des données effacées des fichiers-formes. Si vous éditez des fichiers-formes, vous devez effacer le sous-répertoire work approprié avant de lancer shape-decode. Sinon, vos changements s'ajouteront à ceux qui existent déjà.&lt;br /&gt;
* La scène entière est plate et au niveau de la mer. C'est généralement dû au fait que vous n'avez pas inclus les données d'élévation dans votre commande fgfs-construct. Assurez-vous qu'il existe un répertoire STRM-3 précisé dans la ligne de commande. &lt;br /&gt;
* Tout terrain copie le matériel d'un fichier-forme. Vous avez probablement oublié de mettre chacun des fichiers-formes téléchargés dans un répertoire séparé à l'intérieur du répertoire Data/shapefiles. &lt;br /&gt;
&lt;br /&gt;
{{Terra}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery enhancement]]&lt;br /&gt;
[[en:Using TerraGear]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Fr/Utiliser_TerraGear&amp;diff=106018</id>
		<title>Fr/Utiliser TerraGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Fr/Utiliser_TerraGear&amp;diff=106018"/>
		<updated>2016-11-20T19:42:57Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Données d'utilisation du sol */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Terragearprocesschart.png|thumb|Organigramme de TerraGear]]&lt;br /&gt;
Le projet logiciel [[Fr/TerraGear|TerraGear]] participe au projet [[Fr/FlightGear|FlightGear]] en créant les fichiers utilisés par celui-ci pour représenter le relief et la texture de la Terre, ce qui comprend les aéroports, villes, champs, forêts, rivières, routes, etc. Le logiciel TerraGear lit des fichiers de données contenant l'élévation du sol, le positionnement et l'agencement des aéroports, les données géographiques d'occupation du sol, entre autres et produit les fichiers de scènes utilisés par Flightgear pour représenter la surface de la planète.&lt;br /&gt;
&lt;br /&gt;
Par simplicité et commodité, la plupart des utilisateurs de FlightGear téléchargent simplement les fichiers plug-and-play des scènes à partir du serveur de scènes de FlightGear, ou utilisent [[Fr/TerraSync|TerraSync]] pour télécharger automatiquement les scènes à la demande. Mais il peut y avoir des cas où vous voudriez utiliser TerraGear pour générer vos propres fichiers terrain, plutôt que de télécharger les scènes standard de FlightGear.&lt;br /&gt;
&lt;br /&gt;
Par exemple, si vous utilisez  [[WorldEditor]] pour modifier/améliorer les information concernant un taxiway/une aire de trafic d'un [[:Category:Airports|aéroport]], vous pourriez avoir envie de visualiser à quoi ressemblerait cet aéroport modifié dans les scènes avant de décider que les résultats vous conviennent. Peut-être que les scènes officielles sont trop détaillées pour votre machine un peu ancienne, et que vous voudriez construire un terrain avec un modèle numérique de d'élévation (DEM) de plus faible résolution, afin de diminuer le nombre de polygones et ainsi augmenter votre taux de rafraîchissement d'image. Soit vous avez une machine ultra-rapide, et vous voulez construire votre propre terrain avec des données vectorielles de plus haute résolution (vmap1, Tiger, osm) pour obtenir de meilleures routes/rivières. Pour toutes ces raisons, apprendre à utiliser TerraGear est une bonne idée.&lt;br /&gt;
&lt;br /&gt;
== Obtenir TerraGear ==&lt;br /&gt;
Vous pouvez soit compiler TerraGear vous-même, ou bien télécharger un binaire pré-compilé, cette dernière démarche étant plus aisée et donc recommandée pour les débutants.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1 - Télécharger TerraGear pré-compilé (recommandé aux débutants) sur Windows'''&lt;br /&gt;
*# Téléchargez la dernière version de TerraGear sur le [http://build.flightgear.org:8080/job/TerraGear-Win-Cmake/lastSuccessfulBuild/artifact/*zip*/archive.zip Serveur de compilation de FlightGear].&lt;br /&gt;
*# Créez ou choisissez un répertoire pour contenir les outils TerraGear. &lt;br /&gt;
*# Dé-zippez le paquetage et déplacez les fichiers de &amp;lt;tt&amp;gt;archive/install/msvc100/TerraGear/bin&amp;lt;/tt&amp;gt; dans un sous-répertoire nommé &amp;lt;tt&amp;gt;Terragear/&amp;lt;/tt&amp;gt; dans le répertoire de base.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1b - Télécharger les paquetages ppa pour Ubuntu Linux'''&lt;br /&gt;
&lt;br /&gt;
https://launchpad.net/~saiarcot895/+archive/ubuntu/flightgear-edge/+index?batch=75&amp;amp;memo=75&amp;amp;start=75&lt;br /&gt;
&lt;br /&gt;
* '''Option 2 - Compiler TerraGear à partir du code source, comme expliqué dans [[Fr/TerraGear#Compilation|cet article]].&lt;br /&gt;
&lt;br /&gt;
{{note|1=Vous pourriez avoir besoin du fichier &amp;lt;code&amp;gt;default_priorities.txt&amp;lt;/code&amp;gt; qui peut être obtenu à partir du {{terragear source|path=src/BuildTiles/Main/default_priorities.txt|text=dépôt Git}} ou à partir de l'archive téléchargée à partir du serveur de compilation (dans le sous-répertoire &amp;lt;code&amp;gt;archive/install/msvc100/TerraGear/share&amp;lt;/code&amp;gt;). Voir [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;p=77950 ce lien du forum] pour les détails.}}&lt;br /&gt;
&lt;br /&gt;
=== Interface graphique ===&lt;br /&gt;
L'interface graphique [[TerraGear GUI]] est disponible pour ceux voudraient utiliser TerraGear sans avoir à connaître/utiliser les options de ligne de commande.&lt;br /&gt;
&lt;br /&gt;
== Utilisation de TerraGear ==&lt;br /&gt;
Tout d'abord, choisissez les limites de la zone de scène que vous voulez construire, en termes de latitude et de longitude. Plus la zone à générer sera restreinte, plus la quantité de données et le temps CPU nécessaire seront limités. Par exemple, si vous voulez juste générer une nouvelle disposition d'aéroport à la position 12°3 Ouest et 34°4 Nord, la génération des scènes entre 34°N 12°O et 35°N 13°O sera suffisante. &lt;br /&gt;
&lt;br /&gt;
Notez la boîte de délimitation (longitudes et latitudes minimum et maximum) pour la scène que vous voulez générer. Rappelez-vous que Ouest et Sud sont négatifs - c'est-à-dire que 4° Ouest 10° Sud doit être -4, -10. Essayez de ne pas vous mélanger les pinceaux, sinon la scène ou l'aéroport que vous créez se retrouvera de l'autre côté de la planète !&lt;br /&gt;
&lt;br /&gt;
Vous aurez affaire avec différents types de données utilisant des formats variés. Créez un nouveau répertoire pour votre travail de scène. A l'intérieur de ce répertoire, créez les sous-répertoires suivants: &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;data/&amp;lt;/code&amp;gt;:   Pour les données brutes et pré-calculées (par exemple, les fichiers d'élévation)&lt;br /&gt;
; &amp;lt;code&amp;gt;output/&amp;lt;/code&amp;gt;: Pour les fichiers de scènes que vous créerez&lt;br /&gt;
; &amp;lt;code&amp;gt;work/&amp;lt;/code&amp;gt;:   Pour les données qui ont été calculez (par exemple par shape-decode) et qui sont prêtes à être intégrées dans la scène&lt;br /&gt;
&lt;br /&gt;
=== Obtenir et traiter les données ===&lt;br /&gt;
Terragear utilise trois sortes d'informations différentes pour générer une scène :&lt;br /&gt;
&lt;br /&gt;
# L'élévation du terrain (fournie par SRTM)&lt;br /&gt;
# L'emplacement et la disposition des aéroports (fournis par apt.dat ou un fichier .dat personnalisé) &lt;br /&gt;
# Si une lat/lon donnée correspond à la mer, la terre, une ville, une forêt, un village, une route, un chemin de fer (fourni par VMAP0, [[CORINE]], etc. ou par des fichiers personnalisés de formes)&lt;br /&gt;
&lt;br /&gt;
Cet article décrit comment obtenir et traiter chacun de ces types de données dans l'ordre, et les fournir ensemble, pour que FlightGear les utilise. L'ordre de ces étapes est important. Par exemple, l'étape des données d'un aéroport a besoin des données d'élévation pour déterminer l'élévation des aéroports. Ainsi, vous commencerez par préparer les données d'élévation.&lt;br /&gt;
&lt;br /&gt;
{{caution|Pour l'inclusion dans les scènes officielles de FlightGear, toutes les données ''doivent'' provenir de sources compatibles avec la licence [[GNU GPL]]!}}&lt;br /&gt;
&lt;br /&gt;
==== Données d'élévation ====&lt;br /&gt;
Les meilleures données d'élévation actuellement disponibles proviennent du projet Shuttle Radar Topography Mission (SRTM). Il y a deux types de données SRTM :&lt;br /&gt;
* Données de haute précision (résolution 1-arc seconde), ou SRTM-1, pour les USA&lt;br /&gt;
* Données de précision moindre (résolution 3-arc second), ou SRTM-3, pour le reste du monde.&lt;br /&gt;
&lt;br /&gt;
A partir de maintenant, nous supposerons que vous utilisez les données SRTM-3. Sauf mention contraire, le processus est identique pour SRTM-1.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez télécharger les données appropriées à partir du site http://dds.cr.usgs.gov/srtm/version2_1/. Vous devrez récupérer tous les fichiers .hgt.zip couvrant la région qui vous intéresse. Selon la taille de votre scène, cela peut représenter un grand nombre de fichiers. Téléchargez les vers l'emplacement &amp;lt;tt&amp;gt;data/SRTM-1/&amp;lt;/tt&amp;gt; (ou SRTM-3/SRTM-30 en fonction du type de données que vous téléchargez) dans votre répertoire de base. (Genapts recherche les données d'élévation parmi un ensemble de noms de répertoires prédéfinis dans son répertoire de travail. SRTM-30 est l'un d'eux, c'est le moins déroutant dans cette liste. Notez que, à compter du 31 juillet 2010, l'outil genapts prend également en compte l'existence de répertoires SRTM-1/SRTM-3. Si vous utilisez une version plus ancienne, pensez à fournir les répertoires en utilisant --dem-path).&lt;br /&gt;
&lt;br /&gt;
Maintenant que nous avons les données, nous devons les convertir pour qu'elles puissent servir à TerraGear. Tout d'abord, dézippez chacun des fichiers .hgt. Ensuite, ouvrez la ligne de commande (Sous Windows: Démarrer &amp;gt; Exécuter &amp;gt; &amp;lt;code&amp;gt;cmd.exe&amp;lt;/code&amp;gt;) et placez-vous dans le répertoire de base (&amp;lt;code&amp;gt;cd .../.../TerraGear&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{note|Selon [[TerraGear_Documentation]], hgtchop est remplacé par gdalchop.}}&lt;br /&gt;
{{note|Pour les données SRTM-1, remplacez le &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; par un &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; dans le premier argument fourni à hgtchop}}&lt;br /&gt;
{{tip|Si vous voulez créer un fichier batch, remplacez &amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt; avec &amp;lt;code&amp;gt;%%f&amp;lt;/code&amp;gt;, voir à ce sujet : [http://technet.microsoft.com/en-us/library/bb490909.aspx]}}&lt;br /&gt;
&lt;br /&gt;
Pour Windows :&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 %f .\work\SRTM-3&lt;br /&gt;
ou&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 .\data\SRTM-3\%f .\work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
Pour Linux :&lt;br /&gt;
 for f in ${PWD}/data/SRTM-3/*.hgt; do ./Terragear/hgtchop 3 &amp;quot;${f}&amp;quot; &amp;quot;${PWD}/work/SRTM-3&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
Maintenant, vous allez obtenir une quantité importante de fichiers .arr.gz dans votre répertoire work/SRTM-3/. Il nous faut les convertir au format .fit.gz. Utilisez à nouveau la ligne de commande avec&lt;br /&gt;
{{note|L'espace et le point à la fin sont importants!}}&lt;br /&gt;
&lt;br /&gt;
Pour Windows :&lt;br /&gt;
 .\Terragear\terrafit.exe work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
Pour Linux :&lt;br /&gt;
 ./Terragear/terrafit work/SRTM-3&lt;br /&gt;
&lt;br /&gt;
==== Données d'aéroports ====&lt;br /&gt;
Maintenant que nous avons les données d'élévation, nous pouvons générer nos aéroports. Tout d'abord, créons un répertoire &amp;lt;code&amp;gt;data/airports/&amp;lt;/code&amp;gt; et copions-y votre fichier apt.dat. Celui-ci peut-être soit directement celui de votre paquetage de donnés FlightGear (bien que vous devrez le dé-zipper), soit un fichier que vous auriez modifié avec [[WorldEditor]].&lt;br /&gt;
&lt;br /&gt;
La commande pour créer les aéroports est &amp;quot;genapts850&amp;quot;. Lancez-la sans aucun arguments afin de visualiser les différentes options de ligne de commande.&lt;br /&gt;
&lt;br /&gt;
Si elle est simplement lancée avec un fichier apt.dat spécifié et le répertoire de travail, elle générera les agencements d'aéroports pour chaque aéroport contenu dans le fichier, ce qui peut être long. Vérifiez que l'entrée n'est pas le fichier apt.dat.gz, mais le fichier décompressé. Sinon genapts850 bloquera et ne produira aucune sortie.&lt;br /&gt;
&lt;br /&gt;
Si vous créez juste un seul aéroport, et que vous connaissez son identifiant OACI (par exemple [[Fr/Aéroport international de San Francisco|KSFO]], EGPH, EG32), utilisez le comme suit à partir du répertoire racine des scènes (c'est à dire à partir du répertoire parent de vos répertoires data, work et output). Si vous utilisez un fichier apt.dat contenant un seul aéroport, vous pouvez omettre le paramètre &amp;lt;code&amp;gt;--airport&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
 genapts850 --input=data/airports/apt.dat --work=./work --airport=&amp;lt;IDENTIFIANT_OACI_AEROPORT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ou, si vous avez les données d'élévation disponible:&lt;br /&gt;
&lt;br /&gt;
 genapts850 --input=data/airports/apt.dat --work=./work --dem-path=SRTM-3&lt;br /&gt;
&lt;br /&gt;
Si vous générez des scènes plus grandes, alors vous pouvez spécifier les longitudes et latitudes minimum et maximum.&lt;br /&gt;
&lt;br /&gt;
Genapts va créer deux sous-répertoires dans votre répertoire work:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;AirportArea/&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;AirportObj/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ils contiennent les définitions des agencement de l'aéroport, et de tous les objets présents (par exemple les manches à air et balises).&lt;br /&gt;
&lt;br /&gt;
==== Données d'utilisation du sol ====&lt;br /&gt;
Les dernières données que nous avons besoin de générer sont celles correspondant au type d'utilisation du sol. En général, elles proviennent du lot de données VMAP0 en tant que fichiers de formes en provenance du serveur de carte de la base de données des scènes, mais d'autres sources peuvent aussi être utilisées.&lt;br /&gt;
&lt;br /&gt;
Les données d'utilisation du sol peuvent être séparées en différents types :&lt;br /&gt;
&lt;br /&gt;
; Landmass: Sépare la terre de la mer. Ces données peuvent être utilisées comme un masque pour toutes les autres données. Les plus couramment utilisées sont le Landmass VMAP0, mais GSHHS peut également être utilisé. Pendant l'exécution de tg-construct avec l'argument &amp;lt;code&amp;gt;--ignore-landmass&amp;lt;/code&amp;gt;, toutes les entrées des fichiers de formes seront tenues en compte, ainsi le masque de Landmass n'est alors plus nécessaire.&lt;br /&gt;
; Land use data: Définit si une portion de terrain correspond à une forêt, une zone urbaine, du sable, de la lave, des glaciers, etc. Ce sont généralement des données VMAP0, définies en tant que polygones.&lt;br /&gt;
; Line data: Comprend les lignes de chemins de fer, les rivières, les routes. Typiquement VMAP0, mais aussi Open Street Map pour les routes.&lt;br /&gt;
; Point data: Est actuellement uniquement utilisé pour définir les villes.&lt;br /&gt;
&lt;br /&gt;
De loin, le moyen le plus facile pour obtenir ces données est de télécharger les fichiers de formes à partir du magnifique [http://mapserver.flightgear.org MapServer]. Le MapServer vous permet de télécharger les fichiers de formes pour chaque région de scènes sélectionnée. Cliquez sur le lien &amp;quot;Download Shapefiles&amp;quot; (ou allez directement à : http://mapserver.flightgear.org/download.psp). Entrez dans la boîte de délimitation de la scène que vous désirez générer, sélectionnez le type de données de fichier de formes que vous voulez, et cliquez sur download.&lt;br /&gt;
&lt;br /&gt;
Téléchargez chaque fichier-forme dans un répertoire séparé (!) &amp;lt;tt&amp;gt;data/shapefiles/...&amp;lt;/tt&amp;gt;. Ainsi, pour v0_landmass, vous obtiendriez &amp;lt;tt&amp;gt;data/shapefiles/v0_landmass/v0_landmass.shp&amp;lt;/tt&amp;gt;, etc.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez charger ces fichiers-formes dans un éditeur SIG tel que [[QGIS]] ou GRASS pour les visualiser et les éditer. C'est une bonne idée pour vérifier que vous avez bien les bons fichiers ! Plus tard, vous pourrez expérimenter en remplaçant divers fichiers-formes avec d'autres versions (GSHHS pour la côte, OSM pour les routes, etc.).&lt;br /&gt;
&lt;br /&gt;
L'étape suivante décode les fichiers-formes vers le format TerraGear en utilisant la commande '''ogr-decode''' . &lt;br /&gt;
&lt;br /&gt;
Il y a trois arguments de ligne de commande importants pour ogr-decode :&lt;br /&gt;
* le répertoire de destination pour les données décodées,&lt;br /&gt;
* la localisation du répertoire de fichiers-formes,&lt;br /&gt;
* le type de matériau.&lt;br /&gt;
&lt;br /&gt;
Chaque fichier-forme correspond avec un des types de matériau défini dans les fichiers materials.xml. La correspondance est assez évidente. Par exemple, v0_mixedcroppasturecover correspond à MixedCropPastureCover. Notez que les types de matériau sont sensibles à la casse, donc il est bon de se référer au fichier &amp;lt;tt&amp;gt;[[$FG ROOT]]/materials.xml&amp;lt;/tt&amp;gt; pour vérifier. L'exception est v0_landmass, qui DOIT correspondre au type Default.&lt;br /&gt;
&lt;br /&gt;
En complément, il existe de nombreux arguments optionnels pour indiquer la largeur des données linéaires (pour les routes, les rivières, les voies de chemin de fer), quelle largeur utiliser pour les données de type point (pour les villes) et quelle est la plus grande longueur acceptable pour une ligne droite.&lt;br /&gt;
&lt;br /&gt;
Par exemple, pour décoder le fichier-forme v0_landmass, vous entrez la commande suivante :&lt;br /&gt;
&lt;br /&gt;
ogr-decode --max-segment 500 --area-type Default work/Landmass data/shapefiles/v0_landmass&lt;br /&gt;
&lt;br /&gt;
Pour créer des rivières de 10 mètres de large :&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --max-segment 500 --line-width 10 --area-type Stream work/Stream data/shapefiles/v0_stream&lt;br /&gt;
&lt;br /&gt;
Pour générer des villes d'environ 1 kilomètre de diagonale :&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --point-width 500 --area-type Town work/Town data/shapefiles/v0_town&lt;br /&gt;
&lt;br /&gt;
Lancez cette commande pour chaque fichier-forme du lot de données.&lt;br /&gt;
&lt;br /&gt;
== Générer les scènes ==&lt;br /&gt;
Vous avez maintenant un répertoire de travail, avec des sous-répertoires comme :&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
: AirportArea&lt;br /&gt;
: AirportObj&lt;br /&gt;
: Bog&lt;br /&gt;
: DryCropPastureCover&lt;br /&gt;
: EvergreenBroadCover&lt;br /&gt;
: GrassCover&lt;br /&gt;
: IrrCropPastureCover&lt;br /&gt;
: Lake&lt;br /&gt;
: Landmass&lt;br /&gt;
: Marsh&lt;br /&gt;
: MixedCropPastureCover&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
: MixedForestCover&lt;br /&gt;
: Railroad&lt;br /&gt;
: Road&lt;br /&gt;
: Sand&lt;br /&gt;
: ScrubCover&lt;br /&gt;
: Shared&lt;br /&gt;
: SRTM-3&lt;br /&gt;
: Stream&lt;br /&gt;
: Town&lt;br /&gt;
: Urban&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Nous pouvons maintenant générer les scènes en utilisant la commande fgfs-construct. Lancez la commande avec &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; pour obtenir les informations d'utilisation. &lt;br /&gt;
&lt;br /&gt;
Nous devons définir :&lt;br /&gt;
* Les répertoires de travail (--work-dir) et de sortie (--output-dir) .&lt;br /&gt;
** '''Notez''', au sujet du répertoire de sortie : il doit pointer vers le répertoire &amp;lt;tt&amp;gt;Terrain/&amp;lt;/tt&amp;gt;, sinon, les versions récentes FlightGear seront incapables de charger le terrain.&lt;br /&gt;
* Le centre de la scène que nous voulons générer (--lat, --lon).&lt;br /&gt;
* Le rayon (--xdist, --ydist) à partir duquel on génère.&lt;br /&gt;
* Tous les répertoires de travail à inclure dans la scène.&lt;br /&gt;
&lt;br /&gt;
Par exemple :&lt;br /&gt;
{{Pre2|&amp;lt;nowiki&amp;gt;fgfs-construct --work-dir=./work --output-dir=./output/Terrain --lon=55 --lat=60 --xdist=3 --ydist=3 AirportArea SRTM-3 AirportObj Stream Bog IrrCropPastureCover Town Lake Urban Landmass Railroad DryCropPastureCover Road EvergreenBroadCover Marsh Sand MixedCropPastureCover ScrubCover GrassCover MixedForestCover&amp;lt;/nowiki&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Lorsque cette commande se termine, le répertoire de sortie contiendra un sous-répertoire scenery. Pointez vers lui en paramétrant [[$FG_SCENERY]] ou en utilisant l'option de ligne de commande --fg-scenery à fgfs, et testez votre nouvelle scène !&lt;br /&gt;
&lt;br /&gt;
== Un soucis ? ==&lt;br /&gt;
Vous trouverez ci-dessous une liste de problèmes courants et leur solutions. Dans le doute, copiez/collez votre erreur dans Google. La plupart des problèmes (en particulier lors de la compilation de TerraGear) ont déjà été évoqués :&lt;br /&gt;
&lt;br /&gt;
* Crash de genapts. Quelquefois, genapts plante avec certains aéroports. Dans ce cas, essayez de le relancer avec l'argument --start-id pour démarrer à l'aéroport sur lequel il a planté, et l'argument --nudge pour essayer de remettre les calculs dans la bonne voie.&lt;br /&gt;
* fgfs-construct tué. Le processus fgfs-construct peut se suicider s'il consomme trop de ressources système. L'augmentation des valeurs pour setrlimit dans src/BuildTiles/Main/main.cxx est la meilleure solution.&lt;br /&gt;
* Les aéroports apparaissent au fond de trous, ou il y a des espaces entre les aéroports et la scène. Ceci arrive lorsque genapts est incapable de trouver la donnée d'élévation correcte, ou alors la donnée d'élévation a changé entre le lancement de genapts et celui de shape-decode. Essayez de générer un seul aéroport dans votre zone de scène en utilisant genapts, et visualisez la sortie. En particulier, soyez sûr que le répertoire work/SRTM-3 existe. &lt;br /&gt;
* Seuls les aéroports apparaissent dans la scène. Il existe trois explications typiques :&lt;br /&gt;
** vous n'avez pas téléchargé les fichiers-formes corrects de la zone;&lt;br /&gt;
** vous n'avez pas lancé shape-decode sur le fichier-forme v0_landmass comme Default &lt;br /&gt;
** vous n'avez pas inclus les répertoires corrects dans fgfs-construct. &lt;br /&gt;
* La scène générée contient des données effacées des fichiers-formes. Si vous éditez des fichiers-formes, vous devez effacer le sous-répertoire work approprié avant de lancer shape-decode. Sinon, vos changements s'ajouteront à ceux qui existent déjà.&lt;br /&gt;
* La scène entière est plate et au niveau de la mer. C'est généralement dû au fait que vous n'avez pas inclus les données d'élévation dans votre commande fgfs-construct. Assurez-vous qu'il existe un répertoire STRM-3 précisé dans la ligne de commande. &lt;br /&gt;
* Tout terrain copie le matériel d'un fichier-forme. Vous avez probablement oublié de mettre chacun des fichiers-formes téléchargés dans un répertoire séparé à l'intérieur du répertoire Data/shapefiles. &lt;br /&gt;
&lt;br /&gt;
{{Terra}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery enhancement]]&lt;br /&gt;
[[en:Using TerraGear]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Fr/Utiliser_TerraGear&amp;diff=106016</id>
		<title>Fr/Utiliser TerraGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Fr/Utiliser_TerraGear&amp;diff=106016"/>
		<updated>2016-11-20T17:36:17Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Données d'aéroports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Terragearprocesschart.png|thumb|Organigramme de TerraGear]]&lt;br /&gt;
Le projet logiciel [[Fr/TerraGear|TerraGear]] participe au projet [[Fr/FlightGear|FlightGear]] en créant les fichiers utilisés par celui-ci pour représenter le relief et la texture de la Terre, ce qui comprend les aéroports, villes, champs, forêts, rivières, routes, etc. Le logiciel TerraGear lit des fichiers de données contenant l'élévation du sol, le positionnement et l'agencement des aéroports, les données géographiques d'occupation du sol, entre autres et produit les fichiers de scènes utilisés par Flightgear pour représenter la surface de la planète.&lt;br /&gt;
&lt;br /&gt;
Par simplicité et commodité, la plupart des utilisateurs de FlightGear téléchargent simplement les fichiers plug-and-play des scènes à partir du serveur de scènes de FlightGear, ou utilisent [[Fr/TerraSync|TerraSync]] pour télécharger automatiquement les scènes à la demande. Mais il peut y avoir des cas où vous voudriez utiliser TerraGear pour générer vos propres fichiers terrain, plutôt que de télécharger les scènes standard de FlightGear.&lt;br /&gt;
&lt;br /&gt;
Par exemple, si vous utilisez  [[WorldEditor]] pour modifier/améliorer les information concernant un taxiway/une aire de trafic d'un [[:Category:Airports|aéroport]], vous pourriez avoir envie de visualiser à quoi ressemblerait cet aéroport modifié dans les scènes avant de décider que les résultats vous conviennent. Peut-être que les scènes officielles sont trop détaillées pour votre machine un peu ancienne, et que vous voudriez construire un terrain avec un modèle numérique de d'élévation (DEM) de plus faible résolution, afin de diminuer le nombre de polygones et ainsi augmenter votre taux de rafraîchissement d'image. Soit vous avez une machine ultra-rapide, et vous voulez construire votre propre terrain avec des données vectorielles de plus haute résolution (vmap1, Tiger, osm) pour obtenir de meilleures routes/rivières. Pour toutes ces raisons, apprendre à utiliser TerraGear est une bonne idée.&lt;br /&gt;
&lt;br /&gt;
== Obtenir TerraGear ==&lt;br /&gt;
Vous pouvez soit compiler TerraGear vous-même, ou bien télécharger un binaire pré-compilé, cette dernière démarche étant plus aisée et donc recommandée pour les débutants.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1 - Télécharger TerraGear pré-compilé (recommandé aux débutants) sur Windows'''&lt;br /&gt;
*# Téléchargez la dernière version de TerraGear sur le [http://build.flightgear.org:8080/job/TerraGear-Win-Cmake/lastSuccessfulBuild/artifact/*zip*/archive.zip Serveur de compilation de FlightGear].&lt;br /&gt;
*# Créez ou choisissez un répertoire pour contenir les outils TerraGear. &lt;br /&gt;
*# Dé-zippez le paquetage et déplacez les fichiers de &amp;lt;tt&amp;gt;archive/install/msvc100/TerraGear/bin&amp;lt;/tt&amp;gt; dans un sous-répertoire nommé &amp;lt;tt&amp;gt;Terragear/&amp;lt;/tt&amp;gt; dans le répertoire de base.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1b - Télécharger les paquetages ppa pour Ubuntu Linux'''&lt;br /&gt;
&lt;br /&gt;
https://launchpad.net/~saiarcot895/+archive/ubuntu/flightgear-edge/+index?batch=75&amp;amp;memo=75&amp;amp;start=75&lt;br /&gt;
&lt;br /&gt;
* '''Option 2 - Compiler TerraGear à partir du code source, comme expliqué dans [[Fr/TerraGear#Compilation|cet article]].&lt;br /&gt;
&lt;br /&gt;
{{note|1=Vous pourriez avoir besoin du fichier &amp;lt;code&amp;gt;default_priorities.txt&amp;lt;/code&amp;gt; qui peut être obtenu à partir du {{terragear source|path=src/BuildTiles/Main/default_priorities.txt|text=dépôt Git}} ou à partir de l'archive téléchargée à partir du serveur de compilation (dans le sous-répertoire &amp;lt;code&amp;gt;archive/install/msvc100/TerraGear/share&amp;lt;/code&amp;gt;). Voir [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;p=77950 ce lien du forum] pour les détails.}}&lt;br /&gt;
&lt;br /&gt;
=== Interface graphique ===&lt;br /&gt;
L'interface graphique [[TerraGear GUI]] est disponible pour ceux voudraient utiliser TerraGear sans avoir à connaître/utiliser les options de ligne de commande.&lt;br /&gt;
&lt;br /&gt;
== Utilisation de TerraGear ==&lt;br /&gt;
Tout d'abord, choisissez les limites de la zone de scène que vous voulez construire, en termes de latitude et de longitude. Plus la zone à générer sera restreinte, plus la quantité de données et le temps CPU nécessaire seront limités. Par exemple, si vous voulez juste générer une nouvelle disposition d'aéroport à la position 12°3 Ouest et 34°4 Nord, la génération des scènes entre 34°N 12°O et 35°N 13°O sera suffisante. &lt;br /&gt;
&lt;br /&gt;
Notez la boîte de délimitation (longitudes et latitudes minimum et maximum) pour la scène que vous voulez générer. Rappelez-vous que Ouest et Sud sont négatifs - c'est-à-dire que 4° Ouest 10° Sud doit être -4, -10. Essayez de ne pas vous mélanger les pinceaux, sinon la scène ou l'aéroport que vous créez se retrouvera de l'autre côté de la planète !&lt;br /&gt;
&lt;br /&gt;
Vous aurez affaire avec différents types de données utilisant des formats variés. Créez un nouveau répertoire pour votre travail de scène. A l'intérieur de ce répertoire, créez les sous-répertoires suivants: &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;data/&amp;lt;/code&amp;gt;:   Pour les données brutes et pré-calculées (par exemple, les fichiers d'élévation)&lt;br /&gt;
; &amp;lt;code&amp;gt;output/&amp;lt;/code&amp;gt;: Pour les fichiers de scènes que vous créerez&lt;br /&gt;
; &amp;lt;code&amp;gt;work/&amp;lt;/code&amp;gt;:   Pour les données qui ont été calculez (par exemple par shape-decode) et qui sont prêtes à être intégrées dans la scène&lt;br /&gt;
&lt;br /&gt;
=== Obtenir et traiter les données ===&lt;br /&gt;
Terragear utilise trois sortes d'informations différentes pour générer une scène :&lt;br /&gt;
&lt;br /&gt;
# L'élévation du terrain (fournie par SRTM)&lt;br /&gt;
# L'emplacement et la disposition des aéroports (fournis par apt.dat ou un fichier .dat personnalisé) &lt;br /&gt;
# Si une lat/lon donnée correspond à la mer, la terre, une ville, une forêt, un village, une route, un chemin de fer (fourni par VMAP0, [[CORINE]], etc. ou par des fichiers personnalisés de formes)&lt;br /&gt;
&lt;br /&gt;
Cet article décrit comment obtenir et traiter chacun de ces types de données dans l'ordre, et les fournir ensemble, pour que FlightGear les utilise. L'ordre de ces étapes est important. Par exemple, l'étape des données d'un aéroport a besoin des données d'élévation pour déterminer l'élévation des aéroports. Ainsi, vous commencerez par préparer les données d'élévation.&lt;br /&gt;
&lt;br /&gt;
{{caution|Pour l'inclusion dans les scènes officielles de FlightGear, toutes les données ''doivent'' provenir de sources compatibles avec la licence [[GNU GPL]]!}}&lt;br /&gt;
&lt;br /&gt;
==== Données d'élévation ====&lt;br /&gt;
Les meilleures données d'élévation actuellement disponibles proviennent du projet Shuttle Radar Topography Mission (SRTM). Il y a deux types de données SRTM :&lt;br /&gt;
* Données de haute précision (résolution 1-arc seconde), ou SRTM-1, pour les USA&lt;br /&gt;
* Données de précision moindre (résolution 3-arc second), ou SRTM-3, pour le reste du monde.&lt;br /&gt;
&lt;br /&gt;
A partir de maintenant, nous supposerons que vous utilisez les données SRTM-3. Sauf mention contraire, le processus est identique pour SRTM-1.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez télécharger les données appropriées à partir du site http://dds.cr.usgs.gov/srtm/version2_1/. Vous devrez récupérer tous les fichiers .hgt.zip couvrant la région qui vous intéresse. Selon la taille de votre scène, cela peut représenter un grand nombre de fichiers. Téléchargez les vers l'emplacement &amp;lt;tt&amp;gt;data/SRTM-1/&amp;lt;/tt&amp;gt; (ou SRTM-3/SRTM-30 en fonction du type de données que vous téléchargez) dans votre répertoire de base. (Genapts recherche les données d'élévation parmi un ensemble de noms de répertoires prédéfinis dans son répertoire de travail. SRTM-30 est l'un d'eux, c'est le moins déroutant dans cette liste. Notez que, à compter du 31 juillet 2010, l'outil genapts prend également en compte l'existence de répertoires SRTM-1/SRTM-3. Si vous utilisez une version plus ancienne, pensez à fournir les répertoires en utilisant --dem-path).&lt;br /&gt;
&lt;br /&gt;
Maintenant que nous avons les données, nous devons les convertir pour qu'elles puissent servir à TerraGear. Tout d'abord, dézippez chacun des fichiers .hgt. Ensuite, ouvrez la ligne de commande (Sous Windows: Démarrer &amp;gt; Exécuter &amp;gt; &amp;lt;code&amp;gt;cmd.exe&amp;lt;/code&amp;gt;) et placez-vous dans le répertoire de base (&amp;lt;code&amp;gt;cd .../.../TerraGear&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{note|Selon [[TerraGear_Documentation]], hgtchop est remplacé par gdalchop.}}&lt;br /&gt;
{{note|Pour les données SRTM-1, remplacez le &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; par un &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; dans le premier argument fourni à hgtchop}}&lt;br /&gt;
{{tip|Si vous voulez créer un fichier batch, remplacez &amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt; avec &amp;lt;code&amp;gt;%%f&amp;lt;/code&amp;gt;, voir à ce sujet : [http://technet.microsoft.com/en-us/library/bb490909.aspx]}}&lt;br /&gt;
&lt;br /&gt;
Pour Windows :&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 %f .\work\SRTM-3&lt;br /&gt;
ou&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 .\data\SRTM-3\%f .\work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
Pour Linux :&lt;br /&gt;
 for f in ${PWD}/data/SRTM-3/*.hgt; do ./Terragear/hgtchop 3 &amp;quot;${f}&amp;quot; &amp;quot;${PWD}/work/SRTM-3&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
Maintenant, vous allez obtenir une quantité importante de fichiers .arr.gz dans votre répertoire work/SRTM-3/. Il nous faut les convertir au format .fit.gz. Utilisez à nouveau la ligne de commande avec&lt;br /&gt;
{{note|L'espace et le point à la fin sont importants!}}&lt;br /&gt;
&lt;br /&gt;
Pour Windows :&lt;br /&gt;
 .\Terragear\terrafit.exe work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
Pour Linux :&lt;br /&gt;
 ./Terragear/terrafit work/SRTM-3&lt;br /&gt;
&lt;br /&gt;
==== Données d'aéroports ====&lt;br /&gt;
Maintenant que nous avons les données d'élévation, nous pouvons générer nos aéroports. Tout d'abord, créons un répertoire &amp;lt;code&amp;gt;data/airports/&amp;lt;/code&amp;gt; et copions-y votre fichier apt.dat. Celui-ci peut-être soit directement celui de votre paquetage de donnés FlightGear (bien que vous devrez le dé-zipper), soit un fichier que vous auriez modifié avec [[WorldEditor]].&lt;br /&gt;
&lt;br /&gt;
La commande pour créer les aéroports est &amp;quot;genapts850&amp;quot;. Lancez-la sans aucun arguments afin de visualiser les différentes options de ligne de commande.&lt;br /&gt;
&lt;br /&gt;
Si elle est simplement lancée avec un fichier apt.dat spécifié et le répertoire de travail, elle générera les agencements d'aéroports pour chaque aéroport contenu dans le fichier, ce qui peut être long. Vérifiez que l'entrée n'est pas le fichier apt.dat.gz, mais le fichier décompressé. Sinon genapts850 bloquera et ne produira aucune sortie.&lt;br /&gt;
&lt;br /&gt;
Si vous créez juste un seul aéroport, et que vous connaissez son identifiant OACI (par exemple [[Fr/Aéroport international de San Francisco|KSFO]], EGPH, EG32), utilisez le comme suit à partir du répertoire racine des scènes (c'est à dire à partir du répertoire parent de vos répertoires data, work et output). Si vous utilisez un fichier apt.dat contenant un seul aéroport, vous pouvez omettre le paramètre &amp;lt;code&amp;gt;--airport&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
 genapts850 --input=data/airports/apt.dat --work=./work --airport=&amp;lt;IDENTIFIANT_OACI_AEROPORT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ou, si vous avez les données d'élévation disponible:&lt;br /&gt;
&lt;br /&gt;
 genapts850 --input=data/airports/apt.dat --work=./work --dem-path=SRTM-3&lt;br /&gt;
&lt;br /&gt;
Si vous générez des scènes plus grandes, alors vous pouvez spécifier les longitudes et latitudes minimum et maximum.&lt;br /&gt;
&lt;br /&gt;
Genapts va créer deux sous-répertoires dans votre répertoire work:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;AirportArea/&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;AirportObj/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ils contiennent les définitions des agencement de l'aéroport, et de tous les objets présents (par exemple les manches à air et balises).&lt;br /&gt;
&lt;br /&gt;
==== Données d'utilisation du sol ====&lt;br /&gt;
Les dernières données que nous avons besoin de générer sont celles correspondant au type d'utilisation du sol. En général, elles proviennent du lot de données VMAP0 en tant que fichiers de formes en provenance du serveur de carte de la base de données des scènes, mais d'autres sources peuvent aussi être utilisées.&lt;br /&gt;
&lt;br /&gt;
Les données d'utilisation du sol peuvent être séparées en différents types :&lt;br /&gt;
&lt;br /&gt;
* '''Landmass :''' sépare la terre de la mer. Ces données sont utilisées comme masque pour toutes les autres données. Les plus couramment utilisées sont le Landmass VMAP0, mais GSHHS peut également être utilisé.&lt;br /&gt;
* '''Land use data :''' définit si une portion de terrain correspond à une forêt, une zone urbaine, du sable, de la lave, des glaciers, etc. Ce sont généralement données VMAP0 définies en tant que polygones.&lt;br /&gt;
* '''Line data :''' comprend les lignes de chemins de fer, les rivières, les routes. Typiquement VMAP0, mais aussi OpenStreetMap pour les routes.&lt;br /&gt;
* '''Point data :''' est actuellement uniquement utilisé pour définir les villes.&lt;br /&gt;
&lt;br /&gt;
De loin, le moyen le plus facile pour obtenir ces données est de télécharger à partir du magnifique [http://mapserver.flightgear.org MapServer] les fichiers formes pour une zone de scène donnée. Cliquez sur le lien &amp;quot;Download Shapefiles&amp;quot; (ou allez directement à : http://mapserver.flightgear.org/download.psp). Entrez dans la boîte de délimitation de la scène que vous désirez générer, sélectionnez le type de données de fichier-formes que vous voulez, et cliquez sur '''download'''. Pour les scènes de base, prenez tout ce qui est listé sous VMap0 (c'est-à-dire utilisant le préfixe v0_).&lt;br /&gt;
 &lt;br /&gt;
Téléchargez chaque fichier-forme dans un répertoire séparé (!) &amp;lt;tt&amp;gt;data/shapefiles/...&amp;lt;/tt&amp;gt;. Ainsi, pour v0_landmass, vous obtiendriez &amp;lt;tt&amp;gt;data/shapefiles/v0_landmass/v0_landmass.shp&amp;lt;/tt&amp;gt;, etc.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez charger ces fichiers-formes dans un éditeur SIG tel que [[QGIS]] ou GRASS pour les visualiser et les éditer. C'est une bonne idée pour vérifier que vous avez bien les bons fichiers ! Plus tard, vous pourrez expérimenter en remplaçant divers fichiers-formes avec d'autres versions (GSHHS pour la côte, OSM pour les routes, etc.).&lt;br /&gt;
&lt;br /&gt;
L'étape suivante décode les fichiers-formes vers le format TerraGear en utilisant la commande '''ogr-decode''' . &lt;br /&gt;
&lt;br /&gt;
Il y a trois arguments de ligne de commande importants pour ogr-decode :&lt;br /&gt;
* le répertoire de destination pour les données décodées,&lt;br /&gt;
* la localisation du répertoire de fichiers-formes,&lt;br /&gt;
* le type de matériau.&lt;br /&gt;
&lt;br /&gt;
Chaque fichier-forme correspond avec un des types de matériau défini dans les fichiers materials.xml. La correspondance est assez évidente. Par exemple, v0_mixedcroppasturecover correspond à MixedCropPastureCover. Notez que les types de matériau sont sensibles à la casse, donc il est bon de se référer au fichier &amp;lt;tt&amp;gt;[[$FG ROOT]]/materials.xml&amp;lt;/tt&amp;gt; pour vérifier. L'exception est v0_landmass, qui DOIT correspondre au type Default.&lt;br /&gt;
&lt;br /&gt;
En complément, il existe de nombreux arguments optionnels pour indiquer la largeur des données linéaires (pour les routes, les rivières, les voies de chemin de fer), quelle largeur utiliser pour les données de type point (pour les villes) et quelle est la plus grande longueur acceptable pour une ligne droite.&lt;br /&gt;
&lt;br /&gt;
Par exemple, pour décoder le fichier-forme v0_landmass, vous entrez la commande suivante :&lt;br /&gt;
&lt;br /&gt;
ogr-decode --max-segment 500 --area-type Default work/Landmass data/shapefiles/v0_landmass&lt;br /&gt;
&lt;br /&gt;
Pour créer des rivières de 10 mètres de large :&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --max-segment 500 --line-width 10 --area-type Stream work/Stream data/shapefiles/v0_stream&lt;br /&gt;
&lt;br /&gt;
Pour générer des villes d'environ 1 kilomètre de diagonale :&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --point-width 500 --area-type Town work/Town data/shapefiles/v0_town&lt;br /&gt;
&lt;br /&gt;
Lancez cette commande pour chaque fichier-forme du lot de données.&lt;br /&gt;
&lt;br /&gt;
== Générer les scènes ==&lt;br /&gt;
Vous avez maintenant un répertoire de travail, avec des sous-répertoires comme :&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
: AirportArea&lt;br /&gt;
: AirportObj&lt;br /&gt;
: Bog&lt;br /&gt;
: DryCropPastureCover&lt;br /&gt;
: EvergreenBroadCover&lt;br /&gt;
: GrassCover&lt;br /&gt;
: IrrCropPastureCover&lt;br /&gt;
: Lake&lt;br /&gt;
: Landmass&lt;br /&gt;
: Marsh&lt;br /&gt;
: MixedCropPastureCover&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
: MixedForestCover&lt;br /&gt;
: Railroad&lt;br /&gt;
: Road&lt;br /&gt;
: Sand&lt;br /&gt;
: ScrubCover&lt;br /&gt;
: Shared&lt;br /&gt;
: SRTM-3&lt;br /&gt;
: Stream&lt;br /&gt;
: Town&lt;br /&gt;
: Urban&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Nous pouvons maintenant générer les scènes en utilisant la commande fgfs-construct. Lancez la commande avec &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; pour obtenir les informations d'utilisation. &lt;br /&gt;
&lt;br /&gt;
Nous devons définir :&lt;br /&gt;
* Les répertoires de travail (--work-dir) et de sortie (--output-dir) .&lt;br /&gt;
** '''Notez''', au sujet du répertoire de sortie : il doit pointer vers le répertoire &amp;lt;tt&amp;gt;Terrain/&amp;lt;/tt&amp;gt;, sinon, les versions récentes FlightGear seront incapables de charger le terrain.&lt;br /&gt;
* Le centre de la scène que nous voulons générer (--lat, --lon).&lt;br /&gt;
* Le rayon (--xdist, --ydist) à partir duquel on génère.&lt;br /&gt;
* Tous les répertoires de travail à inclure dans la scène.&lt;br /&gt;
&lt;br /&gt;
Par exemple :&lt;br /&gt;
{{Pre2|&amp;lt;nowiki&amp;gt;fgfs-construct --work-dir=./work --output-dir=./output/Terrain --lon=55 --lat=60 --xdist=3 --ydist=3 AirportArea SRTM-3 AirportObj Stream Bog IrrCropPastureCover Town Lake Urban Landmass Railroad DryCropPastureCover Road EvergreenBroadCover Marsh Sand MixedCropPastureCover ScrubCover GrassCover MixedForestCover&amp;lt;/nowiki&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Lorsque cette commande se termine, le répertoire de sortie contiendra un sous-répertoire scenery. Pointez vers lui en paramétrant [[$FG_SCENERY]] ou en utilisant l'option de ligne de commande --fg-scenery à fgfs, et testez votre nouvelle scène !&lt;br /&gt;
&lt;br /&gt;
== Un soucis ? ==&lt;br /&gt;
Vous trouverez ci-dessous une liste de problèmes courants et leur solutions. Dans le doute, copiez/collez votre erreur dans Google. La plupart des problèmes (en particulier lors de la compilation de TerraGear) ont déjà été évoqués :&lt;br /&gt;
&lt;br /&gt;
* Crash de genapts. Quelquefois, genapts plante avec certains aéroports. Dans ce cas, essayez de le relancer avec l'argument --start-id pour démarrer à l'aéroport sur lequel il a planté, et l'argument --nudge pour essayer de remettre les calculs dans la bonne voie.&lt;br /&gt;
* fgfs-construct tué. Le processus fgfs-construct peut se suicider s'il consomme trop de ressources système. L'augmentation des valeurs pour setrlimit dans src/BuildTiles/Main/main.cxx est la meilleure solution.&lt;br /&gt;
* Les aéroports apparaissent au fond de trous, ou il y a des espaces entre les aéroports et la scène. Ceci arrive lorsque genapts est incapable de trouver la donnée d'élévation correcte, ou alors la donnée d'élévation a changé entre le lancement de genapts et celui de shape-decode. Essayez de générer un seul aéroport dans votre zone de scène en utilisant genapts, et visualisez la sortie. En particulier, soyez sûr que le répertoire work/SRTM-3 existe. &lt;br /&gt;
* Seuls les aéroports apparaissent dans la scène. Il existe trois explications typiques :&lt;br /&gt;
** vous n'avez pas téléchargé les fichiers-formes corrects de la zone;&lt;br /&gt;
** vous n'avez pas lancé shape-decode sur le fichier-forme v0_landmass comme Default &lt;br /&gt;
** vous n'avez pas inclus les répertoires corrects dans fgfs-construct. &lt;br /&gt;
* La scène générée contient des données effacées des fichiers-formes. Si vous éditez des fichiers-formes, vous devez effacer le sous-répertoire work approprié avant de lancer shape-decode. Sinon, vos changements s'ajouteront à ceux qui existent déjà.&lt;br /&gt;
* La scène entière est plate et au niveau de la mer. C'est généralement dû au fait que vous n'avez pas inclus les données d'élévation dans votre commande fgfs-construct. Assurez-vous qu'il existe un répertoire STRM-3 précisé dans la ligne de commande. &lt;br /&gt;
* Tout terrain copie le matériel d'un fichier-forme. Vous avez probablement oublié de mettre chacun des fichiers-formes téléchargés dans un répertoire séparé à l'intérieur du répertoire Data/shapefiles. &lt;br /&gt;
&lt;br /&gt;
{{Terra}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery enhancement]]&lt;br /&gt;
[[en:Using TerraGear]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Using_TerraGear&amp;diff=106015</id>
		<title>Using TerraGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Using_TerraGear&amp;diff=106015"/>
		<updated>2016-11-20T17:36:03Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Airport data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Out of date}}&lt;br /&gt;
&lt;br /&gt;
[[File:Terragearprocesschart.png|thumb|TerraGear Process Flow Chart]]&lt;br /&gt;
The [[TerraGear]] software project supports [[FlightGear]] by creating the files used by FlightGear to represent the elevation and texture of the earth, including airports, cities, fields, forests, rivers, roads and so on. The TerraGear software reads data files containing ground elevation, airport locations and layouts, geographical land-cover data, and more, and produces the scenery files used by FlightGear to represent the terrain of the world.&lt;br /&gt;
&lt;br /&gt;
For simplicity and convenience, most FlightGear users simply download the plug-and-play scenery files from the FlightGear scenery server, or use [[TerraSync]] to automatically download scenery as needed. But there is a variety of reasons you might want to use TerraGear to produce your own terrain files, rather than downloading the standard FlightGear scenery. &lt;br /&gt;
&lt;br /&gt;
For instance, if you use [[WorldEditor]] to modify/improve information about an [[:Category:Airports|airport]]'s taxiway/apron layout, you might wish to see how that modified airport would look in the scenery before deciding you're happy with the results. Maybe the official scenery is too detailed for your slow machine, and you'd like to build terrain using a digital elevation model (DEM) with poorer resolution, to decrease the number of polygons and thus improve your framerates. Or maybe you've got a fantastically fast machine, and you want to build your own terrain using higher-resolution vector data (vmap1, Tiger, osm) to get better roads/streams. For all these reasons, learning how to use TerraGear is a good idea.&lt;br /&gt;
&lt;br /&gt;
== Obtaining TerraGear ==&lt;br /&gt;
You can either build TerraGear yourself, or download a pre-compiled binary. The later is the easiest and advised for starters.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1a - Download TerraGear pre-compiled (recommended for beginners) on Windows'''&lt;br /&gt;
*# Download the latest TerraGear build from the [http://build.flightgear.org:8080/job/TerraGear-Win-Cmake/lastSuccessfulBuild/artifact/*zip*/archive.zip FlightGear Build Server].&lt;br /&gt;
*# Create or choose a directory to hold the TerraGear tools. &lt;br /&gt;
*# Unzip the package and move the files from &amp;lt;code&amp;gt;archive/install/msvc100/TerraGear/bin&amp;lt;/code&amp;gt; into a sub-directory named &amp;lt;code&amp;gt;Terragear/&amp;lt;/code&amp;gt; in the base directory.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1b - Download ppa packages for Ubuntu Linux'''&lt;br /&gt;
&lt;br /&gt;
https://launchpad.net/~saiarcot895/+archive/ubuntu/flightgear-edge/+index?batch=75&amp;amp;memo=75&amp;amp;start=75&lt;br /&gt;
&lt;br /&gt;
* '''Option 2 - Compile TerraGear from source code''' as explained in [[Building TerraGear|this article]].&lt;br /&gt;
&lt;br /&gt;
{{note|1=You might need &amp;lt;code&amp;gt;default_priorities.txt&amp;lt;/code&amp;gt; from the {{terragear source|path=src/BuildTiles/Main/default_priorities.txt|text=git repository}} or from the archive downloaded from the build server (in the &amp;lt;code&amp;gt;archive/install/msvc100/TerraGear/share&amp;lt;/code&amp;gt; subdirectory). See [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;p=77950 this forum thread] for details.}}&lt;br /&gt;
&lt;br /&gt;
=== GUI tool ===&lt;br /&gt;
A [[TerraGear GUI]] is available for those that would like to use TerraGear without knowing/using the command line options.&lt;br /&gt;
&lt;br /&gt;
== Using TerraGear ==&lt;br /&gt;
First, choose the boundaries for the area of scenery you want to build, in terms of latitude and longitude. The smaller the area of scenery you generate, the smaller the amount of data you will need, and the less CPU time it will take. For example, if you are just interested in generating a new airport layout at 12.3W 34.4N, then simply generating the scenery between 12W 34N and 13W 35N would be sufficient. &lt;br /&gt;
&lt;br /&gt;
Write down the bounding box (minimum and maximum longitude and latitude) for the scenery you want to generate. Remember that West and South are negative - in essence 4W 10S would be -4, -10. Try not to get mixed up, otherwise you'll end up generating scenery or airports on the other side of the planet! &lt;br /&gt;
&lt;br /&gt;
You'll be dealing with multiple different types of data in various formats. Create a new directory for your scenery work. Within that directory, create the following sub-directories: &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;data/&amp;lt;/code&amp;gt;:    For raw and pre-processed data (eg elevation files) &lt;br /&gt;
; &amp;lt;code&amp;gt;output/&amp;lt;/code&amp;gt;:  For the scenery files you will create &lt;br /&gt;
; &amp;lt;code&amp;gt;work/&amp;lt;/code&amp;gt;:    For data that has been processed (eg by shape-decode) and is ready to be munged into scenery &lt;br /&gt;
&lt;br /&gt;
=== Obtaining and processing data ===&lt;br /&gt;
TerraGear uses three different kinds of information to generate scenery:&lt;br /&gt;
&lt;br /&gt;
# The elevation of the land (provided by SRTM) &lt;br /&gt;
# The location and layout of airports (provided by apt.dat or a custom .dat) &lt;br /&gt;
# Whether a given lat/lon is sea, land, city, forest, town, road, railway (provided by VMAP0, [[CORINE]] etc. or custom shapefiles) &lt;br /&gt;
&lt;br /&gt;
This article describes how obtain and process each of these types of data in order, and bring it together for use by FlightGear. The order of these steps is important. For example, the airport data step needs the elevation data to determine the elevation of the airports and thus you should start with preparing elevation data.&lt;br /&gt;
&lt;br /&gt;
{{caution|For inclusion in the official FlightGear scenery, all data '''must''' come from [[GNU GPL]] compatible sources!}}&lt;br /&gt;
&lt;br /&gt;
==== Elevation data ====&lt;br /&gt;
The best worldwide elevation data currently available is from the Shuttle Radar Topography Mission (SRTM). There are two types of SRTM data: &lt;br /&gt;
* Highly accurate 1-arcsecond resolution data, known as SRTM-1, for the USA &lt;br /&gt;
* Less accurate 3-arcsecond resolution data, known as SRTM-3, for the rest of the world. &lt;br /&gt;
From now on, we'll assume you are using SRTM-3 data. Unless otherwise noted, the process for SRTM-1 is identical.&lt;br /&gt;
&lt;br /&gt;
You can download the appropriate data from http://dds.cr.usgs.gov/srtm/version2_1/. You want all .hgt.zip files covering your region of interest. Depending on the size of your scenery, there may be quite a few. Download them to &amp;lt;code&amp;gt;data/SRTM-1/&amp;lt;/code&amp;gt; (or SRTM-3/SRTM-30 depending on the type you downloaded) in your base directory. (Genapts looks for a few known, hardcoded elevation data directories in its working directory. SRTM-30 is one of them and this is the least confusing in that list. Note: W.E.F. 31st July 2010, the genapts tool now also looks for SRTM-1/SRTM-3 directories. If you are using an older version, please supply the directories using --dem-path).&lt;br /&gt;
&lt;br /&gt;
Now we've got the data, we need to convert it into something of use to TerraGear. First, you need to unzip each of the .hgt files. After that, open the commandline (Windows: Start &amp;gt; Run &amp;gt; &amp;lt;code&amp;gt;cmd.exe&amp;lt;/code&amp;gt;) and change into the base directory (&amp;lt;code&amp;gt;cd .../.../TerraGear&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{note|According to [[TerraGear_Documentation]], hgtchop is superseded by gdalchop.}}&lt;br /&gt;
{{note|For SRTM-1 data, replace the &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; by a &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; in the first argument to hgtchop}}&lt;br /&gt;
{{tip|If you want to create a batch-file, replace &amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;%%f&amp;lt;/code&amp;gt;, see [http://technet.microsoft.com/en-us/library/bb490909.aspx]}}&lt;br /&gt;
&lt;br /&gt;
For Windows:&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 %f .\work\SRTM-3&lt;br /&gt;
or&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 .\data\SRTM-3\%f .\work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
For Linux:&lt;br /&gt;
 for f in ${PWD}/data/SRTM-3/*.hgt; do ./Terragear/hgtchop 3 &amp;quot;${f}&amp;quot; &amp;quot;${PWD}/work/SRTM-3&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
Now you will get a lot of .arr.gz files in your work/SRTM-3/ directory. We need to convert these to the .fit.gz format. Run the commandline again with&lt;br /&gt;
&lt;br /&gt;
{{note|The space and dot at the and are important!}}&lt;br /&gt;
&lt;br /&gt;
For Windows:&lt;br /&gt;
 .\Terragear\terrafit.exe work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
For Linux:&lt;br /&gt;
 ./Terragear/terrafit work/SRTM-3&lt;br /&gt;
&lt;br /&gt;
==== Airport data ====&lt;br /&gt;
Now we've got elevation data, we can generate our airports. First, create a &amp;lt;code&amp;gt;data/airports/&amp;lt;/code&amp;gt; directory and copy in your apt.dat file. This may be direct from your FlightGear data package (though you'll need to unzip it), or it may be one that you've modified with [[WorldEditor]]. &lt;br /&gt;
&lt;br /&gt;
The command to create airports is &amp;quot;genapts850&amp;quot;. Run it without any arguments to see the various command-line options. &lt;br /&gt;
&lt;br /&gt;
If it is simply run with a specified apt.dat and work directory, it will generate airport layouts for every airport in the file, which can take a long time. Make sure the input is not the apt.dat.gz, but an uncompressed file. Otherwise genapts850 will block and not produce any output.&lt;br /&gt;
&lt;br /&gt;
If you are just creating a single airport and you know the ICAO ID (for example [[San Francisco International Airport|KSFO]], EGPH or EG32), use it as follows from your root scenery directory (in essence the directory above your data, work and output directories). If you use an apt.dat file with one single airport in it you should omit the &amp;lt;code&amp;gt;--airport&amp;lt;/code&amp;gt; parameter. &lt;br /&gt;
&lt;br /&gt;
 genapts850 --input=data/airports/apt.dat --work=./work --airport=&amp;lt;AIRPORT_ID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or, if you have elevation data available:&lt;br /&gt;
&lt;br /&gt;
 genapts850 --input=data/airports/apt.dat --work=./work --dem-path=SRTM-3&lt;br /&gt;
&lt;br /&gt;
If you are generating a larger set of scenery, then you can specify the minimum and maximum longitude and latitude. &lt;br /&gt;
&lt;br /&gt;
Genapts will create two sub-directories in your work directory:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;AirportArea/&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;AirportObj/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These contain the definitions of the airport layout and any objects present (e.g. windsocks and beacons).&lt;br /&gt;
&lt;br /&gt;
==== Landuse data ====&lt;br /&gt;
The final piece of data we need to generate is the landuse data. In general, this is taken from the VMAP0 dataset as shapefiles from the scenery database mapserver, but other sources can also be used.&lt;br /&gt;
&lt;br /&gt;
The landuse data can be split into a number of different types:&lt;br /&gt;
&lt;br /&gt;
; Landmass:  Separates the land from the sea. It can be used as a mask for all other data. The most commonly used is the VMAP0 Landmass, but GSHHS can also be used. When running tg-construct with &amp;lt;code&amp;gt;--ignore-landmass&amp;lt;/code&amp;gt;, all input shapefiles will be taken into consideration, so no landmass mask is required then.&lt;br /&gt;
; Land use data:  Defines whether a piece of land is forest, urban, sand, lava, glacier etc. These are usually VMAP0 data, defined as polygons.&lt;br /&gt;
; Line data:  Includes railroads, streams, roads. Typically VMAP0, but also Open Street Map for roads.&lt;br /&gt;
; Point data:  Is currently only used for defining towns.&lt;br /&gt;
 &lt;br /&gt;
By far the easiest way to get this data is to download shapefiles from the wonderful [http://mapserver.flightgear.org MapServer]. The MapServer lets you download the shapefiles for any selected scenery area. Click on the &amp;quot;Download Shapefiles&amp;quot; link (or go direct: http://mapserver.flightgear.org/download.psp). Enter in the bounding box of the scenery you want to generate, select the type of shapefile data you want, and click download. &lt;br /&gt;
&lt;br /&gt;
==== Layers ====&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;v0&amp;lt;/code&amp;gt;:  Global coverage, low detail. This is &amp;quot;the last resort&amp;quot;, but unfortunately it is the only layer that covers the entire world.&lt;br /&gt;
; &amp;lt;code&amp;gt;cs&amp;lt;/code&amp;gt;:  It is v0 with some contributions someone did in the past. Get this instead of v0.&lt;br /&gt;
; &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt;:  Only parts of some countries available, higher detail than v0.&lt;br /&gt;
; &amp;lt;code&amp;gt;clc06&amp;lt;/code&amp;gt;:  European '''only'''. Very high detail, this is the preferred choice for an European country.&lt;br /&gt;
; &amp;lt;code&amp;gt;osm&amp;lt;/code&amp;gt;:  Global coverage, high resolution but very low detail.&lt;br /&gt;
: This means: if you are interested in an area out of Europe and forests are defined in OpenStreetMaps for your area, this is going to be the best data source. If forests are not defined, you will get a dull, neverending DEFAULT landclass. OSM provides the best coastline and I encourage you to use this coastline even in Europe. [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;t=25549&amp;amp;sid=d501cb651ef9e34ca9dc8fae429d51ab&amp;amp;p=234002#p234002]&lt;br /&gt;
&lt;br /&gt;
{{caution|Make sure each shape file is in its own directory whether you download shape files or create your own otherwise the ogrDecode step will fail.}}&lt;br /&gt;
Download each shapefile into a seperate (!) &amp;lt;code&amp;gt;data/shapefiles/...&amp;lt;/code&amp;gt; directory. So, for v0_landmass, you would end up with &amp;lt;code&amp;gt;data/shapefiles/v0_landmass/v0_landmass.shp&amp;lt;/code&amp;gt; etc.&lt;br /&gt;
&lt;br /&gt;
You can load these shapefiles into a GIS editor such as [[QGIS]] or GRASS to view and edit. This is a good idea to verify you have the correct files! Later on, you can experiment with replacing various shapefiles with other versions (GSHHS for coastline, OSM for roads etc.).&lt;br /&gt;
&lt;br /&gt;
The next step is to decode the shape-files into TerraGear format using the '''ogr-decode''' command. &lt;br /&gt;
&lt;br /&gt;
There are three important command-line arguments for ogr-decode:&lt;br /&gt;
* the destination directory for the decoded data&lt;br /&gt;
* the location of the shapefile's directory&lt;br /&gt;
* the material type&lt;br /&gt;
&lt;br /&gt;
Each shape-file corresponds with one of the material types defined in the materials.xml files. The mapping is pretty obvious. For example, &amp;lt;code&amp;gt;v0_mixedcroppasturecover&amp;lt;/code&amp;gt; maps to &amp;lt;code&amp;gt;MixedCropPastureCover&amp;lt;/code&amp;gt;. Note that the material types are case-sensitive, so it is a good idea to refer to the &amp;lt;code&amp;gt;[[$FG_ROOT]]/Materials/default/materials.xml&amp;lt;/code&amp;gt; file (&amp;lt;code&amp;gt;[[$FG ROOT]]/materials.xml&amp;lt;/code&amp;gt; in FlightGear 2.6.0 and older) to hand so you can check. The exception is landmass, which - when used - MUST be mapped onto the type Default.&lt;br /&gt;
&lt;br /&gt;
Additionally, there are a number of optional arguments, to indicate the width of line data (for roads, streams, railways), how large to make point data (for towns) and how long the longest straight line is allowed to be.&lt;br /&gt;
&lt;br /&gt;
For example, to decode the &amp;lt;code&amp;gt;v0_landmass&amp;lt;/code&amp;gt; shapefile, you use the following command:&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --max-segment 500 --area-type Default work/Default data/shapefiles/v0_landmass&lt;br /&gt;
&lt;br /&gt;
To create streams of width 10 metres&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --max-segment 500 --line-width 10 --area-type Stream work/Stream data/shapefiles/v0_stream&lt;br /&gt;
&lt;br /&gt;
To generate some towns about 1km across&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --point-width 500 --area-type Town work/Town data/shapefiles/v0_town&lt;br /&gt;
&lt;br /&gt;
Run this command for each shapefile in the set.&lt;br /&gt;
&lt;br /&gt;
== Generating scenery ==&lt;br /&gt;
You will now have a work directory, with subdirectories like:&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
: AirportArea&lt;br /&gt;
: AirportObj&lt;br /&gt;
: Bog&lt;br /&gt;
: Default&lt;br /&gt;
: DryCropPastureCover&lt;br /&gt;
: EvergreenBroadCover&lt;br /&gt;
: GrassCover&lt;br /&gt;
: IrrCropPastureCover&lt;br /&gt;
: Lake&lt;br /&gt;
: Marsh&lt;br /&gt;
: MixedCropPastureCover&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
: MixedForestCover&lt;br /&gt;
: Railroad&lt;br /&gt;
: Road&lt;br /&gt;
: Sand&lt;br /&gt;
: ScrubCover&lt;br /&gt;
: Shared&lt;br /&gt;
: SRTM-3&lt;br /&gt;
: Stream&lt;br /&gt;
: Town&lt;br /&gt;
: Urban&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Now we can actually generate the scenery. This is done by the tg-construct command. Run the command with &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; to get usage information. &lt;br /&gt;
&lt;br /&gt;
We need to define:&lt;br /&gt;
* The work (&amp;lt;code&amp;gt;--work-dir&amp;lt;/code&amp;gt;) and output (&amp;lt;code&amp;gt;--output-dir&amp;lt;/code&amp;gt;) directories.&lt;br /&gt;
* The center of the scenery we want to generate (&amp;lt;code&amp;gt;--lat&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--lon&amp;lt;/code&amp;gt;).&lt;br /&gt;
* The radius (&amp;lt;code&amp;gt;--xdist&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--ydist&amp;lt;/code&amp;gt;) from which to generate.&lt;br /&gt;
* All the work directories to include in the scenery.&lt;br /&gt;
&lt;br /&gt;
{{note|The output directory must point to a &amp;lt;code&amp;gt;Terrain/&amp;lt;/code&amp;gt; directory, else recent FlightGear versions will be unable to load the terrain.}}&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
{{Pre2|&amp;lt;nowiki&amp;gt;tg-construct --work-dir=./work --output-dir=./output/Terrain --min-lon=55 --max-lon=57 --min-lat=60 --max-lat=62 AirportArea SRTM-3 AirportObj Default Stream Bog IrrCropPastureCover Town Lake Urban Railroad DryCropPastureCover Road EvergreenBroadCover Marsh Sand MixedCropPastureCover ScrubCover GrassCover MixedForestCover&amp;lt;/nowiki&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
When this finishes, the output directory will contain a scenery sub-tree. Point to it by setting either [[$FG_SCENERY]] or by using the &amp;lt;code&amp;gt;--fg-scenery&amp;lt;/code&amp;gt; command-line option to fgfs, and give your new scenery a try!&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Below is a list of common problems and solutions. If in doubt - Google it. Many problems (particularly when compiling TerraGear) have been hit before: &lt;br /&gt;
&lt;br /&gt;
* Crashes in genapts. Sometimes genapts will crash when dealing with a particular airport. In that case, try running it again with the &amp;lt;code&amp;gt;--start-id&amp;lt;/code&amp;gt; argument to start at the airport it failed on, and the &amp;lt;code&amp;gt;--nudge&amp;lt;/code&amp;gt; argument which tries to nudge the calculations in the right direction. &lt;br /&gt;
* tg-construct killed. The tg-construct process may kill itself if it is using too many system resources. Increasing the values for &amp;lt;code&amp;gt;setrlimit&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;src/BuildTiles/Main/main.cxx&amp;lt;/code&amp;gt; is the best solution. &lt;br /&gt;
* tg-construct silently stops immediately without an error and nothing goes to the &amp;quot;output&amp;quot; directory: make sure that lon/lat values correspond to tiles boundaries. See [[Tile Index Scheme]]&lt;br /&gt;
* Airports appear in the bottom of holes, or there are spaces between the airports and the scenery. This typically happens when genapts is unable to find the correct elevation data, or the elevation data changed between running genapts and shape-decode. Try generating a single airport in your scenery area using genapts, and look at the output. In particular, make sure there is a work/SRTM-3 directory. &lt;br /&gt;
* Only the airports appear in the scenery. There are three typical causes for this: &lt;br /&gt;
** You didn't download the correct shapefiles for the area. &lt;br /&gt;
** You haven't run shape-decode on the &amp;lt;code&amp;gt;v0_landmass&amp;lt;/code&amp;gt; shapefile as Default &lt;br /&gt;
** You didn't include the correct directories in tg-construct. &lt;br /&gt;
* Generate scenery includes data removed from the shapefiles. If you are editing shapefiles, you need to delete the appropriate work subdirectory before running shape-decode. Otherwise your changes will be in addition to those already present. &lt;br /&gt;
* All the scenery is flat and at sea-level. Typically this is because you didn't include any elevation data in your tg-construct command. Make sure there's a STRM-3 directory included in the command-line. &lt;br /&gt;
* All terrain copies the material of a certain shapefile. You have probably forgotten to put each of the downloaded shapefiles in a seperate directory inside the Data/shapefiles directory.&lt;br /&gt;
* genapts850 never passes the stage &amp;quot;Adding airport &amp;lt;ICAO&amp;gt; to parse list&amp;quot;: did you unzip &amp;lt;code&amp;gt;apt.dat.gz&amp;lt;/code&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
== General comments from forum discussion ==&lt;br /&gt;
{{cquote|f-ojac, you are right, the parameters used in scenery 2.0 were &amp;quot;-e 5 -x 20000&amp;quot; according to the wiki. I don't know why I had the impression these parameters were not public. In any case, it does not matter because using the same parameters will create closer results, but they are not guaranteed to be the same.&lt;br /&gt;
&lt;br /&gt;
The parameters used to create scenery 2,0 seem to be:&lt;br /&gt;
&lt;br /&gt;
-m ??: the minimum number of vertices in a tile. In FG, any number bellow 100 (and probably, any number below 1000) will do. I don't think there is any surface on the world perfectly flat for several kilometers. The default value is 50 and I'm sure is ok for any normal use.&lt;br /&gt;
-e 5: the max allowed error for elevation, in meters. That is: if terrafit calculates a simplification of the terrain where all points are at most this distance from the real elevation, no more vertices are created. The default value is 40 meters: a point may have an elevation error up to 40m (~100ft) High values for this parameter create less detailed mountains and smaller (in disk size) and more efficient (in FPS) terrain.&lt;br /&gt;
-x 20000: the max number of vertices in a tile. If this number of vertices is reached, terrafit stop regardless the max error of the vertices. The default value is 1000&lt;br /&gt;
&lt;br /&gt;
Keep in mind you can set values that do not make sense:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;-e 1 -x 100&amp;quot; does not make sense because it is going to be impossible to calculate errors less than 1 meters using only 100 vertices. The max number of vertices will be reached always and the max error will be probably ignored.&lt;br /&gt;
* &amp;quot;-e 300 -x 20000&amp;quot; does not make sense, tiles are going to use for sure much less vertices than 20,000 because you are allowing huge elevation errors.&lt;br /&gt;
&lt;br /&gt;
If you want an efficient scenery (less vertices), use the default values &amp;quot;-e 40 -x 1000&amp;quot;. If you want more accurate elevation at the cost of disk space and FPS, use values similar to scenery 2.0 (&amp;quot;-e 5 -x 20000&amp;quot;) Anything in the middle will produce performance and disk use in the middle.&amp;lt;ref&amp;gt;{{cite web |url=http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;t=24681#p225363 &lt;br /&gt;
|title=Re: Terrasync Help (surprinsingly!) :)&lt;br /&gt;
|author=ludomotico |date= Mon Nov 24, 2014 4:28 am}}&amp;lt;/ref&amp;gt;|ludomotico}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto:Create custom terrain]], editing/making terrain data.&lt;br /&gt;
* [[TerraGear CORINE]], building terrain from CORINE data.&lt;br /&gt;
* [[TerraGear Documentation]], using TerraGear details.&lt;br /&gt;
&lt;br /&gt;
{{Terra}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery enhancement|TerraGear, Using]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Utiliser TerraGear]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Fr/Utiliser_TerraGear&amp;diff=105994</id>
		<title>Fr/Utiliser TerraGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Fr/Utiliser_TerraGear&amp;diff=105994"/>
		<updated>2016-11-19T12:57:31Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Terragearprocesschart.png|thumb|Organigramme de TerraGear]]&lt;br /&gt;
Le projet logiciel [[Fr/TerraGear|TerraGear]] participe au projet [[Fr/FlightGear|FlightGear]] en créant les fichiers utilisés par celui-ci pour représenter le relief et la texture de la Terre, ce qui comprend les aéroports, villes, champs, forêts, rivières, routes, etc. Le logiciel TerraGear lit des fichiers de données contenant l'élévation du sol, le positionnement et l'agencement des aéroports, les données géographiques d'occupation du sol, entre autres et produit les fichiers de scènes utilisés par Flightgear pour représenter la surface de la planète.&lt;br /&gt;
&lt;br /&gt;
Par simplicité et commodité, la plupart des utilisateurs de FlightGear téléchargent simplement les fichiers plug-and-play des scènes à partir du serveur de scènes de FlightGear, ou utilisent [[Fr/TerraSync|TerraSync]] pour télécharger automatiquement les scènes à la demande. Mais il peut y avoir des cas où vous voudriez utiliser TerraGear pour générer vos propres fichiers terrain, plutôt que de télécharger les scènes standard de FlightGear.&lt;br /&gt;
&lt;br /&gt;
Par exemple, si vous utilisez  [[WorldEditor]] pour modifier/améliorer les information concernant un taxiway/une aire de trafic d'un [[:Category:Airports|aéroport]], vous pourriez avoir envie de visualiser à quoi ressemblerait cet aéroport modifié dans les scènes avant de décider que les résultats vous conviennent. Peut-être que les scènes officielles sont trop détaillées pour votre machine un peu ancienne, et que vous voudriez construire un terrain avec un modèle numérique de d'élévation (DEM) de plus faible résolution, afin de diminuer le nombre de polygones et ainsi augmenter votre taux de rafraîchissement d'image. Soit vous avez une machine ultra-rapide, et vous voulez construire votre propre terrain avec des données vectorielles de plus haute résolution (vmap1, Tiger, osm) pour obtenir de meilleures routes/rivières. Pour toutes ces raisons, apprendre à utiliser TerraGear est une bonne idée.&lt;br /&gt;
&lt;br /&gt;
== Obtenir TerraGear ==&lt;br /&gt;
Vous pouvez soit compiler TerraGear vous-même, ou bien télécharger un binaire pré-compilé, cette dernière démarche étant plus aisée et donc recommandée pour les débutants.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1 - Télécharger TerraGear pré-compilé (recommandé aux débutants) sur Windows'''&lt;br /&gt;
*# Téléchargez la dernière version de TerraGear sur le [http://build.flightgear.org:8080/job/TerraGear-Win-Cmake/lastSuccessfulBuild/artifact/*zip*/archive.zip Serveur de compilation de FlightGear].&lt;br /&gt;
*# Créez ou choisissez un répertoire pour contenir les outils TerraGear. &lt;br /&gt;
*# Dé-zippez le paquetage et déplacez les fichiers de &amp;lt;tt&amp;gt;archive/install/msvc100/TerraGear/bin&amp;lt;/tt&amp;gt; dans un sous-répertoire nommé &amp;lt;tt&amp;gt;Terragear/&amp;lt;/tt&amp;gt; dans le répertoire de base.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1b - Télécharger les paquetages ppa pour Ubuntu Linux'''&lt;br /&gt;
&lt;br /&gt;
https://launchpad.net/~saiarcot895/+archive/ubuntu/flightgear-edge/+index?batch=75&amp;amp;memo=75&amp;amp;start=75&lt;br /&gt;
&lt;br /&gt;
* '''Option 2 - Compiler TerraGear à partir du code source, comme expliqué dans [[Fr/TerraGear#Compilation|cet article]].&lt;br /&gt;
&lt;br /&gt;
{{note|1=Vous pourriez avoir besoin du fichier &amp;lt;code&amp;gt;default_priorities.txt&amp;lt;/code&amp;gt; qui peut être obtenu à partir du {{terragear source|path=src/BuildTiles/Main/default_priorities.txt|text=dépôt Git}} ou à partir de l'archive téléchargée à partir du serveur de compilation (dans le sous-répertoire &amp;lt;code&amp;gt;archive/install/msvc100/TerraGear/share&amp;lt;/code&amp;gt;). Voir [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;p=77950 ce lien du forum] pour les détails.}}&lt;br /&gt;
&lt;br /&gt;
=== Interface graphique ===&lt;br /&gt;
L'interface graphique [[TerraGear GUI]] est disponible pour ceux voudraient utiliser TerraGear sans avoir à connaître/utiliser les options de ligne de commande.&lt;br /&gt;
&lt;br /&gt;
== Utilisation de TerraGear ==&lt;br /&gt;
Tout d'abord, choisissez les limites de la zone de scène que vous voulez construire, en termes de latitude et de longitude. Plus la zone à générer sera restreinte, plus la quantité de données et le temps CPU nécessaire seront limités. Par exemple, si vous voulez juste générer une nouvelle disposition d'aéroport à la position 12°3 Ouest et 34°4 Nord, la génération des scènes entre 34°N 12°O et 35°N 13°O sera suffisante. &lt;br /&gt;
&lt;br /&gt;
Notez la boîte de délimitation (longitudes et latitudes minimum et maximum) pour la scène que vous voulez générer. Rappelez-vous que Ouest et Sud sont négatifs - c'est-à-dire que 4° Ouest 10° Sud doit être -4, -10. Essayez de ne pas vous mélanger les pinceaux, sinon la scène ou l'aéroport que vous créez se retrouvera de l'autre côté de la planète !&lt;br /&gt;
&lt;br /&gt;
Vous aurez affaire avec différents types de données utilisant des formats variés. Créez un nouveau répertoire pour votre travail de scène. A l'intérieur de ce répertoire, créez les sous-répertoires suivants: &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;data/&amp;lt;/code&amp;gt;:   Pour les données brutes et pré-calculées (par exemple, les fichiers d'élévation)&lt;br /&gt;
; &amp;lt;code&amp;gt;output/&amp;lt;/code&amp;gt;: Pour les fichiers de scènes que vous créerez&lt;br /&gt;
; &amp;lt;code&amp;gt;work/&amp;lt;/code&amp;gt;:   Pour les données qui ont été calculez (par exemple par shape-decode) et qui sont prêtes à être intégrées dans la scène&lt;br /&gt;
&lt;br /&gt;
=== Obtenir et traiter les données ===&lt;br /&gt;
Terragear utilise trois sortes d'informations différentes pour générer une scène :&lt;br /&gt;
&lt;br /&gt;
# L'élévation du terrain (fournie par SRTM)&lt;br /&gt;
# L'emplacement et la disposition des aéroports (fournis par apt.dat ou un fichier .dat personnalisé) &lt;br /&gt;
# Si une lat/lon donnée correspond à la mer, la terre, une ville, une forêt, un village, une route, un chemin de fer (fourni par VMAP0, [[CORINE]], etc. ou par des fichiers personnalisés de formes)&lt;br /&gt;
&lt;br /&gt;
Cet article décrit comment obtenir et traiter chacun de ces types de données dans l'ordre, et les fournir ensemble, pour que FlightGear les utilise. L'ordre de ces étapes est important. Par exemple, l'étape des données d'un aéroport a besoin des données d'élévation pour déterminer l'élévation des aéroports. Ainsi, vous commencerez par préparer les données d'élévation.&lt;br /&gt;
&lt;br /&gt;
{{caution|Pour l'inclusion dans les scènes officielles de FlightGear, toutes les données ''doivent'' provenir de sources compatibles avec la licence [[GNU GPL]]!}}&lt;br /&gt;
&lt;br /&gt;
==== Données d'élévation ====&lt;br /&gt;
Les meilleures données d'élévation actuellement disponibles proviennent du projet Shuttle Radar Topography Mission (SRTM). Il y a deux types de données SRTM :&lt;br /&gt;
* Données de haute précision (résolution 1-arc seconde), ou SRTM-1, pour les USA&lt;br /&gt;
* Données de précision moindre (résolution 3-arc second), ou SRTM-3, pour le reste du monde.&lt;br /&gt;
&lt;br /&gt;
A partir de maintenant, nous supposerons que vous utilisez les données SRTM-3. Sauf mention contraire, le processus est identique pour SRTM-1.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez télécharger les données appropriées à partir du site http://dds.cr.usgs.gov/srtm/version2_1/. Vous devrez récupérer tous les fichiers .hgt.zip couvrant la région qui vous intéresse. Selon la taille de votre scène, cela peut représenter un grand nombre de fichiers. Téléchargez les vers l'emplacement &amp;lt;tt&amp;gt;data/SRTM-1/&amp;lt;/tt&amp;gt; (ou SRTM-3/SRTM-30 en fonction du type de données que vous téléchargez) dans votre répertoire de base. (Genapts recherche les données d'élévation parmi un ensemble de noms de répertoires prédéfinis dans son répertoire de travail. SRTM-30 est l'un d'eux, c'est le moins déroutant dans cette liste. Notez que, à compter du 31 juillet 2010, l'outil genapts prend également en compte l'existence de répertoires SRTM-1/SRTM-3. Si vous utilisez une version plus ancienne, pensez à fournir les répertoires en utilisant --dem-path).&lt;br /&gt;
&lt;br /&gt;
Maintenant que nous avons les données, nous devons les convertir pour qu'elles puissent servir à TerraGear. Tout d'abord, dézippez chacun des fichiers .hgt. Ensuite, ouvrez la ligne de commande (Sous Windows: Démarrer &amp;gt; Exécuter &amp;gt; &amp;lt;code&amp;gt;cmd.exe&amp;lt;/code&amp;gt;) et placez-vous dans le répertoire de base (&amp;lt;code&amp;gt;cd .../.../TerraGear&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{note|Selon [[TerraGear_Documentation]], hgtchop est remplacé par gdalchop.}}&lt;br /&gt;
{{note|Pour les données SRTM-1, remplacez le &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; par un &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; dans le premier argument fourni à hgtchop}}&lt;br /&gt;
{{tip|Si vous voulez créer un fichier batch, remplacez &amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt; avec &amp;lt;code&amp;gt;%%f&amp;lt;/code&amp;gt;, voir à ce sujet : [http://technet.microsoft.com/en-us/library/bb490909.aspx]}}&lt;br /&gt;
&lt;br /&gt;
Pour Windows :&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 %f .\work\SRTM-3&lt;br /&gt;
ou&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 .\data\SRTM-3\%f .\work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
Pour Linux :&lt;br /&gt;
 for f in ${PWD}/data/SRTM-3/*.hgt; do ./Terragear/hgtchop 3 &amp;quot;${f}&amp;quot; &amp;quot;${PWD}/work/SRTM-3&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
Maintenant, vous allez obtenir une quantité importante de fichiers .arr.gz dans votre répertoire work/SRTM-3/. Il nous faut les convertir au format .fit.gz. Utilisez à nouveau la ligne de commande avec&lt;br /&gt;
{{note|L'espace et le point à la fin sont importants!}}&lt;br /&gt;
&lt;br /&gt;
Pour Windows :&lt;br /&gt;
 .\Terragear\terrafit.exe work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
Pour Linux :&lt;br /&gt;
 ./Terragear/terrafit work/SRTM-3&lt;br /&gt;
&lt;br /&gt;
==== Données d'aéroports ====&lt;br /&gt;
Maintenant que nous avons les données d'élévation, nous pouvons générer nos aéroports. Tout d'abord, créons un répertoire &amp;lt;tt&amp;gt;data/airports/&amp;lt;/tt&amp;gt; et copions-y le fichier apt.dat. Ceci peut être effectué soit directement à partir de votre paquetage de FlightGear (bien que vous devrez le dé-zipper), soit il peut correspondre au fichier que vous auriez modifié avec [[TaxiDraw]].&lt;br /&gt;
&lt;br /&gt;
La commande pour créer les aéroports est &amp;quot;genapts&amp;quot;. Lancez-la sans arguments, afin de visualiser les différentes options de ligne de commande.&lt;br /&gt;
&lt;br /&gt;
Si elle est simplement lancée avec un fichier apt.dat spécifié et le répertoire de travail, elle génèrera les agencements d'aéroports pour chaque aéroport contenu dans le fichier, ce qui peut être long. &lt;br /&gt;
&lt;br /&gt;
Si vous créez juste un seul aéroport, et que vous connaissez son identifiant OACI (par exemple [[KSFO]], EGPH, EG32), utilisez cet identifiant comme suit à partir du répertoire racine de vos scènes (c'est à dire à partir du répertoire parent de vos répertoires data, work et output). Si vous utilisez un fichier apt.dat contenant un seul aéroport, vous pouvez omettre le paramètre &amp;quot;--airport&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
genapts --input=data/airports/apt.dat --work=./work --airport=&amp;lt;IDENTIFIANT_OACI_AEROPORT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Si vous générez des scènes plus grandes, alors vous pouvez spécifier les longitudes et latitudes minimum et maximum.&lt;br /&gt;
&lt;br /&gt;
Genapts va créer deux sous-répertoires dans votre répertoire work:&lt;br /&gt;
* AirportArea/&lt;br /&gt;
* AirportObj/&lt;br /&gt;
&lt;br /&gt;
Ils contiennent les définitions des agencement de l'aéroport, et de certains objets présents (par exemple les manches à air). &lt;br /&gt;
&lt;br /&gt;
==== Données d'utilisation du sol ====&lt;br /&gt;
Les dernières données que nous avons besoin de générer sont celles correspondant au type d'utilisation du sol. En général, elles proviennent du lot de données VMAP0 en tant que fichiers de formes en provenance du serveur de carte de la base de données des scènes, mais d'autres sources peuvent aussi être utilisées.&lt;br /&gt;
&lt;br /&gt;
Les données d'utilisation du sol peuvent être séparées en différents types :&lt;br /&gt;
&lt;br /&gt;
* '''Landmass :''' sépare la terre de la mer. Ces données sont utilisées comme masque pour toutes les autres données. Les plus couramment utilisées sont le Landmass VMAP0, mais GSHHS peut également être utilisé.&lt;br /&gt;
* '''Land use data :''' définit si une portion de terrain correspond à une forêt, une zone urbaine, du sable, de la lave, des glaciers, etc. Ce sont généralement données VMAP0 définies en tant que polygones.&lt;br /&gt;
* '''Line data :''' comprend les lignes de chemins de fer, les rivières, les routes. Typiquement VMAP0, mais aussi OpenStreetMap pour les routes.&lt;br /&gt;
* '''Point data :''' est actuellement uniquement utilisé pour définir les villes.&lt;br /&gt;
&lt;br /&gt;
De loin, le moyen le plus facile pour obtenir ces données est de télécharger à partir du magnifique [http://mapserver.flightgear.org MapServer] les fichiers formes pour une zone de scène donnée. Cliquez sur le lien &amp;quot;Download Shapefiles&amp;quot; (ou allez directement à : http://mapserver.flightgear.org/download.psp). Entrez dans la boîte de délimitation de la scène que vous désirez générer, sélectionnez le type de données de fichier-formes que vous voulez, et cliquez sur '''download'''. Pour les scènes de base, prenez tout ce qui est listé sous VMap0 (c'est-à-dire utilisant le préfixe v0_).&lt;br /&gt;
 &lt;br /&gt;
Téléchargez chaque fichier-forme dans un répertoire séparé (!) &amp;lt;tt&amp;gt;data/shapefiles/...&amp;lt;/tt&amp;gt;. Ainsi, pour v0_landmass, vous obtiendriez &amp;lt;tt&amp;gt;data/shapefiles/v0_landmass/v0_landmass.shp&amp;lt;/tt&amp;gt;, etc.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez charger ces fichiers-formes dans un éditeur SIG tel que [[QGIS]] ou GRASS pour les visualiser et les éditer. C'est une bonne idée pour vérifier que vous avez bien les bons fichiers ! Plus tard, vous pourrez expérimenter en remplaçant divers fichiers-formes avec d'autres versions (GSHHS pour la côte, OSM pour les routes, etc.).&lt;br /&gt;
&lt;br /&gt;
L'étape suivante décode les fichiers-formes vers le format TerraGear en utilisant la commande '''ogr-decode''' . &lt;br /&gt;
&lt;br /&gt;
Il y a trois arguments de ligne de commande importants pour ogr-decode :&lt;br /&gt;
* le répertoire de destination pour les données décodées,&lt;br /&gt;
* la localisation du répertoire de fichiers-formes,&lt;br /&gt;
* le type de matériau.&lt;br /&gt;
&lt;br /&gt;
Chaque fichier-forme correspond avec un des types de matériau défini dans les fichiers materials.xml. La correspondance est assez évidente. Par exemple, v0_mixedcroppasturecover correspond à MixedCropPastureCover. Notez que les types de matériau sont sensibles à la casse, donc il est bon de se référer au fichier &amp;lt;tt&amp;gt;[[$FG ROOT]]/materials.xml&amp;lt;/tt&amp;gt; pour vérifier. L'exception est v0_landmass, qui DOIT correspondre au type Default.&lt;br /&gt;
&lt;br /&gt;
En complément, il existe de nombreux arguments optionnels pour indiquer la largeur des données linéaires (pour les routes, les rivières, les voies de chemin de fer), quelle largeur utiliser pour les données de type point (pour les villes) et quelle est la plus grande longueur acceptable pour une ligne droite.&lt;br /&gt;
&lt;br /&gt;
Par exemple, pour décoder le fichier-forme v0_landmass, vous entrez la commande suivante :&lt;br /&gt;
&lt;br /&gt;
ogr-decode --max-segment 500 --area-type Default work/Landmass data/shapefiles/v0_landmass&lt;br /&gt;
&lt;br /&gt;
Pour créer des rivières de 10 mètres de large :&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --max-segment 500 --line-width 10 --area-type Stream work/Stream data/shapefiles/v0_stream&lt;br /&gt;
&lt;br /&gt;
Pour générer des villes d'environ 1 kilomètre de diagonale :&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --point-width 500 --area-type Town work/Town data/shapefiles/v0_town&lt;br /&gt;
&lt;br /&gt;
Lancez cette commande pour chaque fichier-forme du lot de données.&lt;br /&gt;
&lt;br /&gt;
== Générer les scènes ==&lt;br /&gt;
Vous avez maintenant un répertoire de travail, avec des sous-répertoires comme :&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
: AirportArea&lt;br /&gt;
: AirportObj&lt;br /&gt;
: Bog&lt;br /&gt;
: DryCropPastureCover&lt;br /&gt;
: EvergreenBroadCover&lt;br /&gt;
: GrassCover&lt;br /&gt;
: IrrCropPastureCover&lt;br /&gt;
: Lake&lt;br /&gt;
: Landmass&lt;br /&gt;
: Marsh&lt;br /&gt;
: MixedCropPastureCover&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
: MixedForestCover&lt;br /&gt;
: Railroad&lt;br /&gt;
: Road&lt;br /&gt;
: Sand&lt;br /&gt;
: ScrubCover&lt;br /&gt;
: Shared&lt;br /&gt;
: SRTM-3&lt;br /&gt;
: Stream&lt;br /&gt;
: Town&lt;br /&gt;
: Urban&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Nous pouvons maintenant générer les scènes en utilisant la commande fgfs-construct. Lancez la commande avec &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; pour obtenir les informations d'utilisation. &lt;br /&gt;
&lt;br /&gt;
Nous devons définir :&lt;br /&gt;
* Les répertoires de travail (--work-dir) et de sortie (--output-dir) .&lt;br /&gt;
** '''Notez''', au sujet du répertoire de sortie : il doit pointer vers le répertoire &amp;lt;tt&amp;gt;Terrain/&amp;lt;/tt&amp;gt;, sinon, les versions récentes FlightGear seront incapables de charger le terrain.&lt;br /&gt;
* Le centre de la scène que nous voulons générer (--lat, --lon).&lt;br /&gt;
* Le rayon (--xdist, --ydist) à partir duquel on génère.&lt;br /&gt;
* Tous les répertoires de travail à inclure dans la scène.&lt;br /&gt;
&lt;br /&gt;
Par exemple :&lt;br /&gt;
{{Pre2|&amp;lt;nowiki&amp;gt;fgfs-construct --work-dir=./work --output-dir=./output/Terrain --lon=55 --lat=60 --xdist=3 --ydist=3 AirportArea SRTM-3 AirportObj Stream Bog IrrCropPastureCover Town Lake Urban Landmass Railroad DryCropPastureCover Road EvergreenBroadCover Marsh Sand MixedCropPastureCover ScrubCover GrassCover MixedForestCover&amp;lt;/nowiki&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Lorsque cette commande se termine, le répertoire de sortie contiendra un sous-répertoire scenery. Pointez vers lui en paramétrant [[$FG_SCENERY]] ou en utilisant l'option de ligne de commande --fg-scenery à fgfs, et testez votre nouvelle scène !&lt;br /&gt;
&lt;br /&gt;
== Un soucis ? ==&lt;br /&gt;
Vous trouverez ci-dessous une liste de problèmes courants et leur solutions. Dans le doute, copiez/collez votre erreur dans Google. La plupart des problèmes (en particulier lors de la compilation de TerraGear) ont déjà été évoqués :&lt;br /&gt;
&lt;br /&gt;
* Crash de genapts. Quelquefois, genapts plante avec certains aéroports. Dans ce cas, essayez de le relancer avec l'argument --start-id pour démarrer à l'aéroport sur lequel il a planté, et l'argument --nudge pour essayer de remettre les calculs dans la bonne voie.&lt;br /&gt;
* fgfs-construct tué. Le processus fgfs-construct peut se suicider s'il consomme trop de ressources système. L'augmentation des valeurs pour setrlimit dans src/BuildTiles/Main/main.cxx est la meilleure solution.&lt;br /&gt;
* Les aéroports apparaissent au fond de trous, ou il y a des espaces entre les aéroports et la scène. Ceci arrive lorsque genapts est incapable de trouver la donnée d'élévation correcte, ou alors la donnée d'élévation a changé entre le lancement de genapts et celui de shape-decode. Essayez de générer un seul aéroport dans votre zone de scène en utilisant genapts, et visualisez la sortie. En particulier, soyez sûr que le répertoire work/SRTM-3 existe. &lt;br /&gt;
* Seuls les aéroports apparaissent dans la scène. Il existe trois explications typiques :&lt;br /&gt;
** vous n'avez pas téléchargé les fichiers-formes corrects de la zone;&lt;br /&gt;
** vous n'avez pas lancé shape-decode sur le fichier-forme v0_landmass comme Default &lt;br /&gt;
** vous n'avez pas inclus les répertoires corrects dans fgfs-construct. &lt;br /&gt;
* La scène générée contient des données effacées des fichiers-formes. Si vous éditez des fichiers-formes, vous devez effacer le sous-répertoire work approprié avant de lancer shape-decode. Sinon, vos changements s'ajouteront à ceux qui existent déjà.&lt;br /&gt;
* La scène entière est plate et au niveau de la mer. C'est généralement dû au fait que vous n'avez pas inclus les données d'élévation dans votre commande fgfs-construct. Assurez-vous qu'il existe un répertoire STRM-3 précisé dans la ligne de commande. &lt;br /&gt;
* Tout terrain copie le matériel d'un fichier-forme. Vous avez probablement oublié de mettre chacun des fichiers-formes téléchargés dans un répertoire séparé à l'intérieur du répertoire Data/shapefiles. &lt;br /&gt;
&lt;br /&gt;
{{Terra}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery enhancement]]&lt;br /&gt;
[[en:Using TerraGear]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Using_TerraGear&amp;diff=105993</id>
		<title>Using TerraGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Using_TerraGear&amp;diff=105993"/>
		<updated>2016-11-19T12:54:52Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Elevation data */ : protect Bash against spaces in files and directories names&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Out of date}}&lt;br /&gt;
&lt;br /&gt;
[[File:Terragearprocesschart.png|thumb|TerraGear Process Flow Chart]]&lt;br /&gt;
The [[TerraGear]] software project supports [[FlightGear]] by creating the files used by FlightGear to represent the elevation and texture of the earth, including airports, cities, fields, forests, rivers, roads and so on. The TerraGear software reads data files containing ground elevation, airport locations and layouts, geographical land-cover data, and more, and produces the scenery files used by FlightGear to represent the terrain of the world.&lt;br /&gt;
&lt;br /&gt;
For simplicity and convenience, most FlightGear users simply download the plug-and-play scenery files from the FlightGear scenery server, or use [[TerraSync]] to automatically download scenery as needed. But there is a variety of reasons you might want to use TerraGear to produce your own terrain files, rather than downloading the standard FlightGear scenery. &lt;br /&gt;
&lt;br /&gt;
For instance, if you use [[WorldEditor]] to modify/improve information about an [[:Category:Airports|airport]]'s taxiway/apron layout, you might wish to see how that modified airport would look in the scenery before deciding you're happy with the results. Maybe the official scenery is too detailed for your slow machine, and you'd like to build terrain using a digital elevation model (DEM) with poorer resolution, to decrease the number of polygons and thus improve your framerates. Or maybe you've got a fantastically fast machine, and you want to build your own terrain using higher-resolution vector data (vmap1, Tiger, osm) to get better roads/streams. For all these reasons, learning how to use TerraGear is a good idea.&lt;br /&gt;
&lt;br /&gt;
== Obtaining TerraGear ==&lt;br /&gt;
You can either build TerraGear yourself, or download a pre-compiled binary. The later is the easiest and advised for starters.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1a - Download TerraGear pre-compiled (recommended for beginners) on Windows'''&lt;br /&gt;
*# Download the latest TerraGear build from the [http://build.flightgear.org:8080/job/TerraGear-Win-Cmake/lastSuccessfulBuild/artifact/*zip*/archive.zip FlightGear Build Server].&lt;br /&gt;
*# Create or choose a directory to hold the TerraGear tools. &lt;br /&gt;
*# Unzip the package and move the files from &amp;lt;code&amp;gt;archive/install/msvc100/TerraGear/bin&amp;lt;/code&amp;gt; into a sub-directory named &amp;lt;code&amp;gt;Terragear/&amp;lt;/code&amp;gt; in the base directory.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1b - Download ppa packages for Ubuntu Linux'''&lt;br /&gt;
&lt;br /&gt;
https://launchpad.net/~saiarcot895/+archive/ubuntu/flightgear-edge/+index?batch=75&amp;amp;memo=75&amp;amp;start=75&lt;br /&gt;
&lt;br /&gt;
* '''Option 2 - Compile TerraGear from source code''' as explained in [[Building TerraGear|this article]].&lt;br /&gt;
&lt;br /&gt;
{{note|1=You might need &amp;lt;code&amp;gt;default_priorities.txt&amp;lt;/code&amp;gt; from the {{terragear source|path=src/BuildTiles/Main/default_priorities.txt|text=git repository}} or from the archive downloaded from the build server (in the &amp;lt;code&amp;gt;archive/install/msvc100/TerraGear/share&amp;lt;/code&amp;gt; subdirectory). See [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;p=77950 this forum thread] for details.}}&lt;br /&gt;
&lt;br /&gt;
=== GUI tool ===&lt;br /&gt;
A [[TerraGear GUI]] is available for those that would like to use TerraGear without knowing/using the command line options.&lt;br /&gt;
&lt;br /&gt;
== Using TerraGear ==&lt;br /&gt;
First, choose the boundaries for the area of scenery you want to build, in terms of latitude and longitude. The smaller the area of scenery you generate, the smaller the amount of data you will need, and the less CPU time it will take. For example, if you are just interested in generating a new airport layout at 12.3W 34.4N, then simply generating the scenery between 12W 34N and 13W 35N would be sufficient. &lt;br /&gt;
&lt;br /&gt;
Write down the bounding box (minimum and maximum longitude and latitude) for the scenery you want to generate. Remember that West and South are negative - in essence 4W 10S would be -4, -10. Try not to get mixed up, otherwise you'll end up generating scenery or airports on the other side of the planet! &lt;br /&gt;
&lt;br /&gt;
You'll be dealing with multiple different types of data in various formats. Create a new directory for your scenery work. Within that directory, create the following sub-directories: &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;data/&amp;lt;/code&amp;gt;:    For raw and pre-processed data (eg elevation files) &lt;br /&gt;
; &amp;lt;code&amp;gt;output/&amp;lt;/code&amp;gt;:  For the scenery files you will create &lt;br /&gt;
; &amp;lt;code&amp;gt;work/&amp;lt;/code&amp;gt;:    For data that has been processed (eg by shape-decode) and is ready to be munged into scenery &lt;br /&gt;
&lt;br /&gt;
=== Obtaining and processing data ===&lt;br /&gt;
TerraGear uses three different kinds of information to generate scenery:&lt;br /&gt;
&lt;br /&gt;
# The elevation of the land (provided by SRTM) &lt;br /&gt;
# The location and layout of airports (provided by apt.dat or a custom .dat) &lt;br /&gt;
# Whether a given lat/lon is sea, land, city, forest, town, road, railway (provided by VMAP0, [[CORINE]] etc. or custom shapefiles) &lt;br /&gt;
&lt;br /&gt;
This article describes how obtain and process each of these types of data in order, and bring it together for use by FlightGear. The order of these steps is important. For example, the airport data step needs the elevation data to determine the elevation of the airports and thus you should start with preparing elevation data.&lt;br /&gt;
&lt;br /&gt;
{{caution|For inclusion in the official FlightGear scenery, all data '''must''' come from [[GNU GPL]] compatible sources!}}&lt;br /&gt;
&lt;br /&gt;
==== Elevation data ====&lt;br /&gt;
The best worldwide elevation data currently available is from the Shuttle Radar Topography Mission (SRTM). There are two types of SRTM data: &lt;br /&gt;
* Highly accurate 1-arcsecond resolution data, known as SRTM-1, for the USA &lt;br /&gt;
* Less accurate 3-arcsecond resolution data, known as SRTM-3, for the rest of the world. &lt;br /&gt;
From now on, we'll assume you are using SRTM-3 data. Unless otherwise noted, the process for SRTM-1 is identical.&lt;br /&gt;
&lt;br /&gt;
You can download the appropriate data from http://dds.cr.usgs.gov/srtm/version2_1/. You want all .hgt.zip files covering your region of interest. Depending on the size of your scenery, there may be quite a few. Download them to &amp;lt;code&amp;gt;data/SRTM-1/&amp;lt;/code&amp;gt; (or SRTM-3/SRTM-30 depending on the type you downloaded) in your base directory. (Genapts looks for a few known, hardcoded elevation data directories in its working directory. SRTM-30 is one of them and this is the least confusing in that list. Note: W.E.F. 31st July 2010, the genapts tool now also looks for SRTM-1/SRTM-3 directories. If you are using an older version, please supply the directories using --dem-path).&lt;br /&gt;
&lt;br /&gt;
Now we've got the data, we need to convert it into something of use to TerraGear. First, you need to unzip each of the .hgt files. After that, open the commandline (Windows: Start &amp;gt; Run &amp;gt; &amp;lt;code&amp;gt;cmd.exe&amp;lt;/code&amp;gt;) and change into the base directory (&amp;lt;code&amp;gt;cd .../.../TerraGear&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{note|According to [[TerraGear_Documentation]], hgtchop is superseded by gdalchop.}}&lt;br /&gt;
{{note|For SRTM-1 data, replace the &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; by a &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; in the first argument to hgtchop}}&lt;br /&gt;
{{tip|If you want to create a batch-file, replace &amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;%%f&amp;lt;/code&amp;gt;, see [http://technet.microsoft.com/en-us/library/bb490909.aspx]}}&lt;br /&gt;
&lt;br /&gt;
For Windows:&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 %f .\work\SRTM-3&lt;br /&gt;
or&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 .\data\SRTM-3\%f .\work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
For Linux:&lt;br /&gt;
 for f in ${PWD}/data/SRTM-3/*.hgt; do ./Terragear/hgtchop 3 &amp;quot;${f}&amp;quot; &amp;quot;${PWD}/work/SRTM-3&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
Now you will get a lot of .arr.gz files in your work/SRTM-3/ directory. We need to convert these to the .fit.gz format. Run the commandline again with&lt;br /&gt;
&lt;br /&gt;
{{note|The space and dot at the and are important!}}&lt;br /&gt;
&lt;br /&gt;
For Windows:&lt;br /&gt;
 .\Terragear\terrafit.exe work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
For Linux:&lt;br /&gt;
 ./Terragear/terrafit work/SRTM-3&lt;br /&gt;
&lt;br /&gt;
==== Airport data ====&lt;br /&gt;
Now we've got elevation data, we can generate our airports. First, create a &amp;lt;code&amp;gt;data/airports/&amp;lt;/code&amp;gt; directory and copy in your apt.dat file. This may be direct from your FlightGear data package (though you'll need to unzip it), or it may be one that you've modified with [[WorldEditor]]. &lt;br /&gt;
&lt;br /&gt;
The command to create airports is &amp;quot;genapts850&amp;quot;. Run it without any arguments to see the various command-line options. &lt;br /&gt;
&lt;br /&gt;
If it is simply run with a specified apt.dat and work directory, it will generate airport layouts for every airport in the file, which can take a long time. Make sure the input is not the apt.gz, but an uncompressed file. Otherwise genapts850 will block and not produce any output.&lt;br /&gt;
&lt;br /&gt;
If you are just creating a single airport and you know the ICAO ID (for example [[KSFO]], EGPH or EG32), use is as follows from your root scenery directory (in essence the directory above your data, work and output directories). If you use an apt.dat file with one single airport in it you should omit the &amp;lt;code&amp;gt;--airport&amp;lt;/code&amp;gt; parameter. &lt;br /&gt;
&lt;br /&gt;
 genapts850 --input=data/airports/apt.dat --work=./work --airport=&amp;lt;AIRPORT_ID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or, if you have elevation data available:&lt;br /&gt;
&lt;br /&gt;
 genapts850 --input=data/airports/apt.dat --work=./work --dem-path=SRTM-3&lt;br /&gt;
&lt;br /&gt;
If you are generating a larger set of scenery, then you can specify the minimum and maximum longitude and latitude. &lt;br /&gt;
&lt;br /&gt;
Genapts will create two sub-directories in your work directory:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;AirportArea/&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;AirportObj/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These contain the definitions of the airport layout and any objects present (e.g. windsocks and beacons). &lt;br /&gt;
&lt;br /&gt;
==== Landuse data ====&lt;br /&gt;
The final piece of data we need to generate is the landuse data. In general, this is taken from the VMAP0 dataset as shapefiles from the scenery database mapserver, but other sources can also be used.&lt;br /&gt;
&lt;br /&gt;
The landuse data can be split into a number of different types:&lt;br /&gt;
&lt;br /&gt;
; Landmass:  Separates the land from the sea. It can be used as a mask for all other data. The most commonly used is the VMAP0 Landmass, but GSHHS can also be used. When running tg-construct with &amp;lt;code&amp;gt;--ignore-landmass&amp;lt;/code&amp;gt;, all input shapefiles will be taken into consideration, so no landmass mask is required then.&lt;br /&gt;
; Land use data:  Defines whether a piece of land is forest, urban, sand, lava, glacier etc. These are usually VMAP0 data, defined as polygons.&lt;br /&gt;
; Line data:  Includes railroads, streams, roads. Typically VMAP0, but also Open Street Map for roads.&lt;br /&gt;
; Point data:  Is currently only used for defining towns.&lt;br /&gt;
 &lt;br /&gt;
By far the easiest way to get this data is to download shapefiles from the wonderful [http://mapserver.flightgear.org MapServer]. The MapServer lets you download the shapefiles for any selected scenery area. Click on the &amp;quot;Download Shapefiles&amp;quot; link (or go direct: http://mapserver.flightgear.org/download.psp). Enter in the bounding box of the scenery you want to generate, select the type of shapefile data you want, and click download. &lt;br /&gt;
&lt;br /&gt;
==== Layers ====&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;v0&amp;lt;/code&amp;gt;:  Global coverage, low detail. This is &amp;quot;the last resort&amp;quot;, but unfortunately it is the only layer that covers the entire world.&lt;br /&gt;
; &amp;lt;code&amp;gt;cs&amp;lt;/code&amp;gt;:  It is v0 with some contributions someone did in the past. Get this instead of v0.&lt;br /&gt;
; &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt;:  Only parts of some countries available, higher detail than v0.&lt;br /&gt;
; &amp;lt;code&amp;gt;clc06&amp;lt;/code&amp;gt;:  European '''only'''. Very high detail, this is the preferred choice for an European country.&lt;br /&gt;
; &amp;lt;code&amp;gt;osm&amp;lt;/code&amp;gt;:  Global coverage, high resolution but very low detail.&lt;br /&gt;
: This means: if you are interested in an area out of Europe and forests are defined in OpenStreetMaps for your area, this is going to be the best data source. If forests are not defined, you will get a dull, neverending DEFAULT landclass. OSM provides the best coastline and I encourage you to use this coastline even in Europe. [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;t=25549&amp;amp;sid=d501cb651ef9e34ca9dc8fae429d51ab&amp;amp;p=234002#p234002]&lt;br /&gt;
&lt;br /&gt;
{{caution|Make sure each shape file is in its own directory whether you download shape files or create your own otherwise the ogrDecode step will fail.}}&lt;br /&gt;
Download each shapefile into a seperate (!) &amp;lt;code&amp;gt;data/shapefiles/...&amp;lt;/code&amp;gt; directory. So, for v0_landmass, you would end up with &amp;lt;code&amp;gt;data/shapefiles/v0_landmass/v0_landmass.shp&amp;lt;/code&amp;gt; etc.&lt;br /&gt;
&lt;br /&gt;
You can load these shapefiles into a GIS editor such as [[QGIS]] or GRASS to view and edit. This is a good idea to verify you have the correct files! Later on, you can experiment with replacing various shapefiles with other versions (GSHHS for coastline, OSM for roads etc.).&lt;br /&gt;
&lt;br /&gt;
The next step is to decode the shape-files into TerraGear format using the '''ogr-decode''' command. &lt;br /&gt;
&lt;br /&gt;
There are three important command-line arguments for ogr-decode:&lt;br /&gt;
* the destination directory for the decoded data&lt;br /&gt;
* the location of the shapefile's directory&lt;br /&gt;
* the material type&lt;br /&gt;
&lt;br /&gt;
Each shape-file corresponds with one of the material types defined in the materials.xml files. The mapping is pretty obvious. For example, &amp;lt;code&amp;gt;v0_mixedcroppasturecover&amp;lt;/code&amp;gt; maps to &amp;lt;code&amp;gt;MixedCropPastureCover&amp;lt;/code&amp;gt;. Note that the material types are case-sensitive, so it is a good idea to refer to the &amp;lt;code&amp;gt;[[$FG_ROOT]]/Materials/default/materials.xml&amp;lt;/code&amp;gt; file (&amp;lt;code&amp;gt;[[$FG ROOT]]/materials.xml&amp;lt;/code&amp;gt; in FlightGear 2.6.0 and older) to hand so you can check. The exception is landmass, which - when used - MUST be mapped onto the type Default.&lt;br /&gt;
&lt;br /&gt;
Additionally, there are a number of optional arguments, to indicate the width of line data (for roads, streams, railways), how large to make point data (for towns) and how long the longest straight line is allowed to be.&lt;br /&gt;
&lt;br /&gt;
For example, to decode the &amp;lt;code&amp;gt;v0_landmass&amp;lt;/code&amp;gt; shapefile, you use the following command:&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --max-segment 500 --area-type Default work/Default data/shapefiles/v0_landmass&lt;br /&gt;
&lt;br /&gt;
To create streams of width 10 metres&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --max-segment 500 --line-width 10 --area-type Stream work/Stream data/shapefiles/v0_stream&lt;br /&gt;
&lt;br /&gt;
To generate some towns about 1km across&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --point-width 500 --area-type Town work/Town data/shapefiles/v0_town&lt;br /&gt;
&lt;br /&gt;
Run this command for each shapefile in the set.&lt;br /&gt;
&lt;br /&gt;
== Generating scenery ==&lt;br /&gt;
You will now have a work directory, with subdirectories like:&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
: AirportArea&lt;br /&gt;
: AirportObj&lt;br /&gt;
: Bog&lt;br /&gt;
: Default&lt;br /&gt;
: DryCropPastureCover&lt;br /&gt;
: EvergreenBroadCover&lt;br /&gt;
: GrassCover&lt;br /&gt;
: IrrCropPastureCover&lt;br /&gt;
: Lake&lt;br /&gt;
: Marsh&lt;br /&gt;
: MixedCropPastureCover&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
: MixedForestCover&lt;br /&gt;
: Railroad&lt;br /&gt;
: Road&lt;br /&gt;
: Sand&lt;br /&gt;
: ScrubCover&lt;br /&gt;
: Shared&lt;br /&gt;
: SRTM-3&lt;br /&gt;
: Stream&lt;br /&gt;
: Town&lt;br /&gt;
: Urban&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Now we can actually generate the scenery. This is done by the tg-construct command. Run the command with &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; to get usage information. &lt;br /&gt;
&lt;br /&gt;
We need to define:&lt;br /&gt;
* The work (&amp;lt;code&amp;gt;--work-dir&amp;lt;/code&amp;gt;) and output (&amp;lt;code&amp;gt;--output-dir&amp;lt;/code&amp;gt;) directories.&lt;br /&gt;
* The center of the scenery we want to generate (&amp;lt;code&amp;gt;--lat&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--lon&amp;lt;/code&amp;gt;).&lt;br /&gt;
* The radius (&amp;lt;code&amp;gt;--xdist&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--ydist&amp;lt;/code&amp;gt;) from which to generate.&lt;br /&gt;
* All the work directories to include in the scenery.&lt;br /&gt;
&lt;br /&gt;
{{note|The output directory must point to a &amp;lt;code&amp;gt;Terrain/&amp;lt;/code&amp;gt; directory, else recent FlightGear versions will be unable to load the terrain.}}&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
{{Pre2|&amp;lt;nowiki&amp;gt;tg-construct --work-dir=./work --output-dir=./output/Terrain --min-lon=55 --max-lon=57 --min-lat=60 --max-lat=62 AirportArea SRTM-3 AirportObj Default Stream Bog IrrCropPastureCover Town Lake Urban Railroad DryCropPastureCover Road EvergreenBroadCover Marsh Sand MixedCropPastureCover ScrubCover GrassCover MixedForestCover&amp;lt;/nowiki&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
When this finishes, the output directory will contain a scenery sub-tree. Point to it by setting either [[$FG_SCENERY]] or by using the &amp;lt;code&amp;gt;--fg-scenery&amp;lt;/code&amp;gt; command-line option to fgfs, and give your new scenery a try!&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Below is a list of common problems and solutions. If in doubt - Google it. Many problems (particularly when compiling TerraGear) have been hit before: &lt;br /&gt;
&lt;br /&gt;
* Crashes in genapts. Sometimes genapts will crash when dealing with a particular airport. In that case, try running it again with the &amp;lt;code&amp;gt;--start-id&amp;lt;/code&amp;gt; argument to start at the airport it failed on, and the &amp;lt;code&amp;gt;--nudge&amp;lt;/code&amp;gt; argument which tries to nudge the calculations in the right direction. &lt;br /&gt;
* tg-construct killed. The tg-construct process may kill itself if it is using too many system resources. Increasing the values for &amp;lt;code&amp;gt;setrlimit&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;src/BuildTiles/Main/main.cxx&amp;lt;/code&amp;gt; is the best solution. &lt;br /&gt;
* tg-construct silently stops immediately without an error and nothing goes to the &amp;quot;output&amp;quot; directory: make sure that lon/lat values correspond to tiles boundaries. See [[Tile Index Scheme]]&lt;br /&gt;
* Airports appear in the bottom of holes, or there are spaces between the airports and the scenery. This typically happens when genapts is unable to find the correct elevation data, or the elevation data changed between running genapts and shape-decode. Try generating a single airport in your scenery area using genapts, and look at the output. In particular, make sure there is a work/SRTM-3 directory. &lt;br /&gt;
* Only the airports appear in the scenery. There are three typical causes for this: &lt;br /&gt;
** You didn't download the correct shapefiles for the area. &lt;br /&gt;
** You haven't run shape-decode on the &amp;lt;code&amp;gt;v0_landmass&amp;lt;/code&amp;gt; shapefile as Default &lt;br /&gt;
** You didn't include the correct directories in tg-construct. &lt;br /&gt;
* Generate scenery includes data removed from the shapefiles. If you are editing shapefiles, you need to delete the appropriate work subdirectory before running shape-decode. Otherwise your changes will be in addition to those already present. &lt;br /&gt;
* All the scenery is flat and at sea-level. Typically this is because you didn't include any elevation data in your tg-construct command. Make sure there's a STRM-3 directory included in the command-line. &lt;br /&gt;
* All terrain copies the material of a certain shapefile. You have probably forgotten to put each of the downloaded shapefiles in a seperate directory inside the Data/shapefiles directory.&lt;br /&gt;
* genapts850 never passes the stage &amp;quot;Adding airport &amp;lt;ICAO&amp;gt; to parse list&amp;quot;: did you unzip &amp;lt;code&amp;gt;apt.dat.gz&amp;lt;/code&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
== General comments from forum discussion ==&lt;br /&gt;
{{cquote|f-ojac, you are right, the parameters used in scenery 2.0 were &amp;quot;-e 5 -x 20000&amp;quot; according to the wiki. I don't know why I had the impression these parameters were not public. In any case, it does not matter because using the same parameters will create closer results, but they are not guaranteed to be the same.&lt;br /&gt;
&lt;br /&gt;
The parameters used to create scenery 2,0 seem to be:&lt;br /&gt;
&lt;br /&gt;
-m ??: the minimum number of vertices in a tile. In FG, any number bellow 100 (and probably, any number below 1000) will do. I don't think there is any surface on the world perfectly flat for several kilometers. The default value is 50 and I'm sure is ok for any normal use.&lt;br /&gt;
-e 5: the max allowed error for elevation, in meters. That is: if terrafit calculates a simplification of the terrain where all points are at most this distance from the real elevation, no more vertices are created. The default value is 40 meters: a point may have an elevation error up to 40m (~100ft) High values for this parameter create less detailed mountains and smaller (in disk size) and more efficient (in FPS) terrain.&lt;br /&gt;
-x 20000: the max number of vertices in a tile. If this number of vertices is reached, terrafit stop regardless the max error of the vertices. The default value is 1000&lt;br /&gt;
&lt;br /&gt;
Keep in mind you can set values that do not make sense:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;-e 1 -x 100&amp;quot; does not make sense because it is going to be impossible to calculate errors less than 1 meters using only 100 vertices. The max number of vertices will be reached always and the max error will be probably ignored.&lt;br /&gt;
* &amp;quot;-e 300 -x 20000&amp;quot; does not make sense, tiles are going to use for sure much less vertices than 20,000 because you are allowing huge elevation errors.&lt;br /&gt;
&lt;br /&gt;
If you want an efficient scenery (less vertices), use the default values &amp;quot;-e 40 -x 1000&amp;quot;. If you want more accurate elevation at the cost of disk space and FPS, use values similar to scenery 2.0 (&amp;quot;-e 5 -x 20000&amp;quot;) Anything in the middle will produce performance and disk use in the middle.&amp;lt;ref&amp;gt;{{cite web |url=http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;t=24681#p225363 &lt;br /&gt;
|title=Re: Terrasync Help (surprinsingly!) :)&lt;br /&gt;
|author=ludomotico |date= Mon Nov 24, 2014 4:28 am}}&amp;lt;/ref&amp;gt;|ludomotico}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto:Create custom terrain]], editing/making terrain data.&lt;br /&gt;
* [[TerraGear CORINE]], building terrain from CORINE data.&lt;br /&gt;
* [[TerraGear Documentation]], using TerraGear details.&lt;br /&gt;
&lt;br /&gt;
{{Terra}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery enhancement|TerraGear, Using]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Utiliser TerraGear]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Fr/Utiliser_TerraGear&amp;diff=105986</id>
		<title>Fr/Utiliser TerraGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Fr/Utiliser_TerraGear&amp;diff=105986"/>
		<updated>2016-11-18T21:29:25Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: /* Utilisation de TerraGear */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Terragearprocesschart.png|thumb|Organigramme de TerraGear]]&lt;br /&gt;
Le projet logiciel [[Fr/TerraGear|TerraGear]] participe au projet [[Fr/FlightGear|FlightGear]] en créant les fichiers utilisés par celui-ci pour représenter le relief et la texture de la Terre, ce qui comprend les aéroports, villes, champs, forêts, rivières, routes, etc. Le logiciel TerraGear lit des fichiers de données contenant l'élévation du sol, le positionnement et l'agencement des aéroports, les données géographiques d'occupation du sol, entre autres et produit les fichiers de scènes utilisés par Flightgear pour représenter la surface de la planète.&lt;br /&gt;
&lt;br /&gt;
Par simplicité et commodité, la plupart des utilisateurs de FlightGear téléchargent simplement les fichiers plug-and-play des scènes à partir du serveur de scènes de FlightGear, ou utilisent [[Fr/TerraSync|TerraSync]] pour télécharger automatiquement les scènes à la demande. Mais il peut y avoir des cas où vous voudriez utiliser TerraGear pour générer vos propres fichiers terrain, plutôt que de télécharger les scènes standard de FlightGear.&lt;br /&gt;
&lt;br /&gt;
Par exemple, si vous utilisez  [[WorldEditor]] pour modifier/améliorer les information concernant un taxiway/une aire de trafic d'un [[:Category:Airports|aéroport]], vous pourriez avoir envie de visualiser à quoi ressemblerait cet aéroport modifié dans les scènes avant de décider que les résultats vous conviennent. Peut-être que les scènes officielles sont trop détaillées pour votre machine un peu ancienne, et que vous voudriez construire un terrain avec un modèle numérique de d'élévation (DEM) de plus faible résolution, afin de diminuer le nombre de polygones et ainsi augmenter votre taux de rafraîchissement d'image. Soit vous avez une machine ultra-rapide, et vous voulez construire votre propre terrain avec des données vectorielles de plus haute résolution (vmap1, Tiger, osm) pour obtenir de meilleures routes/rivières. Pour toutes ces raisons, apprendre à utiliser TerraGear est une bonne idée.&lt;br /&gt;
&lt;br /&gt;
== Obtenir TerraGear ==&lt;br /&gt;
Vous pouvez soit compiler TerraGear vous-même, ou bien télécharger un binaire pré-compilé, cette dernière démarche étant plus aisée et donc recommandée pour les débutants.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1 - Télécharger TerraGear pré-compilé (recommandé aux débutants) sur Windows'''&lt;br /&gt;
*# Téléchargez la dernière version de TerraGear sur le [http://build.flightgear.org:8080/job/TerraGear-Win-Cmake/lastSuccessfulBuild/artifact/*zip*/archive.zip Serveur de compilation de FlightGear].&lt;br /&gt;
*# Créez ou choisissez un répertoire pour contenir les outils TerraGear. &lt;br /&gt;
*# Dé-zippez le paquetage et déplacez les fichiers de &amp;lt;tt&amp;gt;archive/install/msvc100/TerraGear/bin&amp;lt;/tt&amp;gt; dans un sous-répertoire nommé &amp;lt;tt&amp;gt;Terragear/&amp;lt;/tt&amp;gt; dans le répertoire de base.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1b - Télécharger les paquetages ppa pour Ubuntu Linux'''&lt;br /&gt;
&lt;br /&gt;
https://launchpad.net/~saiarcot895/+archive/ubuntu/flightgear-edge/+index?batch=75&amp;amp;memo=75&amp;amp;start=75&lt;br /&gt;
&lt;br /&gt;
* '''Option 2 - Compiler TerraGear à partir du code source, comme expliqué dans [[Fr/TerraGear#Compilation|cet article]].&lt;br /&gt;
&lt;br /&gt;
{{note|1=Vous pourriez avoir besoin du fichier &amp;lt;code&amp;gt;default_priorities.txt&amp;lt;/code&amp;gt; qui peut être obtenu à partir du {{terragear source|path=src/BuildTiles/Main/default_priorities.txt|text=dépôt Git}} ou à partir de l'archive téléchargée à partir du serveur de compilation (dans le sous-répertoire &amp;lt;code&amp;gt;archive/install/msvc100/TerraGear/share&amp;lt;/code&amp;gt;). Voir [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;p=77950 ce lien du forum] pour les détails.}}&lt;br /&gt;
&lt;br /&gt;
=== Interface graphique ===&lt;br /&gt;
L'interface graphique [[TerraGear GUI]] est disponible pour ceux voudraient utiliser TerraGear sans avoir à connaître/utiliser les options de ligne de commande.&lt;br /&gt;
&lt;br /&gt;
== Utilisation de TerraGear ==&lt;br /&gt;
Tout d'abord, choisissez les limites de la zone de scène que vous voulez construire, en termes de latitude et de longitude. Plus la zone à générer sera restreinte, plus la quantité de données et le temps CPU nécessaire seront limités. Par exemple, si vous voulez juste générer une nouvelle disposition d'aéroport à la position 12°3 Ouest et 34°4 Nord, la génération des scènes entre 34°N 12°O et 35°N 13°O sera suffisante. &lt;br /&gt;
&lt;br /&gt;
Notez la boîte de délimitation (longitudes et latitudes minimum et maximum) pour la scène que vous voulez générer. Rappelez-vous que Ouest et Sud sont négatifs - c'est-à-dire que 4° Ouest 10° Sud doit être -4, -10. Essayez de ne pas vous mélanger les pinceaux, sinon la scène ou l'aéroport que vous créez se retrouvera de l'autre côté de la planète !&lt;br /&gt;
&lt;br /&gt;
Vous aurez affaire avec différents types de données utilisant des formats variés. Créez un nouveau répertoire pour votre travail de scène. A l'intérieur de ce répertoire, créez les sous-répertoires suivants: &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;data/&amp;lt;/code&amp;gt;:   Pour les données brutes et pré-calculées (par exemple, les fichiers d'élévation)&lt;br /&gt;
; &amp;lt;code&amp;gt;output/&amp;lt;/code&amp;gt;: Pour les fichiers de scènes que vous créerez&lt;br /&gt;
; &amp;lt;code&amp;gt;work/&amp;lt;/code&amp;gt;:   Pour les données qui ont été calculez (par exemple par shape-decode) et qui sont prêtes à être intégrées dans la scène&lt;br /&gt;
&lt;br /&gt;
=== Obtenir et traiter les données ===&lt;br /&gt;
Terragear utilise trois sortes d'informations différentes pour générer une scène :&lt;br /&gt;
&lt;br /&gt;
# L'élévation du terrain (fournie par SRTM)&lt;br /&gt;
# L'emplacement et la disposition des aéroports (fournis par apt.dat ou un fichier .dat personnalisé) &lt;br /&gt;
# Si une lat/lon donnée correspond à la mer, la terre, une ville, une forêt, un village, une route, un chemin de fer (fourni par VMAP0, [[CORINE]], etc. ou par des fichiers personnalisés de formes)&lt;br /&gt;
&lt;br /&gt;
Cet article décrit comment obtenir et traiter chacun de ces types de données dans l'ordre, et les fournir ensemble, pour que FlightGear les utilise. L'ordre de ces étapes est important. Par exemple, l'étape des données d'un aéroport a besoin des données d'élévation pour déterminer l'élévation des aéroports. Ainsi, vous commencerez par préparer les données d'élévation.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;u&amp;gt;Remarque :&amp;lt;/u&amp;gt; pour que votre travail puisse être intégré dans les scènes officielles de FlightGear, toutes les données &amp;lt;u&amp;gt;doivent&amp;lt;/u&amp;gt; provenir de sources compatibles avec la licence [[GNU GPL]] !'''&lt;br /&gt;
&lt;br /&gt;
==== Données d'élévation ====&lt;br /&gt;
Les meilleures données d'élévation actuellement disponibles proviennent du projet Shuttle Radar Topography Mission (SRTM). Il y a deux types de données SRTM :&lt;br /&gt;
* Données de haute précision (1-arc seconde), ou SRTM-1, pour les USA&lt;br /&gt;
* Données de précision moindre (3-arc second), ou SRTM-3, pour le reste du monde&lt;br /&gt;
A partir de maintenant, nous supposerons que vous utilisez les données SRTM-3. Sauf mention contraire, le processus est identique pour SRTM-1.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez télécharger les données appropriées à partir du site http://dds.cr.usgs.gov/srtm/version2_1/. Vous devrez récupérer tous les fichiers .hgt.zip couvrant la région qui vous intéresse. Selon la taille de votre scène, cela peut représenter un grand nombre de fichiers. Téléchargez les vers l'emplacement &amp;lt;tt&amp;gt;data/SRTM-1/&amp;lt;/tt&amp;gt;(ou SRTM-3/SRTM-30 en fonction du type de données que vous téléchargez) dans votre répertoire de base. (Genapts recherchera ses données parmi un ensemble de noms de répertoires prédéfinis dans son répertoire de travail. SRTM-30 est l'un d'eux, c'est le moins déroutant dans cette liste. Notez que, à compter du 31 juillet 2010, l'outil genapts prend également en compte l'existence de répertoires SRTM-1/SRTM-3. Si vous utilisez une version plus ancienne, pensez à fournir les répertoires en utilisant --dem-path)&lt;br /&gt;
&lt;br /&gt;
Maintenant que nous avons les données, nous devons les convertir pour qu'elles puissent servir à TerraGear. Tout d'abord, dézippez chacun des fichiers .hgt. Ensuite, ouvrez la ligne de commande (Sous Windows: &amp;lt;tt&amp;gt;Démarrer &amp;gt; Exécuter &amp;gt; cmd.exe&amp;lt;/tt&amp;gt;) et placez-vous dans le répertoire de base (&amp;lt;tt&amp;gt;cd .../.../TerraGear&amp;lt;/tt&amp;gt;). &lt;br /&gt;
* '''NOTE :''' si vous voulez créer un fichier batch, remplacez &amp;lt;tt&amp;gt;%f&amp;lt;/tt&amp;gt; avec &amp;lt;tt&amp;gt;%%f&amp;lt;/tt&amp;gt;, voir à ce sujet : [http://technet.microsoft.com/en-us/library/bb490909.aspx]&lt;br /&gt;
* '''NOTE :''' pour les données SRTM-1, remplacez le &amp;lt;tt&amp;gt;3&amp;lt;/tt&amp;gt; par un &amp;lt;tt&amp;gt;1&amp;lt;/tt&amp;gt; dans le premier argument fourni à hgtchop&lt;br /&gt;
&lt;br /&gt;
Pour Windows :&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 %f .\work\SRTM-3&lt;br /&gt;
ou&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 .\data\SRTM-3\%f .\work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
Pour Linux :&lt;br /&gt;
 for i in $PWD/data/SRTM-3/*.hgt; do ./Terragear/hgtchop 3 $i $PWD/work/SRTM-3; done&lt;br /&gt;
&lt;br /&gt;
Maintenant, vous allez obtenir une quantité importante de fichiers .arr.gz dans votre répertoire work/SRTM-3/. Il nous faut les convertir au format .fit.gz. Utilisez à nouveau la ligne de commande avec&lt;br /&gt;
* '''NOTE:''' l'espace et le point à la fin sont importants !&lt;br /&gt;
&lt;br /&gt;
Pour Windows :&lt;br /&gt;
 .\Terragear\terrafit.exe work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
Pour Linux :&lt;br /&gt;
 ./Terragear/terrafit work/SRTM-3&lt;br /&gt;
&lt;br /&gt;
==== Données d'aéroports ====&lt;br /&gt;
Maintenant que nous avons les données d'élévation, nous pouvons générer nos aéroports. Tout d'abord, créons un répertoire &amp;lt;tt&amp;gt;data/airports/&amp;lt;/tt&amp;gt; et copions-y le fichier apt.dat. Ceci peut être effectué soit directement à partir de votre paquetage de FlightGear (bien que vous devrez le dé-zipper), soit il peut correspondre au fichier que vous auriez modifié avec [[TaxiDraw]].&lt;br /&gt;
&lt;br /&gt;
La commande pour créer les aéroports est &amp;quot;genapts&amp;quot;. Lancez-la sans arguments, afin de visualiser les différentes options de ligne de commande.&lt;br /&gt;
&lt;br /&gt;
Si elle est simplement lancée avec un fichier apt.dat spécifié et le répertoire de travail, elle génèrera les agencements d'aéroports pour chaque aéroport contenu dans le fichier, ce qui peut être long. &lt;br /&gt;
&lt;br /&gt;
Si vous créez juste un seul aéroport, et que vous connaissez son identifiant OACI (par exemple [[KSFO]], EGPH, EG32), utilisez cet identifiant comme suit à partir du répertoire racine de vos scènes (c'est à dire à partir du répertoire parent de vos répertoires data, work et output). Si vous utilisez un fichier apt.dat contenant un seul aéroport, vous pouvez omettre le paramètre &amp;quot;--airport&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
genapts --input=data/airports/apt.dat --work=./work --airport=&amp;lt;IDENTIFIANT_OACI_AEROPORT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Si vous générez des scènes plus grandes, alors vous pouvez spécifier les longitudes et latitudes minimum et maximum.&lt;br /&gt;
&lt;br /&gt;
Genapts va créer deux sous-répertoires dans votre répertoire work:&lt;br /&gt;
* AirportArea/&lt;br /&gt;
* AirportObj/&lt;br /&gt;
&lt;br /&gt;
Ils contiennent les définitions des agencement de l'aéroport, et de certains objets présents (par exemple les manches à air). &lt;br /&gt;
&lt;br /&gt;
==== Données d'utilisation du sol ====&lt;br /&gt;
Les dernières données que nous avons besoin de générer sont celles correspondant au type d'utilisation du sol. En général, elles proviennent du lot de données VMAP0 en tant que fichiers de formes en provenance du serveur de carte de la base de données des scènes, mais d'autres sources peuvent aussi être utilisées.&lt;br /&gt;
&lt;br /&gt;
Les données d'utilisation du sol peuvent être séparées en différents types :&lt;br /&gt;
&lt;br /&gt;
* '''Landmass :''' sépare la terre de la mer. Ces données sont utilisées comme masque pour toutes les autres données. Les plus couramment utilisées sont le Landmass VMAP0, mais GSHHS peut également être utilisé.&lt;br /&gt;
* '''Land use data :''' définit si une portion de terrain correspond à une forêt, une zone urbaine, du sable, de la lave, des glaciers, etc. Ce sont généralement données VMAP0 définies en tant que polygones.&lt;br /&gt;
* '''Line data :''' comprend les lignes de chemins de fer, les rivières, les routes. Typiquement VMAP0, mais aussi OpenStreetMap pour les routes.&lt;br /&gt;
* '''Point data :''' est actuellement uniquement utilisé pour définir les villes.&lt;br /&gt;
&lt;br /&gt;
De loin, le moyen le plus facile pour obtenir ces données est de télécharger à partir du magnifique [http://mapserver.flightgear.org MapServer] les fichiers formes pour une zone de scène donnée. Cliquez sur le lien &amp;quot;Download Shapefiles&amp;quot; (ou allez directement à : http://mapserver.flightgear.org/download.psp). Entrez dans la boîte de délimitation de la scène que vous désirez générer, sélectionnez le type de données de fichier-formes que vous voulez, et cliquez sur '''download'''. Pour les scènes de base, prenez tout ce qui est listé sous VMap0 (c'est-à-dire utilisant le préfixe v0_).&lt;br /&gt;
 &lt;br /&gt;
Téléchargez chaque fichier-forme dans un répertoire séparé (!) &amp;lt;tt&amp;gt;data/shapefiles/...&amp;lt;/tt&amp;gt;. Ainsi, pour v0_landmass, vous obtiendriez &amp;lt;tt&amp;gt;data/shapefiles/v0_landmass/v0_landmass.shp&amp;lt;/tt&amp;gt;, etc.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez charger ces fichiers-formes dans un éditeur SIG tel que [[QGIS]] ou GRASS pour les visualiser et les éditer. C'est une bonne idée pour vérifier que vous avez bien les bons fichiers ! Plus tard, vous pourrez expérimenter en remplaçant divers fichiers-formes avec d'autres versions (GSHHS pour la côte, OSM pour les routes, etc.).&lt;br /&gt;
&lt;br /&gt;
L'étape suivante décode les fichiers-formes vers le format TerraGear en utilisant la commande '''ogr-decode''' . &lt;br /&gt;
&lt;br /&gt;
Il y a trois arguments de ligne de commande importants pour ogr-decode :&lt;br /&gt;
* le répertoire de destination pour les données décodées,&lt;br /&gt;
* la localisation du répertoire de fichiers-formes,&lt;br /&gt;
* le type de matériau.&lt;br /&gt;
&lt;br /&gt;
Chaque fichier-forme correspond avec un des types de matériau défini dans les fichiers materials.xml. La correspondance est assez évidente. Par exemple, v0_mixedcroppasturecover correspond à MixedCropPastureCover. Notez que les types de matériau sont sensibles à la casse, donc il est bon de se référer au fichier &amp;lt;tt&amp;gt;[[$FG ROOT]]/materials.xml&amp;lt;/tt&amp;gt; pour vérifier. L'exception est v0_landmass, qui DOIT correspondre au type Default.&lt;br /&gt;
&lt;br /&gt;
En complément, il existe de nombreux arguments optionnels pour indiquer la largeur des données linéaires (pour les routes, les rivières, les voies de chemin de fer), quelle largeur utiliser pour les données de type point (pour les villes) et quelle est la plus grande longueur acceptable pour une ligne droite.&lt;br /&gt;
&lt;br /&gt;
Par exemple, pour décoder le fichier-forme v0_landmass, vous entrez la commande suivante :&lt;br /&gt;
&lt;br /&gt;
ogr-decode --max-segment 500 --area-type Default work/Landmass data/shapefiles/v0_landmass&lt;br /&gt;
&lt;br /&gt;
Pour créer des rivières de 10 mètres de large :&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --max-segment 500 --line-width 10 --area-type Stream work/Stream data/shapefiles/v0_stream&lt;br /&gt;
&lt;br /&gt;
Pour générer des villes d'environ 1 kilomètre de diagonale :&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --point-width 500 --area-type Town work/Town data/shapefiles/v0_town&lt;br /&gt;
&lt;br /&gt;
Lancez cette commande pour chaque fichier-forme du lot de données.&lt;br /&gt;
&lt;br /&gt;
== Générer les scènes ==&lt;br /&gt;
Vous avez maintenant un répertoire de travail, avec des sous-répertoires comme :&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
: AirportArea&lt;br /&gt;
: AirportObj&lt;br /&gt;
: Bog&lt;br /&gt;
: DryCropPastureCover&lt;br /&gt;
: EvergreenBroadCover&lt;br /&gt;
: GrassCover&lt;br /&gt;
: IrrCropPastureCover&lt;br /&gt;
: Lake&lt;br /&gt;
: Landmass&lt;br /&gt;
: Marsh&lt;br /&gt;
: MixedCropPastureCover&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
: MixedForestCover&lt;br /&gt;
: Railroad&lt;br /&gt;
: Road&lt;br /&gt;
: Sand&lt;br /&gt;
: ScrubCover&lt;br /&gt;
: Shared&lt;br /&gt;
: SRTM-3&lt;br /&gt;
: Stream&lt;br /&gt;
: Town&lt;br /&gt;
: Urban&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Nous pouvons maintenant générer les scènes en utilisant la commande fgfs-construct. Lancez la commande avec &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; pour obtenir les informations d'utilisation. &lt;br /&gt;
&lt;br /&gt;
Nous devons définir :&lt;br /&gt;
* Les répertoires de travail (--work-dir) et de sortie (--output-dir) .&lt;br /&gt;
** '''Notez''', au sujet du répertoire de sortie : il doit pointer vers le répertoire &amp;lt;tt&amp;gt;Terrain/&amp;lt;/tt&amp;gt;, sinon, les versions récentes FlightGear seront incapables de charger le terrain.&lt;br /&gt;
* Le centre de la scène que nous voulons générer (--lat, --lon).&lt;br /&gt;
* Le rayon (--xdist, --ydist) à partir duquel on génère.&lt;br /&gt;
* Tous les répertoires de travail à inclure dans la scène.&lt;br /&gt;
&lt;br /&gt;
Par exemple :&lt;br /&gt;
{{Pre2|&amp;lt;nowiki&amp;gt;fgfs-construct --work-dir=./work --output-dir=./output/Terrain --lon=55 --lat=60 --xdist=3 --ydist=3 AirportArea SRTM-3 AirportObj Stream Bog IrrCropPastureCover Town Lake Urban Landmass Railroad DryCropPastureCover Road EvergreenBroadCover Marsh Sand MixedCropPastureCover ScrubCover GrassCover MixedForestCover&amp;lt;/nowiki&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Lorsque cette commande se termine, le répertoire de sortie contiendra un sous-répertoire scenery. Pointez vers lui en paramétrant [[$FG_SCENERY]] ou en utilisant l'option de ligne de commande --fg-scenery à fgfs, et testez votre nouvelle scène !&lt;br /&gt;
&lt;br /&gt;
== Un soucis ? ==&lt;br /&gt;
Vous trouverez ci-dessous une liste de problèmes courants et leur solutions. Dans le doute, copiez/collez votre erreur dans Google. La plupart des problèmes (en particulier lors de la compilation de TerraGear) ont déjà été évoqués :&lt;br /&gt;
&lt;br /&gt;
* Crash de genapts. Quelquefois, genapts plante avec certains aéroports. Dans ce cas, essayez de le relancer avec l'argument --start-id pour démarrer à l'aéroport sur lequel il a planté, et l'argument --nudge pour essayer de remettre les calculs dans la bonne voie.&lt;br /&gt;
* fgfs-construct tué. Le processus fgfs-construct peut se suicider s'il consomme trop de ressources système. L'augmentation des valeurs pour setrlimit dans src/BuildTiles/Main/main.cxx est la meilleure solution.&lt;br /&gt;
* Les aéroports apparaissent au fond de trous, ou il y a des espaces entre les aéroports et la scène. Ceci arrive lorsque genapts est incapable de trouver la donnée d'élévation correcte, ou alors la donnée d'élévation a changé entre le lancement de genapts et celui de shape-decode. Essayez de générer un seul aéroport dans votre zone de scène en utilisant genapts, et visualisez la sortie. En particulier, soyez sûr que le répertoire work/SRTM-3 existe. &lt;br /&gt;
* Seuls les aéroports apparaissent dans la scène. Il existe trois explications typiques :&lt;br /&gt;
** vous n'avez pas téléchargé les fichiers-formes corrects de la zone;&lt;br /&gt;
** vous n'avez pas lancé shape-decode sur le fichier-forme v0_landmass comme Default &lt;br /&gt;
** vous n'avez pas inclus les répertoires corrects dans fgfs-construct. &lt;br /&gt;
* La scène générée contient des données effacées des fichiers-formes. Si vous éditez des fichiers-formes, vous devez effacer le sous-répertoire work approprié avant de lancer shape-decode. Sinon, vos changements s'ajouteront à ceux qui existent déjà.&lt;br /&gt;
* La scène entière est plate et au niveau de la mer. C'est généralement dû au fait que vous n'avez pas inclus les données d'élévation dans votre commande fgfs-construct. Assurez-vous qu'il existe un répertoire STRM-3 précisé dans la ligne de commande. &lt;br /&gt;
* Tout terrain copie le matériel d'un fichier-forme. Vous avez probablement oublié de mettre chacun des fichiers-formes téléchargés dans un répertoire séparé à l'intérieur du répertoire Data/shapefiles. &lt;br /&gt;
&lt;br /&gt;
{{Terra}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery enhancement]]&lt;br /&gt;
[[en:Using TerraGear]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Fr/Utiliser_TerraGear&amp;diff=105985</id>
		<title>Fr/Utiliser TerraGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Fr/Utiliser_TerraGear&amp;diff=105985"/>
		<updated>2016-11-18T21:17:37Z</updated>

		<summary type="html">&lt;p&gt;Puchacz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Terragearprocesschart.png|thumb|Organigramme de TerraGear]]&lt;br /&gt;
Le projet logiciel [[Fr/TerraGear|TerraGear]] participe au projet [[Fr/FlightGear|FlightGear]] en créant les fichiers utilisés par celui-ci pour représenter le relief et la texture de la Terre, ce qui comprend les aéroports, villes, champs, forêts, rivières, routes, etc. Le logiciel TerraGear lit des fichiers de données contenant l'élévation du sol, le positionnement et l'agencement des aéroports, les données géographiques d'occupation du sol, entre autres et produit les fichiers de scènes utilisés par Flightgear pour représenter la surface de la planète.&lt;br /&gt;
&lt;br /&gt;
Par simplicité et commodité, la plupart des utilisateurs de FlightGear téléchargent simplement les fichiers plug-and-play des scènes à partir du serveur de scènes de FlightGear, ou utilisent [[Fr/TerraSync|TerraSync]] pour télécharger automatiquement les scènes à la demande. Mais il peut y avoir des cas où vous voudriez utiliser TerraGear pour générer vos propres fichiers terrain, plutôt que de télécharger les scènes standard de FlightGear.&lt;br /&gt;
&lt;br /&gt;
Par exemple, si vous utilisez  [[WorldEditor]] pour modifier/améliorer les information concernant un taxiway/une aire de trafic d'un [[:Category:Airports|aéroport]], vous pourriez avoir envie de visualiser à quoi ressemblerait cet aéroport modifié dans les scènes avant de décider que les résultats vous conviennent. Peut-être que les scènes officielles sont trop détaillées pour votre machine un peu ancienne, et que vous voudriez construire un terrain avec un modèle numérique de d'élévation (DEM) de plus faible résolution, afin de diminuer le nombre de polygones et ainsi augmenter votre taux de rafraîchissement d'image. Soit vous avez une machine ultra-rapide, et vous voulez construire votre propre terrain avec des données vectorielles de plus haute résolution (vmap1, Tiger, osm) pour obtenir de meilleures routes/rivières. Pour toutes ces raisons, apprendre à utiliser TerraGear est une bonne idée.&lt;br /&gt;
&lt;br /&gt;
== Obtenir TerraGear ==&lt;br /&gt;
Vous pouvez soit compiler TerraGear vous-même, ou bien télécharger un binaire pré-compilé, cette dernière démarche étant plus aisée et donc recommandée pour les débutants.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1 - Télécharger TerraGear pré-compilé (recommandé aux débutants) sur Windows'''&lt;br /&gt;
*# Téléchargez la dernière version de TerraGear sur le [http://build.flightgear.org:8080/job/TerraGear-Win-Cmake/lastSuccessfulBuild/artifact/*zip*/archive.zip Serveur de compilation de FlightGear].&lt;br /&gt;
*# Créez ou choisissez un répertoire pour contenir les outils TerraGear. &lt;br /&gt;
*# Dé-zippez le paquetage et déplacez les fichiers de &amp;lt;tt&amp;gt;archive/install/msvc100/TerraGear/bin&amp;lt;/tt&amp;gt; dans un sous-répertoire nommé &amp;lt;tt&amp;gt;Terragear/&amp;lt;/tt&amp;gt; dans le répertoire de base.&lt;br /&gt;
&lt;br /&gt;
* '''Option 1b - Télécharger les paquetages ppa pour Ubuntu Linux'''&lt;br /&gt;
&lt;br /&gt;
https://launchpad.net/~saiarcot895/+archive/ubuntu/flightgear-edge/+index?batch=75&amp;amp;memo=75&amp;amp;start=75&lt;br /&gt;
&lt;br /&gt;
* '''Option 2 - Compiler TerraGear à partir du code source, comme expliqué dans [[Fr/TerraGear#Compilation|cet article]].&lt;br /&gt;
&lt;br /&gt;
{{note|1=Vous pourriez avoir besoin du fichier &amp;lt;code&amp;gt;default_priorities.txt&amp;lt;/code&amp;gt; qui peut être obtenu à partir du {{terragear source|path=src/BuildTiles/Main/default_priorities.txt|text=dépôt Git}} ou à partir de l'archive téléchargée à partir du serveur de compilation (dans le sous-répertoire &amp;lt;code&amp;gt;archive/install/msvc100/TerraGear/share&amp;lt;/code&amp;gt;). Voir [http://forum.flightgear.org/viewtopic.php?f=5&amp;amp;p=77950 ce lien du forum] pour les détails.}}&lt;br /&gt;
&lt;br /&gt;
=== Interface graphique ===&lt;br /&gt;
L'interface graphique [[TerraGear GUI]] est disponible pour ceux voudraient utiliser TerraGear sans avoir à connaître/utiliser les options de ligne de commande.&lt;br /&gt;
&lt;br /&gt;
== Utilisation de TerraGear ==&lt;br /&gt;
Tout d'abord, choisissez les limites de la zone de scène que vous voulez construire, en termes de latitude et de longitude. Plus la zone à générer sera restreinte, plus la quantité de données et le temps CPU nécessaire seront limités. Par exemple, si vous voulez juste générer une nouvelle disposition d'aéroport à la position 12°3 Ouest et 34°4 Nord, la génération des scènes entre 34°N 12°O et 35°N 13°O sera suffisante. &lt;br /&gt;
&lt;br /&gt;
Notez la boîte de délimitation (longitudes et latitudes minimum et maximum) pour la scène que vous voulez générer. Rappelez-vous que Ouest et Sud sont négatifs - c'est-à-dire que 4° Ouest 10° Sud doit être -4, -10. Essayez de ne pas vous mélanger les pinceaux, sinon la scène ou l'aéroport que vous créez se retrouvera de l'autre côté de la planète !&lt;br /&gt;
&lt;br /&gt;
Vous aurez affaire avec différents types de données utilisant des formats variés. Créez un nouveau répertoire pour votre travail de scène, puis créez à l'intérieur créez les sous-répertoires suivants : &lt;br /&gt;
&lt;br /&gt;
* '''data/''' - pour les données brutes et pré-calculées (par exemple, les fichiers d'élévation) &lt;br /&gt;
* '''output/''' - pour les fichiers de scènes que vous créerez&lt;br /&gt;
* '''work/''' - pour les données qui ont été calculez (par exemple par shape-decode) et qui sont prêtes à être intégrées dans la scène&lt;br /&gt;
&lt;br /&gt;
=== Obtenir et traiter les données ===&lt;br /&gt;
Terragear utilise trois sortes d'informations différentes pour générer une scène :&lt;br /&gt;
&lt;br /&gt;
# L'élévation du terrain (fournie par SRTM)&lt;br /&gt;
# L'emplacement et la disposition des aéroports (fournis par apt.dat ou un fichier .dat personnalisé) &lt;br /&gt;
# Si une lat/lon donnée correspond à la mer, la terre, une ville, une forêt, un village, une route, un chemin de fer (fourni par VMAP0, [[CORINE]], etc. ou par des fichiers personnalisés de formes)&lt;br /&gt;
&lt;br /&gt;
Cet article décrit comment obtenir et traiter chacun de ces types de données dans l'ordre, et les fournir ensemble, pour que FlightGear les utilise. L'ordre de ces étapes est important. Par exemple, l'étape des données d'un aéroport a besoin des données d'élévation pour déterminer l'élévation des aéroports. Ainsi, vous commencerez par préparer les données d'élévation.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;u&amp;gt;Remarque :&amp;lt;/u&amp;gt; pour que votre travail puisse être intégré dans les scènes officielles de FlightGear, toutes les données &amp;lt;u&amp;gt;doivent&amp;lt;/u&amp;gt; provenir de sources compatibles avec la licence [[GNU GPL]] !'''&lt;br /&gt;
&lt;br /&gt;
==== Données d'élévation ====&lt;br /&gt;
Les meilleures données d'élévation actuellement disponibles proviennent du projet Shuttle Radar Topography Mission (SRTM). Il y a deux types de données SRTM :&lt;br /&gt;
* Données de haute précision (1-arc seconde), ou SRTM-1, pour les USA&lt;br /&gt;
* Données de précision moindre (3-arc second), ou SRTM-3, pour le reste du monde&lt;br /&gt;
A partir de maintenant, nous supposerons que vous utilisez les données SRTM-3. Sauf mention contraire, le processus est identique pour SRTM-1.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez télécharger les données appropriées à partir du site http://dds.cr.usgs.gov/srtm/version2_1/. Vous devrez récupérer tous les fichiers .hgt.zip couvrant la région qui vous intéresse. Selon la taille de votre scène, cela peut représenter un grand nombre de fichiers. Téléchargez les vers l'emplacement &amp;lt;tt&amp;gt;data/SRTM-1/&amp;lt;/tt&amp;gt;(ou SRTM-3/SRTM-30 en fonction du type de données que vous téléchargez) dans votre répertoire de base. (Genapts recherchera ses données parmi un ensemble de noms de répertoires prédéfinis dans son répertoire de travail. SRTM-30 est l'un d'eux, c'est le moins déroutant dans cette liste. Notez que, à compter du 31 juillet 2010, l'outil genapts prend également en compte l'existence de répertoires SRTM-1/SRTM-3. Si vous utilisez une version plus ancienne, pensez à fournir les répertoires en utilisant --dem-path)&lt;br /&gt;
&lt;br /&gt;
Maintenant que nous avons les données, nous devons les convertir pour qu'elles puissent servir à TerraGear. Tout d'abord, dézippez chacun des fichiers .hgt. Ensuite, ouvrez la ligne de commande (Sous Windows: &amp;lt;tt&amp;gt;Démarrer &amp;gt; Exécuter &amp;gt; cmd.exe&amp;lt;/tt&amp;gt;) et placez-vous dans le répertoire de base (&amp;lt;tt&amp;gt;cd .../.../TerraGear&amp;lt;/tt&amp;gt;). &lt;br /&gt;
* '''NOTE :''' si vous voulez créer un fichier batch, remplacez &amp;lt;tt&amp;gt;%f&amp;lt;/tt&amp;gt; avec &amp;lt;tt&amp;gt;%%f&amp;lt;/tt&amp;gt;, voir à ce sujet : [http://technet.microsoft.com/en-us/library/bb490909.aspx]&lt;br /&gt;
* '''NOTE :''' pour les données SRTM-1, remplacez le &amp;lt;tt&amp;gt;3&amp;lt;/tt&amp;gt; par un &amp;lt;tt&amp;gt;1&amp;lt;/tt&amp;gt; dans le premier argument fourni à hgtchop&lt;br /&gt;
&lt;br /&gt;
Pour Windows :&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 %f .\work\SRTM-3&lt;br /&gt;
ou&lt;br /&gt;
 for %f in (.\data\SRTM-3\*.hgt) do .\Terragear\hgtchop.exe 3 .\data\SRTM-3\%f .\work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
Pour Linux :&lt;br /&gt;
 for i in $PWD/data/SRTM-3/*.hgt; do ./Terragear/hgtchop 3 $i $PWD/work/SRTM-3; done&lt;br /&gt;
&lt;br /&gt;
Maintenant, vous allez obtenir une quantité importante de fichiers .arr.gz dans votre répertoire work/SRTM-3/. Il nous faut les convertir au format .fit.gz. Utilisez à nouveau la ligne de commande avec&lt;br /&gt;
* '''NOTE:''' l'espace et le point à la fin sont importants !&lt;br /&gt;
&lt;br /&gt;
Pour Windows :&lt;br /&gt;
 .\Terragear\terrafit.exe work\SRTM-3&lt;br /&gt;
&lt;br /&gt;
Pour Linux :&lt;br /&gt;
 ./Terragear/terrafit work/SRTM-3&lt;br /&gt;
&lt;br /&gt;
==== Données d'aéroports ====&lt;br /&gt;
Maintenant que nous avons les données d'élévation, nous pouvons générer nos aéroports. Tout d'abord, créons un répertoire &amp;lt;tt&amp;gt;data/airports/&amp;lt;/tt&amp;gt; et copions-y le fichier apt.dat. Ceci peut être effectué soit directement à partir de votre paquetage de FlightGear (bien que vous devrez le dé-zipper), soit il peut correspondre au fichier que vous auriez modifié avec [[TaxiDraw]].&lt;br /&gt;
&lt;br /&gt;
La commande pour créer les aéroports est &amp;quot;genapts&amp;quot;. Lancez-la sans arguments, afin de visualiser les différentes options de ligne de commande.&lt;br /&gt;
&lt;br /&gt;
Si elle est simplement lancée avec un fichier apt.dat spécifié et le répertoire de travail, elle génèrera les agencements d'aéroports pour chaque aéroport contenu dans le fichier, ce qui peut être long. &lt;br /&gt;
&lt;br /&gt;
Si vous créez juste un seul aéroport, et que vous connaissez son identifiant OACI (par exemple [[KSFO]], EGPH, EG32), utilisez cet identifiant comme suit à partir du répertoire racine de vos scènes (c'est à dire à partir du répertoire parent de vos répertoires data, work et output). Si vous utilisez un fichier apt.dat contenant un seul aéroport, vous pouvez omettre le paramètre &amp;quot;--airport&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
genapts --input=data/airports/apt.dat --work=./work --airport=&amp;lt;IDENTIFIANT_OACI_AEROPORT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Si vous générez des scènes plus grandes, alors vous pouvez spécifier les longitudes et latitudes minimum et maximum.&lt;br /&gt;
&lt;br /&gt;
Genapts va créer deux sous-répertoires dans votre répertoire work:&lt;br /&gt;
* AirportArea/&lt;br /&gt;
* AirportObj/&lt;br /&gt;
&lt;br /&gt;
Ils contiennent les définitions des agencement de l'aéroport, et de certains objets présents (par exemple les manches à air). &lt;br /&gt;
&lt;br /&gt;
==== Données d'utilisation du sol ====&lt;br /&gt;
Les dernières données que nous avons besoin de générer sont celles correspondant au type d'utilisation du sol. En général, elles proviennent du lot de données VMAP0 en tant que fichiers de formes en provenance du serveur de carte de la base de données des scènes, mais d'autres sources peuvent aussi être utilisées.&lt;br /&gt;
&lt;br /&gt;
Les données d'utilisation du sol peuvent être séparées en différents types :&lt;br /&gt;
&lt;br /&gt;
* '''Landmass :''' sépare la terre de la mer. Ces données sont utilisées comme masque pour toutes les autres données. Les plus couramment utilisées sont le Landmass VMAP0, mais GSHHS peut également être utilisé.&lt;br /&gt;
* '''Land use data :''' définit si une portion de terrain correspond à une forêt, une zone urbaine, du sable, de la lave, des glaciers, etc. Ce sont généralement données VMAP0 définies en tant que polygones.&lt;br /&gt;
* '''Line data :''' comprend les lignes de chemins de fer, les rivières, les routes. Typiquement VMAP0, mais aussi OpenStreetMap pour les routes.&lt;br /&gt;
* '''Point data :''' est actuellement uniquement utilisé pour définir les villes.&lt;br /&gt;
&lt;br /&gt;
De loin, le moyen le plus facile pour obtenir ces données est de télécharger à partir du magnifique [http://mapserver.flightgear.org MapServer] les fichiers formes pour une zone de scène donnée. Cliquez sur le lien &amp;quot;Download Shapefiles&amp;quot; (ou allez directement à : http://mapserver.flightgear.org/download.psp). Entrez dans la boîte de délimitation de la scène que vous désirez générer, sélectionnez le type de données de fichier-formes que vous voulez, et cliquez sur '''download'''. Pour les scènes de base, prenez tout ce qui est listé sous VMap0 (c'est-à-dire utilisant le préfixe v0_).&lt;br /&gt;
 &lt;br /&gt;
Téléchargez chaque fichier-forme dans un répertoire séparé (!) &amp;lt;tt&amp;gt;data/shapefiles/...&amp;lt;/tt&amp;gt;. Ainsi, pour v0_landmass, vous obtiendriez &amp;lt;tt&amp;gt;data/shapefiles/v0_landmass/v0_landmass.shp&amp;lt;/tt&amp;gt;, etc.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez charger ces fichiers-formes dans un éditeur SIG tel que [[QGIS]] ou GRASS pour les visualiser et les éditer. C'est une bonne idée pour vérifier que vous avez bien les bons fichiers ! Plus tard, vous pourrez expérimenter en remplaçant divers fichiers-formes avec d'autres versions (GSHHS pour la côte, OSM pour les routes, etc.).&lt;br /&gt;
&lt;br /&gt;
L'étape suivante décode les fichiers-formes vers le format TerraGear en utilisant la commande '''ogr-decode''' . &lt;br /&gt;
&lt;br /&gt;
Il y a trois arguments de ligne de commande importants pour ogr-decode :&lt;br /&gt;
* le répertoire de destination pour les données décodées,&lt;br /&gt;
* la localisation du répertoire de fichiers-formes,&lt;br /&gt;
* le type de matériau.&lt;br /&gt;
&lt;br /&gt;
Chaque fichier-forme correspond avec un des types de matériau défini dans les fichiers materials.xml. La correspondance est assez évidente. Par exemple, v0_mixedcroppasturecover correspond à MixedCropPastureCover. Notez que les types de matériau sont sensibles à la casse, donc il est bon de se référer au fichier &amp;lt;tt&amp;gt;[[$FG ROOT]]/materials.xml&amp;lt;/tt&amp;gt; pour vérifier. L'exception est v0_landmass, qui DOIT correspondre au type Default.&lt;br /&gt;
&lt;br /&gt;
En complément, il existe de nombreux arguments optionnels pour indiquer la largeur des données linéaires (pour les routes, les rivières, les voies de chemin de fer), quelle largeur utiliser pour les données de type point (pour les villes) et quelle est la plus grande longueur acceptable pour une ligne droite.&lt;br /&gt;
&lt;br /&gt;
Par exemple, pour décoder le fichier-forme v0_landmass, vous entrez la commande suivante :&lt;br /&gt;
&lt;br /&gt;
ogr-decode --max-segment 500 --area-type Default work/Landmass data/shapefiles/v0_landmass&lt;br /&gt;
&lt;br /&gt;
Pour créer des rivières de 10 mètres de large :&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --max-segment 500 --line-width 10 --area-type Stream work/Stream data/shapefiles/v0_stream&lt;br /&gt;
&lt;br /&gt;
Pour générer des villes d'environ 1 kilomètre de diagonale :&lt;br /&gt;
&lt;br /&gt;
 ogr-decode --point-width 500 --area-type Town work/Town data/shapefiles/v0_town&lt;br /&gt;
&lt;br /&gt;
Lancez cette commande pour chaque fichier-forme du lot de données.&lt;br /&gt;
&lt;br /&gt;
== Générer les scènes ==&lt;br /&gt;
Vous avez maintenant un répertoire de travail, avec des sous-répertoires comme :&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
: AirportArea&lt;br /&gt;
: AirportObj&lt;br /&gt;
: Bog&lt;br /&gt;
: DryCropPastureCover&lt;br /&gt;
: EvergreenBroadCover&lt;br /&gt;
: GrassCover&lt;br /&gt;
: IrrCropPastureCover&lt;br /&gt;
: Lake&lt;br /&gt;
: Landmass&lt;br /&gt;
: Marsh&lt;br /&gt;
: MixedCropPastureCover&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
: MixedForestCover&lt;br /&gt;
: Railroad&lt;br /&gt;
: Road&lt;br /&gt;
: Sand&lt;br /&gt;
: ScrubCover&lt;br /&gt;
: Shared&lt;br /&gt;
: SRTM-3&lt;br /&gt;
: Stream&lt;br /&gt;
: Town&lt;br /&gt;
: Urban&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Nous pouvons maintenant générer les scènes en utilisant la commande fgfs-construct. Lancez la commande avec &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; pour obtenir les informations d'utilisation. &lt;br /&gt;
&lt;br /&gt;
Nous devons définir :&lt;br /&gt;
* Les répertoires de travail (--work-dir) et de sortie (--output-dir) .&lt;br /&gt;
** '''Notez''', au sujet du répertoire de sortie : il doit pointer vers le répertoire &amp;lt;tt&amp;gt;Terrain/&amp;lt;/tt&amp;gt;, sinon, les versions récentes FlightGear seront incapables de charger le terrain.&lt;br /&gt;
* Le centre de la scène que nous voulons générer (--lat, --lon).&lt;br /&gt;
* Le rayon (--xdist, --ydist) à partir duquel on génère.&lt;br /&gt;
* Tous les répertoires de travail à inclure dans la scène.&lt;br /&gt;
&lt;br /&gt;
Par exemple :&lt;br /&gt;
{{Pre2|&amp;lt;nowiki&amp;gt;fgfs-construct --work-dir=./work --output-dir=./output/Terrain --lon=55 --lat=60 --xdist=3 --ydist=3 AirportArea SRTM-3 AirportObj Stream Bog IrrCropPastureCover Town Lake Urban Landmass Railroad DryCropPastureCover Road EvergreenBroadCover Marsh Sand MixedCropPastureCover ScrubCover GrassCover MixedForestCover&amp;lt;/nowiki&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Lorsque cette commande se termine, le répertoire de sortie contiendra un sous-répertoire scenery. Pointez vers lui en paramétrant [[$FG_SCENERY]] ou en utilisant l'option de ligne de commande --fg-scenery à fgfs, et testez votre nouvelle scène !&lt;br /&gt;
&lt;br /&gt;
== Un soucis ? ==&lt;br /&gt;
Vous trouverez ci-dessous une liste de problèmes courants et leur solutions. Dans le doute, copiez/collez votre erreur dans Google. La plupart des problèmes (en particulier lors de la compilation de TerraGear) ont déjà été évoqués :&lt;br /&gt;
&lt;br /&gt;
* Crash de genapts. Quelquefois, genapts plante avec certains aéroports. Dans ce cas, essayez de le relancer avec l'argument --start-id pour démarrer à l'aéroport sur lequel il a planté, et l'argument --nudge pour essayer de remettre les calculs dans la bonne voie.&lt;br /&gt;
* fgfs-construct tué. Le processus fgfs-construct peut se suicider s'il consomme trop de ressources système. L'augmentation des valeurs pour setrlimit dans src/BuildTiles/Main/main.cxx est la meilleure solution.&lt;br /&gt;
* Les aéroports apparaissent au fond de trous, ou il y a des espaces entre les aéroports et la scène. Ceci arrive lorsque genapts est incapable de trouver la donnée d'élévation correcte, ou alors la donnée d'élévation a changé entre le lancement de genapts et celui de shape-decode. Essayez de générer un seul aéroport dans votre zone de scène en utilisant genapts, et visualisez la sortie. En particulier, soyez sûr que le répertoire work/SRTM-3 existe. &lt;br /&gt;
* Seuls les aéroports apparaissent dans la scène. Il existe trois explications typiques :&lt;br /&gt;
** vous n'avez pas téléchargé les fichiers-formes corrects de la zone;&lt;br /&gt;
** vous n'avez pas lancé shape-decode sur le fichier-forme v0_landmass comme Default &lt;br /&gt;
** vous n'avez pas inclus les répertoires corrects dans fgfs-construct. &lt;br /&gt;
* La scène générée contient des données effacées des fichiers-formes. Si vous éditez des fichiers-formes, vous devez effacer le sous-répertoire work approprié avant de lancer shape-decode. Sinon, vos changements s'ajouteront à ceux qui existent déjà.&lt;br /&gt;
* La scène entière est plate et au niveau de la mer. C'est généralement dû au fait que vous n'avez pas inclus les données d'élévation dans votre commande fgfs-construct. Assurez-vous qu'il existe un répertoire STRM-3 précisé dans la ligne de commande. &lt;br /&gt;
* Tout terrain copie le matériel d'un fichier-forme. Vous avez probablement oublié de mettre chacun des fichiers-formes téléchargés dans un répertoire séparé à l'intérieur du répertoire Data/shapefiles. &lt;br /&gt;
&lt;br /&gt;
{{Terra}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery enhancement]]&lt;br /&gt;
[[en:Using TerraGear]]&lt;/div&gt;</summary>
		<author><name>Puchacz</name></author>
	</entry>
</feed>