185
edits
(Shorten note and remove redundancy concerning disk space requirements) |
(add prerequisites section since dnc doesn't automatically pull these needed tools if they are not already installed.) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 16: | Line 16: | ||
Apart from its main purpose, <tt>download_and_compile.sh</tt> can be used to find hopefully up-to-date build-dependency information for FlightGear and related software. You would do so by inspecting [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/download_and_compile.sh the script] at the point where it installs packages.<ref name="note-inspecting-download-and-compile-sh-to-gather-build-dependency-information">Look for strings such as <tt>zlib1g-dev</tt>, <tt>libglew-dev</tt> or <tt>qt5-default</tt>.</ref> | Apart from its main purpose, <tt>download_and_compile.sh</tt> can be used to find hopefully up-to-date build-dependency information for FlightGear and related software. You would do so by inspecting [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/download_and_compile.sh the script] at the point where it installs packages.<ref name="note-inspecting-download-and-compile-sh-to-gather-build-dependency-information">Look for strings such as <tt>zlib1g-dev</tt>, <tt>libglew-dev</tt> or <tt>qt5-default</tt>.</ref> | ||
== Prerequisites == | |||
Before embarking on building your own FlightGear binaries, you must have already installed the necessary tools to compile the source code with. These preliminary tools are | |||
* build-essential | |||
* git | |||
* subversion | |||
* cmake | |||
* automake | |||
They can be installed quite simply by running the following command line. | |||
$ sudo apt-get install build-essential git subversion cmake automake | |||
Once these tools are installed, the download_and_compile.sh script can be run. It will install possibly needed additional tools and libraries as it runs. | |||
== <span id="disk-space-requirements-and-build-time"></span> Disk space requirements and build time == | == <span id="disk-space-requirements-and-build-time"></span> Disk space requirements and build time == | ||
Line 264: | Line 280: | ||
There we are! You now have a clean, up-to-date [[FGData]] clone in <tt>~/flightgear/dnc-managed/install/flightgear/fgdata</tt> (remember: <tt>~/flightgear/dnc-managed</tt> is the directory from which you ran <tt>download_and_compile.sh</tt>). Note this place: the full path of the <tt>~/flightgear/dnc-managed/install/flightgear/fgdata</tt> directory is your [[$FG_ROOT]]. | There we are! You now have a clean, up-to-date [[FGData]] clone in <tt>~/flightgear/dnc-managed/install/flightgear/fgdata</tt> (remember: <tt>~/flightgear/dnc-managed</tt> is the directory from which you ran <tt>download_and_compile.sh</tt>). Note this place: the full path of the <tt>~/flightgear/dnc-managed/install/flightgear/fgdata</tt> directory is your [[$FG_ROOT]]. | ||
Now | Now, change the protocol to use for future updates of your FGData clone:<ref name="changing-the-protocol-for-a-git-remote-manual-method">Another way would be to manually change the relevant line starting with <code><nowiki>url = ssh://SFusername@</nowiki></code> for the <code>origin</code> remote in the <tt>.git/config</tt> file that lives inside your repository clone (i.e., <tt>~/flightgear/dnc-managed/install/flightgear/fgdata/.git/config</tt> in our example).</ref> | ||
(cd install/flightgear/fgdata && \ | |||
git remote set-url origin <nowiki>https://git.code.sf.net/p/flightgear/fgdata</nowiki>) | |||
(you can check at any time the protocol(s) in use with the command <code>git remote -v</code> run inside a Git repository—in this case, inside the folder <tt>install/flightgear/fgdata</tt>). As a consequence of this change, all future updates of your FGData clone will use the <tt>https</tt> protocol, therefore you won't be prompted anymore for your SourceForge password. | |||
All that remains to do is to run, from the same directory as before (<tt>~/flightgear/dnc-managed</tt> in our example): | All that remains to do is to run, from the same directory as before (<tt>~/flightgear/dnc-managed</tt> in our example): | ||
Line 446: | Line 461: | ||
}} for FlightGear.}} | }} for FlightGear.}} | ||
This can be useful for instance to work around bugs in a part of SimGear or FlightGear that you don't need, but causes a build or runtime failure (see | This can be useful for instance to work around bugs in a part of SimGear or FlightGear that you don't need, but causes a build or runtime failure (see {{forum link|t=35740|text=here}} for example). This is often convenient when using the development version of FlightGear, but doesn't mean such bugs shouldn't be reported! | ||
If you have several such options to pass, just use spaces to separate them inside the quotes: | If you have several such options to pass, just use spaces to separate them inside the quotes: | ||
Line 577: | Line 592: | ||
$ rm -rf build/* install/simgear/ install/openrti/ install/flightgear/share/ install/flightgear/bin/ | $ rm -rf build/* install/simgear/ install/openrti/ install/flightgear/share/ install/flightgear/bin/ | ||
See | See {{forum link|t=26244|text=this thread}} for more details. | ||
== Options == | == Options == | ||
Line 613: | Line 628: | ||
The same can be done for the [[FlightGear_Launch_Control|FGRun]] launcher: | The same can be done for the [[FlightGear_Launch_Control|FGRun]] launcher: | ||
$ sed 's|\./fgrun|optirun ./fgrun|' run_fgrun.sh > run_fgrun_optirun.sh && chmod +x run_fgrun_optirun.sh | $ sed 's|\./fgrun|optirun ./fgrun|' run_fgrun.sh > run_fgrun_optirun.sh && chmod +x run_fgrun_optirun.sh | ||
== See also == | == See also == | ||
Line 635: | Line 646: | ||
[[Category:Building from source]] | [[Category:Building from source]] | ||
[[fr:Script de compilation sous Linux Debian/Ubuntu]] | |||
[[nl:Compileren met een Script op Linux Debian/Ubuntu]] | [[nl:Compileren met een Script op Linux Debian/Ubuntu]] | ||
edits