Scripted Compilation on Linux Debian/Ubuntu: Difference between revisions

m
Robot: Cosmetic changes
m (Robot: Cosmetic changes)
Line 4: Line 4:
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]]).


===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 13: Line 13:
* [[Terrasync]]
* [[Terrasync]]


==Download==
== Download ==
You can download the script here: [http://www.gitorious.org/fg/fgmeta/blobs/raw/master/download_and_compile.sh download_and_compile.sh]
You can download the script here: [http://www.gitorious.org/fg/fgmeta/blobs/raw/master/download_and_compile.sh download_and_compile.sh]


Line 20: Line 20:
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 FG and all its dependencies in an automated fashion, please refer to: http://geoffmclane.com/fg/fgfs-052.htm


==Instructions==
== Instructions ==
To run download_and_compile.sh, just save it in a directory called for example: ~/fg_tools
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).
then execute it (no need to execute it as root).
Line 34: Line 34:
Once all will be finished, you will sucessfully get all the programs installed in the ~/fgfs directory.
Once all will be finished, you will sucessfully 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>
Line 41: Line 41:
</pre>
</pre>


===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 utiliy Fgrun which is installed as well in the same folder. You have to launch the ''run_fgrun.sh'' command, for example:
<pre>
<pre>
Line 48: Line 48:
</pre>
</pre>


===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>
Line 55: Line 55:
</pre>
</pre>


===Launching FGComGui===
=== Launching FGComGui ===
FgComGui is a GUI wrapper to launch fgcom.
FgComGui is a GUI wrapper to launch fgcom.
<pre>
<pre>
Line 62: Line 62:
</pre>
</pre>


===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>
Line 69: Line 69:
</pre>
</pre>


===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>
Line 77: Line 77:
Where: ''/folder/with/sceneries'' is the folder containing the sceneries data.
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
Then launch fgfs with the '''--fg-scenery=/folder/with/sceneries --atlas=socket,out,5,localhost,5500,udp''' option


==Troubleshooting==
== Troubleshooting ==


===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 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/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.
Line 91: Line 91:
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>
Line 97: Line 97:
</pre>
</pre>


===Compiling only one program===
=== 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:
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)
* PLIB (to compile and install only plib)
Line 109: Line 109:
* ATLAS (to compile and install only Atlas)
* ATLAS (to compile and install only Atlas)


===Fast updating===
=== Fast updating ===
There is a second parameter ''UPDATE'' that allows you to just update your installation. i.e.:
There is a second parameter ''UPDATE'' that allows you to just update your installation. i.e.:
This will only update FGFS
This will only update FGFS
Line 116: Line 116:
</pre>
</pre>


===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 know versions of the software that was compiling successfully adding the -s option.
<pre>
<pre>
Line 124: Line 124:
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 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.


===Advanced options===
=== Advanced options ===
* Skip download of packages using '''-p n''' option
* Skip download of packages using '''-p n''' option
* Skip compilation of programs using '''-c n''' option
* Skip compilation of programs using '''-c n''' option
Line 137: Line 137:
this will only recompile modifications and reinstall them.
this will only recompile modifications and reinstall them.


===Multicore Acceleration===
=== Multicore Acceleration ===
Using the option '''-j x''' (where x is the number of your CPU-Cores you wish to assign to the job) will speed up the whole compilation process considerably.
Using the option '''-j x''' (where x is the number of your CPU-Cores you wish to assign to the job) will speed up the whole compilation process considerably.


==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 codes and data from git requires some hard disk space: It will take you 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 some hours of compilation time.


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