FFGo: Difference between revisions

533 bytes added ,  12 March 2016
→‎Installing FFGo and its dependencies: Make the source markup more readable and easier to maintain
(→‎Installing FFGo and its dependencies: Give hints about what to do when pip can't be run (following jaxsin's suggestion))
(→‎Installing FFGo and its dependencies: Make the source markup more readable and easier to maintain)
Line 149: Line 149:
to run ''pip'' with a Python 3.5 installation</code> (not having Windows, I haven't been able to test this myself; please remove this parenthesis if this works, otherwise report on the [http://forum.flightgear.org/viewtopic.php?f=18&t=27054 FFGo thread on the FlightGear forum] with enough details to allow me to help you).</ref> There we go:
to run ''pip'' with a Python 3.5 installation</code> (not having Windows, I haven't been able to test this myself; please remove this parenthesis if this works, otherwise report on the [http://forum.flightgear.org/viewtopic.php?f=18&t=27054 FFGo thread on the FlightGear forum] with enough details to allow me to help you).</ref> There we go:


# Install Python 3.4 or later:
<ol type="1">
## Download Python from the [https://python.org/ Python home page].
  <li>
## Make sure to enable the ''Tcl/tk'' and ''pip'' components in the installer (this may be located under a label such as ''Customize installation'').
    Install Python 3.4 or later:
## 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 ''Program Files'', at least, is subject to special restrictions that may cause the <code>pip install</code> step to fail.
    <ol type="a">
## If you are not comfortable with the command line (“Command Prompt”), it is suggested you choose ''Add python.exe to Path'' (or ''Add Python X.Y to PATH'': the precise wording depends on the Python version). This way, you will be able to run the ''pip'' and ''ffgo'' programs directly at the Command Prompt without having to specify their full paths. If you choose not to do this, you'll have to type things such as <code>C:\Python<i>XY</i>\Scripts\pip install ...</code> instead of <code>pip install ...</code>, where <i>XY</i> would be <tt>35</tt> for a Python 3.5 installation.
      <li>
# Open a terminal, aka “Command Prompt”:<p>There are various ways to do this, depending on the version of Windows in use. One way that should work is using the <tt>Windows+R</tt> keyboard shortcut, then entering <tt>cmd.exe</tt> in the text input box. Apparently (according to Google, see for yourself), on Windows 10, this can (also?) be done with the <tt>Windows+X</tt> keyboard shortcut, then choosing ''Command Prompt'' in the menu that should appear.</p>
        Download Python from the [https://python.org/ Python home page].
# In this terminal, type:<br /><code>pip install FFGo Pillow geographiclib</code><br />FFGo can work without Pillow and geographiclib, but it will offer more features if you install them. The previous command should automatically download and install FFGo from [https://pypi.python.org/pypi/FFGo FFGo's page on PyPI].<p>Note: <code>pip install ffgo</code> has the same effect as <code>pip install FFGo</code>.
      </li>
      <li>
        Make sure to enable the ''Tcl/tk'' and ''pip'' components in the
        installer (this may be located under a label such as <i>Customize
        installation</i>).
      </li>
      <li>
        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.
      </li>
      <li>
        If you are not comfortable with the 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 without having
        to specify their full paths. If you choose not to do this, you'll have
        to type things such as
        <code>C:\Python<i>XY</i>\Scripts\pip install ...</code> instead of
        <code>pip install ...</code>, where <i>XY</i> would be <tt>35</tt> for
        a Python 3.5 installation.
      </li>
    </ol>
  </li>
  <li>
    Open a terminal, aka “Command Prompt”:
 
    <p>
      There are various ways to do this, depending on the version of Windows
      in use. One way that should work is using the <tt>Windows+R</tt>
      keyboard shortcut, then entering <tt>cmd.exe</tt> in the text input box.
      Apparently (according to Google, see for yourself), on Windows 10, this
      can (also?) be done with the <tt>Windows+X</tt> keyboard shortcut, then
      choosing <i>Command Prompt</i> in the menu that should appear.
    </p>
  </li>
  <li>
    In this terminal, type: <code>pip install FFGo Pillow geographiclib</code>
 
    <p>
      FFGo can work without Pillow and geographiclib, but it will offer more
      features if you install them. The previous command should automatically
      download and install FFGo from
      [https://pypi.python.org/pypi/FFGo FFGo's page on PyPI].
    </p>
 
    <p>
      Note: <code>pip install ffgo</code> has the same effect as
      <code>pip install FFGo</code>.
    </p>
  </li>
</ol>


Note:
Note:
Line 169: Line 223:
</blockquote>
</blockquote>


After these steps, you should have a working FFGo. You can run it by double-clicking on either ''ffgo.exe'' or ''ffgo-noconsole.exe'' 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 ''ffgo.exe'' opens a Windows terminal (“console”) containing all FFGo messages, while ''ffgo-noconsole.exe'' doesn't. You can safely use the latter most of the time. Should FFGo refuse to start for some reason, running ''ffgo.exe'' and examining/reporting the printed messages would certainly be helpful. You may want to create shortcuts for these files by right-clicking on the ''.exe'' file of your choice, choosing ''Create Shortcut'' and dragging the newly-created shortcut to the final, desired place (e.g., your desktop).
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).


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


Line 178: Line 232:
# 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.
# 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.
# <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 ''Settings → Preferences'' dialog; go to the ''Miscellaneous'' tab, and enter the precise path for <tt>MagneticField.exe</tt> in the appropriate field (cf. step 1). Finally, click on ''Save settings'' and you should be done.
# 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 ''Help → About'' 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 ''ffgo.exe'' as opposed to ''ffgo-noconsole.exe'') 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).
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).


'''If for some reason you can't run <tt>pip</tt>:'''
<strong>If for some reason you can't run <tt>pip</tt>:</strong>
# Write down exactly what you did, copy the error messages, take screenshots to make sure you won't miss anything, and report your problem in [http://forum.flightgear.org/viewtopic.php?f=18&t=27054 FFGo's thread on the FlightGear forum].
# Write down exactly what you did, copy the error messages, take screenshots to make sure you won't miss anything, and report your problem in [http://forum.flightgear.org/viewtopic.php?f=18&t=27054 FFGo's thread on the FlightGear forum].
# If you feel adventurous and want to solve the problem all by yourself, a user reported success using the get-pip.py script as explained on [https://pip.pypa.io/ the pip home page].  Personally, I would first try running something like <code>py -3 -m ensurepip</code> from a Command Prompt, but both methods should work to install <tt>pip</tt> into a Python installation where it is missing (<code>py -3</code> invokes the [https://docs.python.org/3/using/windows.html#launcher Python Launcher for Windows] to automatically find the latest Python 3.x installation present on your system; you can use <code>py -3.5</code> to invoke Python 3.5, etc.).
# If you feel adventurous and want to solve the problem all by yourself, a user reported success using the get-pip.py script as explained on [https://pip.pypa.io/ the pip home page].  Personally, I would first try running something like <code>py -3 -m ensurepip</code> from a Command Prompt, but both methods should work to install <tt>pip</tt> into a Python installation where it is missing (<code>py -3</code> invokes the [https://docs.python.org/3/using/windows.html#launcher Python Launcher for Windows] to automatically find the latest Python 3.x installation present on your system; you can use <code>py -3.5</code> to invoke Python 3.5, etc.).
377

edits