FFGo: Difference between revisions

Jump to navigation Jump to search
4,053 bytes added ,  25 November 2019
→‎Using pip (generic method): No need to add a separate anchor to link to a section. Use <Article>"#"<Section>, like FFGo#Using pip (generic method) instead
m (→‎Updating the software: Use the Note template for nicer formatting)
(→‎Using pip (generic method): No need to add a separate anchor to link to a section. Use <Article>"#"<Section>, like FFGo#Using pip (generic method) instead)
(35 intermediate revisions by 3 users not shown)
Line 3: Line 3:
| title                  = FFGo
| title                  = FFGo
| image                  = FFGo LPMA-apt-tooltip-and-FG-cmd.png
| image                  = FFGo LPMA-apt-tooltip-and-FG-cmd.png
| alt                    = Screenshot of FFGo 1.10.1
| alt                    = Screenshot of FFGo 1.12.3
| developedby            = Florent Rougon
| developedby            = Florent Rougon
| type                  = Graphical launcher for FlightGear
| type                  = Graphical launcher for FlightGear
| initialrelease        = 1.0.0 (Aug 21, 2015)
| initialrelease        = 1.0.0 (Aug 21, 2015)
| latestrelease          = 1.11.0 (Mar 14, 2016)
| latestrelease          = 1.12.5 (March 29, 2017)
| writtenin              = Python 3
<!-- simplifying Python3 to Python for the category to work correctly-->
| writtenin              = Python
| writteninversion              = 3
| os                    = Unix-like (incl. Linux), Windows, MacOS X
| os                    = Unix-like (incl. Linux), Windows, MacOS X
| developmentstatus      = Active (as of Mar 2016)
| developmentstatus      = Active (as of March 2017)
| website                = http://people.via.ecp.fr/~flo/projects/FFGo/
| website                = http://frougon.net/projects/FFGo/
| license                = {{wikipedia|WTFPL#Version 2|WTFPL version 2|noicon=1}}
| license                = {{wikipedia|WTFPL#Version 2|WTFPL version 2|noicon=1}}
}}
}}
Line 19: Line 21:
== Features ==
== Features ==


One of the things that distinguish FFGo from other FlightGear launchers is the text window allowing one to write any (possibly advanced) [[Command_line_options|command line options]] that will be passed to FlightGear. This is similar, but more convenient and powerful, to editing the [[Fgfsrc|.fgfsrc]] configuration file. The main difference in power compared to editing .fgfsrc or using FGo! comes from FFGo's use of [http://people.via.ecp.fr/~flo/projects/CondConfigParser/ CondConfigParser] to process the user's configuration. See [https://people.via.ecp.fr/~flo/projects/FFGo/doc/README-conditional-config/ FFGo conditional config documentation] for more information on this aspect of FFGo.
One of the things that distinguish FFGo from other FlightGear launchers is the text window allowing one to write any (possibly advanced) [[Command_line_options|command line options]] that will be passed to FlightGear. This is similar, but more convenient and powerful, to editing the [[Fgfsrc|.fgfsrc]] configuration file. The main difference in power compared to editing .fgfsrc or using FGo! comes from FFGo's use of [http://frougon.net/projects/CondConfigParser/ CondConfigParser] to process the user's configuration. See [http://frougon.net/projects/FFGo/doc/README-conditional-config/ FFGo conditional config documentation] for more information on this aspect of FFGo.


In addition to this, FFGo offers:
In addition to this, FFGo offers:
Line 38: Line 40:
* easy viewing and saving of FlightGear output (log);
* easy viewing and saving of FlightGear output (log);
* automatic FFGo + FlightGear log saving and rotating;
* automatic FFGo + FlightGear log saving and rotating;
* ability to read and merge an arbitrary number of in-scenery-paths, uncompressed or gzip-compressed apt.dat files. This is compliant with a feature<ref name="multi-apt.dat-input">In short, FlightGear and FFGo now read and merge all <tt>$scenery_path/NavData/apt/*.dat[.gz]</tt> files for each scenery path, plus the default <tt>$FG_ROOT/Airports/apt.dat.gz</tt>, coming last.</ref> [https://sourceforge.net/p/flightgear/flightgear/ci/516a5cf016a7d504b09aaac2e0e66c7e9efd42b2/ introduced in FlightGear 2016.4.0], more precisely on October 17, 2016. For the interfacing with FFGo, FlightGear must be more recent than November 9, 2016 (precisely, [https://sourceforge.net/p/flightgear/flightgear/ci/fb10f76e59ef0fbe598befb895daaf2969b78e0c/ FlightGear commit fb10f76e] is needed). FlightGear 2016.3.x and older still work with FFGo, but using the old behavior, where only <tt>$FG_ROOT/Airports/apt.dat.gz</tt> is read.
* complete German translation, complete French translation except for the help file ([https://github.com/frougon/FFGo/blob/master/ffgo/data/help/help_en en], [https://github.com/frougon/FFGo/blob/master/ffgo/data/help/help_fr fr]), other translations currently outdated (English is the language FFGo is written in, thus it is obviously complete, and not a translation ''per se'').
* complete German translation, complete French translation except for the help file ([https://github.com/frougon/FFGo/blob/master/ffgo/data/help/help_en en], [https://github.com/frougon/FFGo/blob/master/ffgo/data/help/help_fr fr]), other translations currently outdated (English is the language FFGo is written in, thus it is obviously complete, and not a translation ''per se'').


Line 150: Line 153:
== Installation tips ==
== Installation tips ==
=== Instructions — Read this first! ===
=== Instructions — Read this first! ===
Since installation instructions may in general depend on the particular FFGo version you want to install, they are always included in release tarballs and zip files, precisely in the <tt>docs/INSTALL</tt> folder. Such tarballs and zip files can be downloaded from [http://people.via.ecp.fr/~flo/projects/FFGo/ FFGo's home page] as well as from [https://pypi.python.org/pypi/FFGo FFGo's page on PyPI] (PyPI being [https://pypi.python.org/pypi the Python Package Index]). However, apart from the addition of a small number of optional dependencies, the installation method hasn't changed since FFGo 1.0.0, therefore there is little risk for now using the online [https://github.com/frougon/FFGo/blob/master/docs/INSTALL/INSTALL_en Git version of the installation guide].
Since installation instructions may in general depend on the particular FFGo version you want to install, they are always included in release tarballs and zip files, precisely in the <tt>docs/INSTALL</tt> folder. Such tarballs and zip files can be downloaded from [http://frougon.net/projects/FFGo/ FFGo's home page] as well as from [https://pypi.python.org/pypi/FFGo FFGo's page on PyPI] (PyPI being [https://pypi.python.org/pypi the Python Package Index]). However, apart from the addition of a small number of optional dependencies, the installation method hasn't changed since FFGo 1.0.0, therefore there is little risk for now using the online [https://github.com/frougon/FFGo/blob/master/docs/INSTALL/INSTALL_en Git version of the installation guide].


The guide mentioned in the previous paragraph is rather detailed, because it explains a few concepts that may be new to users who are not Python developers, and tries to give general instructions covering all common cases, which is not very easy given that Python may or may not be shipped depending on the particular operation system in use (Windows, Linux, MacOS X, etc.). To the contrary, the following sections give specific instructions applicable in the most common cases on each OS where I know a working procedure. They are more practical, probably easier to follow than the installation guide, at the expense of being less generic.
The guide mentioned in the previous paragraph is rather detailed, because it explains a few concepts that may be new to users who are not Python developers, and tries to give general instructions covering all common cases, which is not very easy given that Python may or may not be shipped depending on the particular operation system in use (Windows, Linux, MacOS X, etc.). To the contrary, the following sections give specific instructions applicable in the most common cases on each OS where I know a working procedure. They are more practical, probably easier to follow than the installation guide, at the expense of being less generic.
Line 177: Line 180:
       </li>
       </li>
       <li>
       <li>
         Don't change the default value for the Python installation folder,
         Don't change the default value for the Python installation folder, otherwise you are likely to run into permission problems: except for old versions of Windows, writing to <i>Program Files</i>, at least, is subject to special restrictions that may cause the <code>pip install</code> step to fail. Also take note of what this installation folder is—you may find this helpful later.
        otherwise you are likely to run into permission problems: except for
        old versions of Windows, writing to <i>Program Files</i>, at least, is
        subject to special restrictions that may cause the
        <code>pip install</code> step to fail.
       </li>
       </li>
       <li>
       <li>
         If you are not comfortable with the command line (“Command Prompt”),
        It is recommended ''not to disable'' the [https://docs.python.org/3/using/windows.html#launcher Python Launcher for Windows], as it may prove very useful later.
        it is suggested you choose <i>Add python.exe to Path</i> (or <i>Add
      </li>
        Python X.Y to PATH</i>: the precise wording depends on the Python
      <li>
        version). This way, you will be able to run the <tt>pip</tt> and
        <p>
        <tt>ffgo</tt> programs directly at the Command Prompt without having
         If you are not comfortable with the [[Command_line|command line]] (“Command Prompt”), it is suggested you choose <i>Add python.exe to Path</i> (or <i>Add Python X.Y to PATH</i>: the precise wording depends on the Python version). This way, you will be able to run the <tt>pip</tt> and <tt>ffgo</tt> programs directly at the Command Prompt in the simplest possible way (this mainly matters for <tt>pip</tt>, because for <tt>ffgo</tt>, you can easily create a shortcut on the Desktop, for instance).
         to specify their full paths.
         </p>


         <p>
         <p>
Line 196: Line 195:


         <blockquote>
         <blockquote>
           <p>
           <p>          
             In such a case, you'll have to type commands such as:
             In such a case, assuming you didn't disable the [https://docs.python.org/3/using/windows.html#launcher Python Launcher for Windows] in the Python installer, you'll have to type commands such as:
           </p>
           </p>


           <pre>C:\PythonXY\Scripts\pip install ...</pre>
           <pre>py -3.5 -m pip install ...</pre>


           <p>
           <p>
             (where <i>XY</i> would be <tt>35</tt> for a Python 3.5
             instead of:
            installation, for instance) instead of:
           </p>
           </p>


Line 210: Line 208:


           <p>
           <p>
             Another way would be to use the
             Such a command is similar to <code>pip install ...</code>, but makes sure that <tt>pip</tt> is run by Python 3.5, in case there are several Python installations on your Windows system.
            [https://docs.python.org/3/using/windows.html#launcher Python Launcher for Windows]
            (assuming you didn't disable it in the Python installer) like this:
           </p>
           </p>


           <pre>py -3.5 -m pip install ...</pre>
          <p>
            Another way would be to call the desired <tt>pip</tt> executable by specifying its full path, like this:
          </p>
 
           <pre>C:\PythonXY\Scripts\pip install ...</pre>


           <p>
           <p>
             Such a command is akin to <code>pip install ...</code> but makes
             (where <i>XY</i> would be <tt>35</tt> for a Python 3.5 installation, for instance)<br />
            sure that <tt>pip</tt> is run by Python 3.5, in case there are
             This method requires knowing where the Python installation you are interested in is installed (<tt>C:\PythonXY</tt> in this example), which seems to depend on the Windows version. Therefore, the <code>py -X.Y -m pip ...</code> method, using the [https://docs.python.org/3/using/windows.html#launcher Python Launcher for Windows], will be preferred here.
             several Python installations on your system.
           </p>
           </p>
         </blockquote>
         </blockquote>
Line 227: Line 226:
   </li>
   </li>
   <li>
   <li>
     Open a terminal, aka “Command Prompt”:
     Open a terminal, also known as “Command Prompt”:


     <p>
     <p>
Line 235: Line 234:
       Apparently (according to Google, see for yourself), on Windows 10, this
       Apparently (according to Google, see for yourself), on Windows 10, this
       can (also?) be done with the <tt>Windows+X</tt> keyboard shortcut, then
       can (also?) be done with the <tt>Windows+X</tt> keyboard shortcut, then
       choosing <i>Command Prompt</i> in the menu that should appear.
       choosing <i>Command Prompt</i> in the menu that should appear. If you
      have never used the Command Prompt on Windows, reading the
      [[Command_line|Command line page on the wiki]] would certainly be a good
      idea.
     </p>
     </p>
   </li>
   </li>
   <li>
   <li>
     In this terminal, type: <code>pip install FFGo Pillow geographiclib</code>
     In this terminal, type: <code>pip install FFGo Pillow geographiclib</code>
    {{Note|[[File:FFGo - Windows installation using the Python Launcher for Windows (py).png|thumbnail|Windows installation under Python 3.5 using the Python Launcher for Windows (py)]]
      <p>
        If you didn't add Python to your PATH environment variable when installing it, the command would rather be something like:
      </p>
      <pre>py -3.5 -m pip install FFGo Pillow geographiclib</pre>
      <p>
        for a Python 3.5 installation. Specifying <code>-3</code> instead of <code>-3.5</code> would use the latest Python 3.x version installed on your system.
      </p>}}


     <p>
     <p>
Line 249: Line 262:


     {{Note|<code>pip install ffgo</code> has the same effect as <code>pip install FFGo</code>.}}
     {{Note|<code>pip install ffgo</code> has the same effect as <code>pip install FFGo</code>.}}
    <p>
      Also note that messages such as:
    </p>
    <blockquote>
      <tt>warning: no previously-included files found matching 'docs\README.conditional-config\_static\README.txt'</tt>
    </blockquote>
    <p>
      when running the <code>pip install ...</code> command are completely normal and harmless, just ignore them. This command should print something like:
    </p>
    <blockquote>
      <tt>Successfully installed CondConfigParser FFGo Pillow geographiclib</tt>
    </blockquote>
    <p>
      towards the end if all went well.
    </p>
   </li>
   </li>
</ol>
</ol>


Note:
After these steps, you should have a working FFGo. You can run it by double-clicking on either <tt>ffgo.exe</tt> or <tt>ffgo-noconsole.exe</tt> in a directory such as <tt>C:\Python</tt><i>XY</i><tt>\Scripts</tt>, where <tt><i>XY</i></tt> corresponds to the Python version that was used in the <code>pip install FFGo ...</code> command. These two executables do the same, except <tt>ffgo.exe</tt> opens a Windows terminal (“console”) containing all FFGo messages, while <tt>ffgo-noconsole.exe</tt> doesn't. You can safely use the latter most of the time. Should FFGo refuse to start for some reason, running <tt>ffgo.exe</tt> and examining/reporting the printed messages would certainly be helpful. You may want to create shortcuts for these files by right-clicking on the <tt>.exe</tt> file of your choice, choosing <i>Create Shortcut</i> and dragging the newly-created shortcut to the final, desired place (e.g., your desktop).
<blockquote>Messages such as:


: <tt>warning: no previously-included files found matching 'docs\README.conditional-config\_static\README.txt'</tt>
{{tip|If you wish, you can also run FFGo from a Command Prompt; here is how.


when running the <code>pip install ...</code> command are completely normal and harmless, just ignore them. This command should print something like:
  <p>
    First, [[Command_line#Windows|open a Command Prompt]], then:
  </p>


: <tt>Successfully installed CondConfigParser FFGo Pillow geographiclib</tt>
  <ul>
    <li>
      if you chose to add <tt>python.exe</tt> to the PATH in the Python
      installer as hinted above, just type <code>ffgo</code>;
    </li>
    <li>
      otherwise:


towards the end if all went well.
      <ul>
</blockquote>
        <li>
          either run FFGo directly using a full path to one of its executables<ref name="Windows-allows-omitting-.exe-extension">As shown in the command, you may omit the <tt>.exe</tt> extension from the executable name.</ref><ref name="default-Python-install-path-depends-on-Windows-version">The default Python installation path (e.g., <tt>C:\Python<i>XY</i></tt>) seems to depend on the version of Windows, not only on the Python version (which would be <i>X.Y</i> in this example).</ref>, such as:


After these steps, you should have a working FFGo. You can run it by double-clicking on either <tt>ffgo.exe</tt> or <tt>ffgo-noconsole.exe</tt> in a directory such as <tt>C:\Python</tt><i>XY</i><tt>\Scripts</tt>, where <tt><i>XY</i></tt> corresponds to the Python version that was used in the <code>pip install FFGo ...</code> command. These two executables do the same, except <tt>ffgo.exe</tt> opens a Windows terminal (“console”) containing all FFGo messages, while <tt>ffgo-noconsole.exe</tt> doesn't. You can safely use the latter most of the time. Should FFGo refuse to start for some reason, running <tt>ffgo.exe</tt> and examining/reporting the printed messages would certainly be helpful. You may want to create shortcuts for these files by right-clicking on the <tt>.exe</tt> file of your choice, choosing <i>Create Shortcut</i> and dragging the newly-created shortcut to the final, desired place (e.g., your desktop).
            <pre>C:\PythonXY\Scripts\ffgo</pre>
        </li>
        <li>
          or change to the containing directory, then run the executable you
          want, as in:


Another way to run FFGo is to open a Command Prompt and type:
          <pre>C:
* <code>ffgo</code> if you chose <i>Add python.exe to Path</i> in the Python installer as hinted above;
cd \PythonXY\Scripts
* or a full path to one of the FFGo executables, such as <code>C:\PythonXY\Scripts\ffgo.exe</code> in case you didn't.
ffgo</pre>
        </li>
      </ul>
    </li>
  </ul>}}


The instructions given here install all dependencies of FFGo, except one optional dependency: the [http://geographiclib.sourceforge.net/html/MagneticField.1.html MagneticField] executable from [http://geographiclib.sourceforge.net/ GeographicLib] (see [[FFGo#A word about GeographicLib|below]]). To have a complete installation, that is able to show the magnetic variation at each airport and magnetic headings for runways, routes, etc., you need to do this in addition:
The instructions given above install all dependencies of FFGo, except one optional dependency: the [http://geographiclib.sourceforge.net/html/MagneticField.1.html MagneticField] executable from [http://geographiclib.sourceforge.net/ GeographicLib] (see [[FFGo#A word about GeographicLib|below]]). To have a complete installation, that is able to show the magnetic variation at each airport and magnetic headings for runways, routes, etc., you need to do this in addition:
# Go to [http://geographiclib.sourceforge.net/html/install.html#binaryinst GeographicLib's installation page] and run the appropriate installer for your system. This will install the <tt>MagneticField.exe</tt> executable on your computer. Take note of the folder it is installed to, because you'll have to tell the full path of this program to FFGo, unless you let the GeographicLib installer modify your <tt>PATH</tt> environment variable.
# <tt>MagneticField.exe</tt> needs one or more datasets to be installed, otherwise it can't work properly. To get such a dataset, go to [http://geographiclib.sourceforge.net/html/magnetic.html GeographicLib's page for magnetic models] and install the magnetic model data file(s) of your choice. <tt>wmm2015</tt> should be fine until 2020. You may also install the <tt>emm2015</tt> dataset, however I can't say whether this will bring any visible change for typical aviation usage.
# If you let the GeographicLib installer modify your <tt>PATH</tt> in step 1, there is nothing else to do. Otherwise, you have to tell FFGo where to find <tt>MagneticField.exe</tt>. In order to do this, start FFGo and open the <i>Settings → Preferences</i> dialog; go to the <i>Miscellaneous</i> tab, and enter the precise path for <tt>MagneticField.exe</tt> in the appropriate field (cf. step 1). Finally, click on <i>Save settings</i> and you should be done.


The FFGo dialog reachable via <i>Help → About</i> displays the versions of the main dependencies used by FFGo. In case you entered an invalid path, or some other error, a hint is generally given there. In any case, troubleshooting information is always printed to the terminal (if you ran <tt>ffgo.exe</tt> as opposed to <tt>ffgo-noconsole.exe</tt>) and to the FFGo log file located in the <tt>%APPDATA%\FFGo\config</tt> folder (do a Google search with keywords “Windows” and “APPDATA” if you don't know what this means).
<ol>
  <li>
    <p>
      Go to [http://geographiclib.sourceforge.net/html/install.html#binaryinst GeographicLib's installation page] and run the appropriate installer for your system. This will install the <tt>MagneticField.exe</tt> executable on your computer. Take note of the folder it is installed to, because you'll have to tell the full path of this program to FFGo, unless you let the GeographicLib installer modify your <tt>PATH</tt> environment variable.
    </p>
    <gallery mode="packed">
GeographicLib - Setup wizard (first screen).png
GeographicLib - License agreement.png
GeographicLib - Installation options without modifying PATH.png
GeographicLib - Installation location.png
GeographicLib - Creating Start menu folder.png
GeographicLib - End of installation wizard.png
    </gallery>
  </li>
  <li>
    <p>
      <tt>MagneticField.exe</tt> needs one or more datasets to be installed, otherwise it can't work properly. To get such a dataset, go to [http://geographiclib.sourceforge.net/html/magnetic.html GeographicLib's page for magnetic models] and install the magnetic model data file(s) of your choice. <tt>wmm2015</tt> should be fine until 2020. You may also install the <tt>emm2015</tt> dataset, however I can't say whether this will bring any visible change for typical aviation usage.
    </p>
    <gallery mode="packed">
GeographicLib - Finding the download page for magnetic models.png
GeographicLib - Choosing a magnetic model for download.png
GeographicLib - WMM2015 magnetic model setup wizard.png
    </gallery>
    <p>
      When asked for the installation folder, you should probably choose <tt>C:\ProgramData\GeographicLib</tt> as per the above link.
    </p>
  </li>
  <li>
    <p>
      If you let the GeographicLib installer modify your <tt>PATH</tt> in step 1, there is nothing else to do. Otherwise, you have to tell FFGo where to find <tt>MagneticField.exe</tt>. In order to do this, start FFGo and open the <i>Settings → Preferences</i> dialog; go to the <i>Miscellaneous</i> tab, and enter the precise path for <tt>MagneticField.exe</tt> in the appropriate field (cf. step 1). Finally, click on <i>Save settings</i> and you should be done.
    </p>
    <gallery mode="packed">
FFGo - Opening the Preferences dialog (Windows screenshot).png
FFGo - Specifying a path to GeographicLib's MagneticField program.png
    </gallery>
  </li>
</ol>
 
The FFGo dialog reachable via <i>Help → About</i> displays the versions of the main dependencies used by FFGo. In case you entered an invalid path, or some other error, a hint is generally given there. In any case, troubleshooting information is always printed to the terminal (if you ran <tt>ffgo.exe</tt> as opposed to <tt>ffgo-noconsole.exe</tt>) and to the FFGo log file located in the <tt>%APPDATA%\FFGo\Logs</tt> folder (do a Google search with keywords “Windows” and “APPDATA” if you don't know what this means).


<strong>If for some reason you can't run <tt>pip</tt>:</strong>
<strong>If for some reason you can't run <tt>pip</tt>:</strong>
Line 360: Line 444:
<pre>C:\> pip install --upgrade --pre ffgo</pre>
<pre>C:\> pip install --upgrade --pre ffgo</pre>


<p>Note:</p>
{{Note|Development snapshots have version numbers such as 1.9.0.dev2; beta versions have numbers like 1.9.0b1; for release candidates, the version number can be of the form 1.9.0c2 or 1.9.0rc2, etc. All this is explained in [https://www.python.org/dev/peps/pep-0440/ PEP 0440] if you are interested.}}
 
<blockquote>
Development snapshots have version numbers such as 1.9.0.dev2; beta versions
have numbers like 1.9.0b1; for release candidates, the version number can be
of the form 1.9.0c2 or 1.9.0rc2, etc. All this is explained in
[https://www.python.org/dev/peps/pep-0440/ PEP 0440] if you are interested.
</blockquote>


===== Uninstalling the software =====
===== Uninstalling the software =====
Line 396: Line 473:
Florent Rougon. They can be downloaded and installed normally using
Florent Rougon. They can be downloaded and installed normally using
''apt-get'', ''aptitude'', etc. provided you have installed
''apt-get'', ''aptitude'', etc. provided you have installed
[https://people.via.ecp.fr/~flo/OpenPGP-key.asc Florent's OpenPGP key].
[http://frougon.net/OpenPGP-key.asc Florent's OpenPGP key].


<ul>
<ul>
Line 412: Line 489:
</syntaxhighlight>
</syntaxhighlight>


the output of which should show the [https://people.via.ecp.fr/~flo/keys.html correct fingerprint]:
the output of which should show the [http://frougon.net/keys.html correct fingerprint]:


<pre>pub  rsa4096/0xC785B90B5053A3A2 2010-03-17 [expires: 2016-10-19]
<pre>pub  rsa4096/0xC785B90B5053A3A2 2010-03-17 [expires: 2016-10-19]
Line 424: Line 501:
command—using digital signatures, done with each participant's key).
command—using digital signatures, done with each participant's key).
</li>
</li>
<li>Then, in order to have they key in a separate file, say <tt>~/tmp/flo-key</tt>, you can run:
<li>Then, in order to have the key in a separate file, say <tt>~/tmp/flo-key</tt>, you can run:


<syntaxhighlight lang="shell" enclose="div">
<syntaxhighlight lang="shell" enclose="div">
Line 431: Line 508:
attacks—using <tt>/tmp</tt> instead of <tt>~/tmp</tt> wouldn't be a great idea).</li></ol>
attacks—using <tt>/tmp</tt> instead of <tt>~/tmp</tt> wouldn't be a great idea).</li></ol>
</li>
</li>
<li>The other way is getting [https://people.via.ecp.fr/~flo/OpenPGP-key.asc the key] via HTTPS from [https://people.via.ecp.fr/~flo/ Florent's home page] (it is linked from [https://people.via.ecp.fr/~flo/keys.html that page] on Florent's site). HTTPS uses TLS which is kind of
<li>The other way is getting [http://frougon.net/OpenPGP-key.asc the key] from [http://frougon.net/ Florent's home page] (it is linked from [http://frougon.net/keys.html that page] on Florent's site). In short, assuming you have the <tt>wget</tt> package installed, you can get the key with:
crap, but it is not worse than when you check your bank accounts online or
purchase something online, or download most programs without <tt>apt</tt>
(which relies on GnuPG, not HTTPS). In short, assuming you have the <tt>wget</tt> package installed, you can get the key with:


<syntaxhighlight lang="shell" enclose="div">
<syntaxhighlight lang="shell" enclose="div">
wget -O ~/tmp/flo-key https://people.via.ecp.fr/~flo/OpenPGP-key.asc
wget -O ~/tmp/flo-key http://frougon.net/OpenPGP-key.asc
</syntaxhighlight></li>
</syntaxhighlight></li>
Once you have that key in the file <tt>flo-key</tt>, you can install it for <tt>apt</tt> by running, <i>as root</i>:
Once you have that key in the file <tt>flo-key</tt>, you can install it for <tt>apt</tt> by running, <i>as root</i>:
Line 448: Line 522:


<syntaxhighlight lang="shell" enclose="div">
<syntaxhighlight lang="shell" enclose="div">
wget -O- https://people.via.ecp.fr/~flo/OpenPGP-key.asc | apt-key add -
wget -O- http://frougon.net/OpenPGP-key.asc | apt-key add -
</syntaxhighlight>
</syntaxhighlight>


Line 461: Line 535:
<p>Add the following lines to your <tt>/etc/apt/sources.list</tt>:</p>
<p>Add the following lines to your <tt>/etc/apt/sources.list</tt>:</p>


<pre>deb http://people.via.ecp.fr/~flo/debian-ffgo unstable main
<pre>deb http://frougon.net/debian-ffgo unstable main
deb-src http://people.via.ecp.fr/~flo/debian-ffgo unstable main</pre>
deb-src http://frougon.net/debian-ffgo unstable main</pre>


<p>(replace <tt>unstable</tt> with <tt>jessie</tt> if you are using <i>jessie</i>)</p>
<p>(replace <i>unstable</i> with <i>stretch</i> if you are using Debian 9, also known as <i>stretch</i>)</p>
</li>
</li>
<li>'''Third step: update the <tt>apt</tt> package list'''
<li>'''Third step: update the <tt>apt</tt> package list'''
Line 486: Line 560:
<li><tt>python3-geographiclib</tt> if available for your distribution (i.e., after <i>jessie</i>), for better geodesic calculations.</li></ul>
<li><tt>python3-geographiclib</tt> if available for your distribution (i.e., after <i>jessie</i>), for better geodesic calculations.</li></ul>


<p>In other words, if you are using ''unstable'', you can run:</p>
<p>In other words, if you are using Debian ''stretch'' or later, you can run:</p>


<pre>apt-get install ffgo python3-pil.imagetk geographiclib-tools python3-geographiclib</pre>
<pre>apt-get install ffgo python3-pil.imagetk geographiclib-tools python3-geographiclib</pre>
Line 494: Line 568:
<pre>apt-get install ffgo python3-pil.imagetk geographiclib-tools</pre>
<pre>apt-get install ffgo python3-pil.imagetk geographiclib-tools</pre>


'''Note:'''
{{Note|To avoid pulling in the entire FlightGear packages, you could tell apt-get to not install the recommendations in the deb file:<br>
<blockquote>Installing the <tt>geographiclib-tools</tt> package is not enough to have the <tt>MagneticField</tt> program working. This program needs one or more datasets which are not part of the <tt>geographiclib-tools</tt> package. One easy way to install the minimal dataset on Debian is to run the following command with root privileges:
<code>apt-get install --no-install-recommends ffgo python3-pil.imagetk geographiclib-tools python3-geographiclib</code><br>
This is useful, if you have FG installed some other way, than by your package manager.}}
 
{{Note|Installing the <tt>geographiclib-tools</tt> package is not enough to have the <tt>MagneticField</tt> program working. This program needs one or more datasets which are not part of the <tt>geographiclib-tools</tt> package. One easy way to install the minimal dataset on Debian is to run the following command with root privileges:


<pre>/usr/sbin/geographiclib-get-magnetic minimal</pre>
<pre>/usr/sbin/geographiclib-get-magnetic minimal</pre>


This will automatically download and install a minimal dataset under <tt>/usr/share/GeographicLib/magnetic</tt>, where it can be found by <tt>MagneticField</tt> (not registering the added files with <tt>dpkg</tt> though, which is a bit ugly, cf. [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687253 Debian bug #687253]).
This will automatically download and install a minimal dataset under <tt>/usr/share/GeographicLib/magnetic</tt>, where it can be found by <tt>MagneticField</tt> (not registering the added files with <tt>dpkg</tt> though, which is a bit ugly, cf. [https://bugs.debian.org/687253 Debian bug #687253]). Otherwise, you can read the [http://geographiclib.sourceforge.net/html/MagneticField.1.html MagneticField(1) manual page] which explains how to tell MagneticField where he should look to find the datasets it needs.}}
Otherwise, you can read the [http://geographiclib.sourceforge.net/html/MagneticField.1.html MagneticField(1) manual page] which explains how to tell MagneticField where he should look to find the datasets it needs.
</blockquote>


Once the <tt>ffgo</tt> package is installed, FFGo can be run from the [http://freedesktop.org/ freedesktop] menu and, obviously, from the command line (the command name is <tt>ffgo</tt>).
Once the <tt>ffgo</tt> package is installed, FFGo can be run from the [http://freedesktop.org/ freedesktop] menu and, obviously, from the command line (the command name is <tt>ffgo</tt>).
Line 555: Line 630:
Just as for the [https://pip.pypa.io/ pip] command explained above, think of <code>/usr/bin/python3.4 -m venv</code> as the name of a program (it just runs the main function of the Python <tt>venv</tt> module). In the above command, you can freely choose the <venv-dir> directory. It is just a directory that is going to contain the newly-created virtual environment once this command returns (therefore, you shouldn't have anything inside it before running the command, otherwise that would be messy).
Just as for the [https://pip.pypa.io/ pip] command explained above, think of <code>/usr/bin/python3.4 -m venv</code> as the name of a program (it just runs the main function of the Python <tt>venv</tt> module). In the above command, you can freely choose the <venv-dir> directory. It is just a directory that is going to contain the newly-created virtual environment once this command returns (therefore, you shouldn't have anything inside it before running the command, otherwise that would be messy).


<p>Notes:</p>
<p>Note:</p>
<blockquote>
<blockquote>
<ul><li><p>Some systems may provide executables named <tt>pyvenv-3.4</tt> or similar. For instance, on Debian, <tt>/usr/bin/pyvenv-3.4</tt> is a “shortcut” for <code>/usr/bin/python3.4 -m venv</code>. Thus, one may type:</p>
<p>Some systems may provide executables named <tt>pyvenv-3.4</tt> or similar. For instance, on Debian, <tt>/usr/bin/pyvenv-3.4</tt> is a “shortcut” for <code>/usr/bin/python3.4 -m venv</code>. Thus, one may type:</p>


<syntaxhighlight lang="shell" enclose="div">
<syntaxhighlight lang="shell" enclose="div">
Line 564: Line 639:


<p>to obtain the same effect as above: creating a virtual environment in <venv-dir> based on the Python interpreter <tt>/usr/bin/python3.4</tt>. Thanks to shell command history, using <code>/usr/bin/python3.4 -m venv</code> is not much of a problem, and since this makes it quite clear which Python interpreter is going to be used, I'll favor this syntax here rather than the shorter syntax based on <tt>pyvenv-3.4</tt>.</p>
<p>to obtain the same effect as above: creating a virtual environment in <venv-dir> based on the Python interpreter <tt>/usr/bin/python3.4</tt>. Thanks to shell command history, using <code>/usr/bin/python3.4 -m venv</code> is not much of a problem, and since this makes it quite clear which Python interpreter is going to be used, I'll favor this syntax here rather than the shorter syntax based on <tt>pyvenv-3.4</tt>.</p>
</li>
<li><p>Currently (March 1st, 2016), this step doesn't work on Debian
<i>unstable</i>—there is a reason it is called <i>unstable</i>—because the
<tt>python3-venv</tt> package is broken (cf.
[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815864 bug #815864]). See
[http://forum.flightgear.org/viewtopic.php?f=18&t=27054&p=278031#p278031 this message on the FlightGear forum] for possible workarounds.</p>
</li>
</ul>
</blockquote>
</blockquote>


Line 596: Line 663:
<p><em><strong>First session:</strong> installing FFGo (and some of its
<p><em><strong>First session:</strong> installing FFGo (and some of its
dependencies, such as
dependencies, such as
[http://people.via.ecp.fr/~flo/projects/CondConfigParser/ CondConfigParser])
[http://frougon.net/projects/CondConfigParser/ CondConfigParser])
using <tt>pip</tt> in a virtual environment.</em></p>
using <tt>pip</tt> in a virtual environment.</em></p>


Line 717: Line 784:
<li><p><em><strong>Second session:</strong> installing some of FFGo's
<li><p><em><strong>Second session:</strong> installing some of FFGo's
dependencies (such as
dependencies (such as
[http://people.via.ecp.fr/~flo/projects/CondConfigParser/ CondConfigParser])
[http://frougon.net/projects/CondConfigParser/ CondConfigParser])
using <tt>pip</tt> in a virtual environment, while using FFGo directly from a
using <tt>pip</tt> in a virtual environment, while using FFGo directly from a
clone of its [https://github.com/frougon/FFGo Git repository].</em></p>
clone of its [https://github.com/frougon/FFGo Git repository].</em></p>
Line 799: Line 866:
======  Updating the software ======
======  Updating the software ======


Note: ''none of the following should be run as root.''
{{Note|None of the following should be run as root.}}


<ol style="list-style-type: decimal">
<ol style="list-style-type: decimal">
Line 1,000: Line 1,067:
choice.</p>
choice.</p>


<p>Note:</p>
{{Note|This script installs FFGo inside the virtual environment. If you want to use FFGo from its Git repository instead, just replace <tt>FFGo</tt> with <tt>CondConfigParser</tt> in the last line of the script (since CondConfigParser is a mandatory dependency of FFGo).}}
 
<blockquote>
This script installs FFGo inside the virtual environment. If you want to use
FFGo from its Git repository instead, just replace <tt>FFGo</tt> with
<tt>CondConfigParser</tt> in the last line of the script (since CondConfigParser is a mandatory dependency of FFGo).
</blockquote>
</li>
</li>
</ul>
</ul>
Line 1,012: Line 1,073:
==== MacOS X ====
==== MacOS X ====


Installation should be similar to how it is done on Linux with ''pip'' in most ways, once you have installed a suitable Python version. OS X expert needed for the little OS X-specific details (how to install Python in a non-intrusive way for the system, how to run ''pip'' in this particular installation, and how to create a shortcut to the resulting ''ffgo'' executable for convenience).
Installation should be similar to how it is done on Linux with ''pip'' in most ways, once you have installed a suitable Python version. OS X expert needed for the little OS X-specific details:
* how to install Python 3.4 or later in a non-intrusive way for the system;
* how to access the corresponding <tt>python</tt> executable, and;
* how to create a shortcut to the resulting ''ffgo'' executable for convenience.


=== A word about GeographicLib ===
=== A word about GeographicLib ===
Line 1,039: Line 1,103:


== Related content ==
== Related content ==
* [http://people.via.ecp.fr/~flo/projects/FFGo/ FFGo's home page]
* [http://frougon.net/projects/FFGo/ FFGo's home page]
* [https://people.via.ecp.fr/~flo/projects/FFGo/doc/README-conditional-config/ FFGo conditional config documentation]
* [http://frougon.net/projects/FFGo/doc/README-conditional-config/ FFGo conditional config documentation]
* [http://forum.flightgear.org/viewtopic.php?f=18&t=27054 FFGo's thread on the FlightGear forum]
* [http://forum.flightgear.org/viewtopic.php?f=18&t=27054 FFGo's thread on the FlightGear forum]
* [[FGo!]] — ''predecessor to FFGo''
* [[FGo!]] — ''predecessor to FFGo''
Line 1,051: Line 1,115:


[[Category:FlightGear front ends]]
[[Category:FlightGear front ends]]
<!--
[[Category:Python Software]]
-->

Navigation menu