==Description== The following script takes care of downloading and compiling Flightgear from the cvs repositories with just one command execution for both 32-bit and 64-bit Debian based systems (Debian, Ubuntu). Pre-existing installed version (if any) of Flightgear are not touched at all since the script builds and installs everything under the directory in which it is launched.
Necessary packages are installed via the apt-get system while libraries not included in the repositories are downloaded and compiled on the fly (i. e. [[Plib]], [[Simgear]] and [[OSG]]).
===List of compiled programs=== The script is able to download and compile: * Flightgear (And all the data needed to use it) * [[ Fgrun]] * [[ FGCOM]] * [[Atlas]] * [[Terrasync]]
Download== You can download the script here: [[http://brisa.homelinux.net/fgfs/download_and_compile.sh download_and_compile.sh]]
The script is hosted on a home server, so if the electricity goes down or internet connection fails, you will be not able to download it directly.[[ http://www. rato. us/ flightgear/ download_and_compile. sh A backup is here]]
all else fails, join the [[ FlightGear IRC channel]] and ask for the download_and_compile.sh script. Someone there will be likely to provide it to you.
==Instructions== To run download_and_compile.sh , just save it in a directory called for example: ~/ fg_tools then execute it (no need to execute it as root).
Here is for example a sequence of commands to get the script and launch it in a new folder.< pre> mkdir ~/fgfs cd ~/fgfs wget http://brisa.homelinux.net/fgfs/download_and_compile.sh chmod 755 download_and_compile. sh sh download_and_compile.sh</ pre> Once all will be finished, you will sucessfully get all the programs installed in the ~/ fgfs directory.
===Launching FlightGear=== To run your new cvs installation of Flightgear you have to launch the ''run_fgfs.sh '' command under the same folder, for example:< pre> cd ~/ fgfs sh run_fgfs. sh</ pre>
Launching Fgrun= == For many users it's more comfortable having Flighgear launched by the graphical utiliy Fgrun wich is installed as well in the same folder. You have to launch the ''run_fgrun.sh'' command, for example: <pre> cd ~/fgfs sh run_fgrun.sh </pre>
===Launching FGCOM=== FGCOM is the system used by flightgear to simulate radio communications between users. Launch it using the ''run_fgcom.sh'' command: <pre> cd ~/fgfs sh run_fgcom. sh -cs </pre>
===Launching Atlas=== Atlas provides a map for Flightgear, use it launching: ''run_atlas.sh'' <pre> cd ~/fgfs sh run_fgatlas.sh </pre>
===Launching Terrasync=== Your Flightgear compilation comes with the Terrasync program too, so if you want to use it: <pre> cd ~/fgfs sh run_terrasync.sh -p 5500 -d /folder/with/sceneries </pre> Where: ''/folder/with/sceneries'' is the folder containing the sceneries data.
Then launch fgfs with the '''-- fg-scenery=/folder/with/sceneries --atlas=socket,out,5,localhost,5500,udp''' option
Compilation errors=== Here we are, no fear, if you wish to use programs from the cvs/svn repositories, you might face compilation errors that will prevent you to have a working copy of one or more of the programs provided by this script. What can be the causes that prevent us from a successful compiling? As far as I know those: # Software developers introduce a new functionality with a new piece of code that prevents the compilation under your architecture, this can happen working with cvs/svn sources. # The program refuses to compile because of a divergence in the libraries it depends. For example Flightgear might not compile because OSG has been modified, while OSG itself compiles fine, FG won't. # One or more repositories are down and you can't get the library you need. (Both from cvs/svn or apt- get)
There is a simple solution to the above errors: wait and relaunch the script after some time ( hours or days) , if (and generally happens) software developers repair or synchronize their code with the newly updated libraries, your Flightgear will compile fine as if the previous error never took place.
Sometimes it happens that the script fails to compile only fgrun,fgcom or atlas, if you then see the run_fgfs. sh file it means that Flightgear installation was successful and you can safely run it.
Options== The script by default (without any option) will only compile Flightgear and Fgrun. To make it compile all, you need to launch the script with the ''ALL'' parameter. i.e.: <pre> sh download_and_compile.sh ALL </pre>
=Compiling only one program=== If you wish to recompile only one of the programs you can launch the script with one of the following parameters: * PLIB (to compile and install only plib) * OSG (to compile and install only OpenSceneGraph) * SIMGEAR (to compile and install only Simgear) * FGFS (to compile and install only FlightGear) * DATA (to download / update only data files for FlightGear) * FGRUN (to compile and install only Fgrun) * FGCOM (to compile and install only Fgcom) * ATLAS (to compile and install only Atlas)
Fast updating== = There is a second parameter '' UPDATE'' that allows you to just update your installation. i. e. : This will only update FGFS <pre>sh download_and_compile.sh FGFS UPDATE
===Advanced options=== * Skip download of packages using '''- p n''' option * Skip compilation of programs using '''- c n''' option* Skip retrieving software updates using '''-d n''' option * Skip reconfigure (make clean) using '''-r n''' option
For example, if you a developer and wish to fast recompile and reinstall only modification for FlightGear do this:<pre> sh download_and_compile.sh - p n - d n - r n FGFS
this will only recompile modifications and reinstall them.
==Disk usage== Having both compiled program, source codes and data from cvs requires some hard disk space: It will take you something like 3GB of space. If you don't have a fast machine, it will require you also some hours of compilation time.