Scripted Compilation on Linux Debian/Ubuntu: Difference between revisions

m
spelling and wording improvements
(→‎Instructions: make directory name consistent)
m (spelling and wording improvements)
Line 1: Line 1:
==Description==
==Description==
The following script takes care of downloading and compiling Flightgear from the git 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.
The following script takes care of downloading and compiling FlightGear from the git 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]]).
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]]).
Line 6: Line 6:
=== List of compiled programs ===
=== List of compiled programs ===
The script is able to download and compile:
The script is able to download and compile:
* Flightgear (And all the data needed to use it)
* FlightGear (And all the data needed to use it)
* [[Fgrun]]
* [[Fgrun]]
* [[FGCOM]]
* [[FGCOM]]
Line 18: Line 18:
The script is maintained in the FlightGear main repository. Remember to update this script whenever a new FlightGear version is released, so that you'll be able to download the latest stable revision.
The script is maintained in the FlightGear main repository. Remember to update this script whenever a new FlightGear version is released, so that you'll be able to download the latest stable revision.


There is also another option for building FG and all its dependencies in an automated fashion, please refer to: http://geoffmclane.com/fg/fgfs-052.htm
There is also another option for building FlightGear and all its dependencies in an automated fashion, please refer to: http://geoffmclane.com/fg/fgfs-052.htm


== Instructions ==
== Instructions ==
Line 32: Line 32:
sh download_and_compile.sh
sh download_and_compile.sh
</pre>
</pre>
Once all will be finished, you will sucessfully get all the programs installed in the ~/fgfs directory.
Once the script is finished, you will successfully get all the programs installed in the ~/fgfs directory.


=== Launching FlightGear ===
=== Launching FlightGear ===
To run your new git installation of Flightgear you have to launch the ''run_fgfs.sh'' command under the same folder, for example:
To run your new git installation of FlightGear you have to launch the ''run_fgfs.sh'' command under the same folder, for example:
<pre>
<pre>
cd ~/fgfs
cd ~/fgfs
Line 42: Line 42:


=== Launching Fgrun ===
=== Launching Fgrun ===
For many users it's more comfortable having Flightgear launched by the graphical utiliy Fgrun which is installed as well in the same folder. You have to launch the ''run_fgrun.sh'' command, for example:
For many users it's more comfortable having FlightGear launched by the graphical utility Fgrun which is installed as well in the same folder. You have to launch the ''run_fgrun.sh'' command, for example:
<pre>
<pre>
cd ~/fgfs
cd ~/fgfs
Line 49: Line 49:


=== Launching FGCOM ===
=== Launching FGCOM ===
FGCOM is the system used by flightgear to simulate radio communications between users. Launch it using the ''run_fgcom.sh'' command:
FGCOM is the system used by FlightGear to simulate radio communications between users. Launch it using the ''run_fgcom.sh'' command:
<pre>
<pre>
cd ~/fgfs
cd ~/fgfs
Line 63: Line 63:


=== Launching Atlas ===
=== Launching Atlas ===
Atlas provides a map for Flightgear, use it launching: ''run_atlas.sh''
Atlas provides a map for FlightGear, use it launching: ''run_atlas.sh''
<pre>
<pre>
cd ~/fgfs
cd ~/fgfs
Line 70: Line 70:


=== Launching Terrasync ===
=== Launching Terrasync ===
Your Flightgear compilation comes with the Terrasync program too, so if you want to use it:
Your FlightGear compilation comes with the Terrasync program too, so if you want to use it:
<pre>
<pre>
cd ~/fgfs
cd ~/fgfs
Line 82: Line 82:


=== Compilation errors ===
=== Compilation errors ===
Here we are, no fear, if you wish to use programs from the cvs/svn/git 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:
Here we are, no fear, if you wish to use programs from the cvs/svn/git 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 successfully 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/git sources.
# 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/git 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.
# The program refuses to compile because of a divergence in the libraries on which 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/git or apt-get)
# One or more repositories are down and you can't get the library you need. (Both from cvs/svn/git 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.
There is a simple solution to the above errors: wait and relaunch the script after some time (hours or days), if software developers repair or synchronize their code with the newly updated libraries (which generally happens eventually), 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.
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 ==
== 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.:
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>
<pre>
sh download_and_compile.sh ALL
sh download_and_compile.sh ALL
Line 117: Line 117:


=== Compiling last stable versions (Experimental) ===
=== Compiling last stable versions (Experimental) ===
Event if the script fetches data and sources from bleeding edge developers repositories (which sometimes do not compile), you can still force the script to download latest know versions of the software that was compiling successfully adding the -s option.
Event if the script fetches data and sources from bleeding edge developers repositories (which sometimes do not compile), you can still force the script to download latest known versions of the software that were compiling successfully by adding the -s option.
<pre>
<pre>
sh download_and_compile.sh -s
sh download_and_compile.sh -s
</pre>
</pre>


How it works ? Inside the script there is a small list with lates known versions of successfully compiling revisions, it will download from svn/git that specific revisions, which have been found able to compile together.
How does it work? Inside the script there is a small list with latest known versions of successfully compiling revisions, it will download from svn/git those specific revisions, which have been found able to compile together.


=== Advanced options ===
=== Advanced options ===
Line 130: Line 130:
* Skip reconfigure (make clean) using '''-r 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:
For example, if you are a developer and wish to quickly recompile and reinstall only your own modifications for FlightGear do this:
<pre>
<pre>
sh download_and_compile.sh -p n -d n -r n  FGFS
sh download_and_compile.sh -p n -d n -r n  FGFS
Line 141: Line 141:


== Disk usage ==
== Disk usage ==
Having both compiled program, source codes and data from git requires some hard disk space: It will take you something like 7 GB of space.
Having both compiled program, source code, and data from git requires some hard disk space: It will take something like 7 GB of space.
If you don't have a fast machine, it will require you also some hours of compilation time.
If you don't have a fast machine, it will require you also several hours of compilation time.


[[nl:Compileren met een Script op Linux Debian/Ubuntu]]
[[nl:Compileren met een Script op Linux Debian/Ubuntu]]
20

edits