Scripted Compilation on Linux Debian/Ubuntu: Difference between revisions

Jump to navigation Jump to search
m
spelling and links to mentioned programs
m (→‎Compilation errors: fix tinny typo inside a big and nice article)
m (spelling and links to mentioned programs)
Line 1: Line 1:
==Description==
==Description==
The following script takes care of downloading and compiling Flightgear from the cvs repositories with just one command execution for both 32 and 64 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 within it is launched.
The following script takes care of downloading and compiling Flightgear from the cvs repositories with just one command execution for both 32 and 64 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 within 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).


===List of compiled programs===
===List of compiled programs===
Line 10: Line 10:
* Fgcom
* Fgcom
* Atlas
* Atlas
* Terrasync


==Download==
==Download==
Line 15: Line 17:


==Instructions==
==Instructions==
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 be 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>
mkdir ~/fgfs
mkdir ~/fgfs
Line 25: Line 27:
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 all will be finished, you will sucessfully get all the programs installed in the ~/fgfs directory.


===Launching Flightgear===
===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:
To run your new cvs 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 35: Line 37:


===Launching Fgrun===
===Launching Fgrun===
For many users it is 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:
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>
<pre>
cd ~/fgfs
cd ~/fgfs
Line 41: Line 43:
</pre>
</pre>


===Launching Fgcom===
===Launching FGCOM===
Fgcom is the system used by flightgear to simulate radio comunications 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 56: Line 58:


===Launching Terrasync===
===Launching Terrasync===
Flightgear compilations cames 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
sh run_terrasync.sh -p 5500 -d /folder/with/sceneries
sh run_terrasync.sh -p 5500 -d /folder/with/sceneries
</pre>
</pre>
where: /folder/with/sceneries is the folder containing the sceneries data.
Where: ''/folder/with/sceneries'' is the folder containing the sceneries data.


==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.<br>
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.
 
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 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:
# 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 wont.
# 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.
# One or more repositories are down and you can't get the library you need. (Both from cvs/svn or apt-get)<br>
# 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 the previous error never took place.<br>
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 happens that the script fails to compile only fgrun,fgcom or atlas, if you then see the run_fgfs.sh file it means that flighgear 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 85: Line 88:


===Compiling only one program===
===Compiling only one program===
If you wish to recompile only one of the program you can launch the script with the parameter:
If you wish to recompile only one of the programs you can launch the script with 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)
* SIMGEAR (To compile and install only Simgear)
* SIMGEAR (to compile and install only Simgear)
* FGFS (To compile and install only FlightGear)
* FGFS (to compile and install only FlightGear)
* DATA (To download / update only data files for FlightGear)
* DATA (to download / update only data files for FlightGear)
* FGRUN (To compile and install only Fgrun)
* FGRUN (to compile and install only Fgrun)
* FGCOM (To compile and install only Fgcom)
* FGCOM (to compile and install only Fgcom)
* 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 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
<pre>
<pre>
Line 103: Line 106:


==Disk usage==
==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.
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 hour of compilation time.
If you don't have a fast machine, it will require you also some hours of compilation time.
51

edits

Navigation menu