Scripted Compilation on Linux Debian/Ubuntu: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 18: Line 18:
To run it, just save it in a directory called for example: ~/fg_tools
To run it, 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).
Here is for example a sequence of commands to get the script and launch it in a new folder.
Here is for example a sequence of commands to get the script and launch it in a new folder.
<pre>
<pre>
Line 50: Line 51:


===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 57: Line 58:


===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 66: Line 67:
==Troubleshottings==
==Troubleshottings==
===Obtaining the script===
===Obtaining the script===
The script is hosted by my home server, if electricity goes down or internet connection failes, you will be not able to download it directly.
The script is hosted by my home server, if electricity goes down or internet connection fails, you will be not able to download it directly.


Solution: Ask on the irc channel for the download_and_compile.sh script, the community will provide it for you.
Solution: Ask on the irc channel for the download_and_compile.sh script, the community will provide it for you.


===Compilation errors===
===Compilation errors===
Here we are, no fear, if you wish to use programs from the cvs/svn repositories, you will face anytime 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 this:
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.
# 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 can happen the Flightgear does 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 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)
# 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 (end 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 (end 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.
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 87: Line 88:


===Compiling only one program===
===Compiling only one program===
If you wish to recompile only one of the programs you can launch the script with 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)
* OSG (to compile and install only OpenSceneGraph)
* OSG (to compile and install only OpenSceneGraph)
51

edits