Board index FlightGear Development

Announcing FFGo: a new FlightGear launcher

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

Re: Announcing FFGo: a new FlightGear launcher

Postby rominet » Sat Jan 16, 2016 9:49 pm

Because the broken --parkpos option in FlightGear 2016.1.0 (current version in Git next) doesn't seem easy to fix (at least to me :?), I have added a workaround in FFGo, currently only in the Git repository. In the Preferences dialog, Miscellaneaous tab, there is now a checkbox saying “Fake the --parkpos option”. If you enable this, then instead of passing for instance --parkpos=A10 to 'fgfs', FFGo will pass the --lat=..., --lon=... and --heading=... options corresponding to the parking position.

Note: after changing the option in the Preferences dialog, you have to open the parking popup once and select an item (a startup location or “None”) for the change to be effective. in other words, an already selected startup location keeps using the same mechanism (--parkpos or --lat/--lon/--heading) until an explicit choice---which may be the same---is made via the parking popup.

Hoping this will help a few in these hard times... :wink:

Edit: added the “Note:” paragraph.
rominet
 
Posts: 557
Joined: Sat Nov 01, 2014 1:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: Announcing FFGo: a new FlightGear launcher

Postby chris_blues » Sun Jan 17, 2016 8:16 am

rominet wrote in Sat Jan 16, 2016 9:49 pm:Hoping this will help a few in these hard times... :wink:

Indeed! Thanks a lot! :)
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian testing 64bit - Athlon II 2x2.6GHz - 8GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1532
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian 8 64

Re: Announcing FFGo: a new FlightGear launcher

Postby rominet » Tue Jan 19, 2016 11:12 am

Glad you like it, Chris. I have added a new dialog called GPS Tool under the Tools menu. It is similar in some ways to the Airport Finder, but better suited when you already know the two airports for which you want to compute the distance and bearings (plus flight duration for a given ground speed and vice versa). It is also very convenient to do these calculations for several pairs of airports, thanks to the airport chooser (reused again). Plus a few other improvements of lesser importance. I think all this is about ready for release. Would you be so kind to update your translation? Thanks in advance. :wink:
rominet
 
Posts: 557
Joined: Sat Nov 01, 2014 1:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: Announcing FFGo: a new FlightGear launcher

Postby kjd.nc » Tue Jan 19, 2016 11:42 pm

Rominet, is FFGo coming to MacOS, by chance? I don't see it in Contents/MacOS/.

EDIT: Oops, just noticed that got linked straight to page six of the thread... Now I see that this is not part of the FG distribution. I'll go check the earlier parts of the thread for what I've missed. Sorry for having overlooked that.
kjd.nc
 
Posts: 72
Joined: Sat Nov 07, 2015 3:45 pm
Location: NC, USA
Version: 3.4
OS: MacOS 10.11.1

Re: Announcing FFGo: a new FlightGear launcher

Postby rominet » Wed Jan 20, 2016 2:31 pm

Right, FFGo works with FlightGear but is not part of FlightGear. It should work on Windows and OS X, but I am lacking feedback from users of these OSes. Try it, tell me if it works, tell me precisely what doesn't work if it is the case and I'll do my best to fix it.

I have uploaded FFGo 1.9.0rc1 (release candidate). Unless problems are discovered, it should be identical to the future 1.9.0 release, apart from the German translation which I don't have yet. If you want to install or upgrade to this version, the procedure is the same as for a formally stable release, except that you have to pass --pre to the 'pip install' command (by default, pip only installs stable releases), like this:
Code: Select all
pip install --pre ffgo
(for a new install)
or
Code: Select all
pip install --upgrade --pre ffgo
(to upgrade from a previous version)

Of course, depending on your Python and pip setup, the start of each of these commands may be different, such as:
Code: Select all
/path/to/python/executable -m pip install --pre ffgo
or
Code: Select all
py -3 -m pip install --pre ffgo
(this last one is for Windows, and I don't think I have ever tested it, but it should work).
rominet
 
Posts: 557
Joined: Sat Nov 01, 2014 1:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: Announcing FFGo: a new FlightGear launcher

Postby legoboyvdlp » Wed Jan 20, 2016 3:03 pm

Using a fresh Python 3.4, 64bit, installed with all options selected,
'ffgo' in the command line gives
Code: Select all
Traceback (most recent call last):
  File "C:\Python34\Scripts\ffgo-script.py", line 9, in <module>
    load_entry_point('FFGo==1.9.0rc1', 'console_scripts', 'ffgo')()
  File "C:\Python34\lib\site-packages\ffgo\main.py", line 181, in main
    res = run(master, params)
  File "C:\Python34\lib\site-packages\ffgo\main.py", line 95, in run
    config = Config(master)
  File "C:\Python34\lib\site-packages\ffgo\config.py", line 146, in __init__
    self.update(ignoreFGVersionError=True, logFGVersion=False)
  File "C:\Python34\lib\site-packages\ffgo\config.py", line 388, in update
    setupTranslationHelper(self)
  File "C:\Python34\lib\site-packages\ffgo\config.py", line 29, in setupTranslat
ionHelper
    translationHelper = misc.TranslationHelper(config)
  File "C:\Python34\lib\site-packages\ffgo\misc.py", line 209, in __init__
    gettext.translation(MESSAGES, LOCALE_DIR).info()['language'])
  File "C:\Python34\lib\gettext.py", line 401, in translation
    raise OSError(ENOENT, 'No translation file found for domain', domain)
FileNotFoundError: [Errno 2] No translation file found for domain: 'FFGo'
.


Here is my install:

Code: Select all
C:\Users\USERNAME\Documents\MY FOLDER\FlightGear Reference Files>pip insta
ll https://people.via.ecp.fr/~flo/projects/FFGo/dist/1.9.0/FFGo-1.9.0rc1.tar.gz
Downloading/unpacking https://people.via.ecp.fr/~flo/projects/FFGo/dist/1.9.0/FF
Go-1.9.0rc1.tar.gz
  Running setup.py (path:C:\Users\Redpath\AppData\Local\Temp\pip-irm39uzn-build\
setup.py) egg_info for package from https://people.via.ecp.fr/~flo/projects/FFGo
/dist/1.9.0/FFGo-1.9.0rc1.tar.gz

    warning: no previously-included files found matching 'docs\README.conditiona
l-config\_static\README.txt'
    no previously-included directories found matching 'docs\README.conditional-c
onfig.source\_build'
    no previously-included directories found matching 'README.Sphinx-build'
    no previously-included directories found matching 'tmp'
    warning: no previously-included files matching '*.pyc' found anywhere in dis
tribution
    warning: no previously-included files matching '__pycache__' found anywhere
in distribution
    warning: no previously-included files matching '.gitignore' found anywhere i
n distribution
    warning: no previously-included files matching '.gitattributes' found anywhe
re in distribution
Downloading/unpacking CondConfigParser (from FFGo==1.9.0rc1)
  Running setup.py (path:C:\Users\\AppData\Local\Temp\pip_build_USERNAME\C
ondConfigParser\setup.py) egg_info for package CondConfigParser

    no previously-included directories found matching 'doc\_build'
    warning: no previously-included files found matching 'doc\basic-pkg-info.rst
'
    warning: no previously-included files matching '*.pyc' found anywhere in dis
tribution
    warning: no previously-included files matching '__pycache__' found anywhere
in distribution
    warning: no previously-included files matching '.gitignore' found anywhere i
n distribution
Installing collected packages: CondConfigParser, FFGo
  Running setup.py install for CondConfigParser

    no previously-included directories found matching 'doc\_build'
    warning: no previously-included files found matching 'doc\basic-pkg-info.rst
'
    warning: no previously-included files matching '*.pyc' found anywhere in dis
tribution
    warning: no previously-included files matching '__pycache__' found anywhere
in distribution
    warning: no previously-included files matching '.gitignore' found anywhere i
n distribution
  Running setup.py install for FFGo

    warning: no previously-included files found matching 'docs\README.conditiona
l-config\_static\README.txt'
    no previously-included directories found matching 'docs\README.conditional-c
onfig.source\_build'
    no previously-included directories found matching 'README.Sphinx-build'
    no previously-included directories found matching 'tmp'
    warning: no previously-included files matching '*.pyc' found anywhere in dis
tribution
    warning: no previously-included files matching '__pycache__' found anywhere
in distribution
    warning: no previously-included files matching '.gitignore' found anywhere i
n distribution
    warning: no previously-included files matching '.gitattributes' found anywhe
re in distribution
    Installing ffgo-script.py script to C:\Python34\Scripts
    Installing ffgo.exe script to C:\Python34\Scripts
Successfully installed CondConfigParser FFGo
Cleaning up...
User avatar
legoboyvdlp
 
Posts: 6699
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: Announcing FFGo: a new FlightGear launcher

Postby rominet » Wed Jan 20, 2016 5:44 pm

Thank you for your report, lego! Your installation looks fine (the warnings in the installation step can't be removed without making the installation less safe with respect to possible future bugs...). But when running FFGo, I control everything more or less and you should not ignore the warnings.

I think the error comes from the fact that your locale (language) either has an unexpected form or simply has no translation yet (*.mo files under C:\Python34\Lib\site-packages\ffgo\data\locale\<language code>\LC_MESSAGES), and this was not gracefully handled in the version you tested. I have uploaded version 1.9.0rc2.dev1 which adds a bunch of debugging statements right before the problem you reported and also attempts to fix it, plus another place in ffgo/gui/mainwindow.py that presumably has the same problem. Could you please test it?

To upgrade to the new version, you should be able to do:
Code: Select all
pip install --upgrade --pre ffgo

or, similarly to what you did:
Code: Select all
pip install --upgrade --pre https://people.via.ecp.fr/~flo/projects/FFGo/dist/1.9.0/FFGo-1.9.0rc2.dev1.tar.gz
(you can use -U as a shorthand for --upgrade)

Thanks!
rominet
 
Posts: 557
Joined: Sat Nov 01, 2014 1:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: Announcing FFGo: a new FlightGear launcher

Postby legoboyvdlp » Wed Jan 20, 2016 6:28 pm

Righto! Will do.
User avatar
legoboyvdlp
 
Posts: 6699
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: Announcing FFGo: a new FlightGear launcher

Postby chris_blues » Wed Jan 20, 2016 6:30 pm

rominet wrote in Wed Jan 20, 2016 2:31 pm:...apart from the German translation which I don't have yet...

I'm on it right now! I'll push it as soon as I'm done!
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian testing 64bit - Athlon II 2x2.6GHz - 8GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1532
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian 8 64

Re: Announcing FFGo: a new FlightGear launcher

Postby legoboyvdlp » Wed Jan 20, 2016 6:51 pm

Feedback: all works, setting up.
I can' close the cmd without closing ffgo, but that's only for me to remember not to close it.
User avatar
legoboyvdlp
 
Posts: 6699
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: Announcing FFGo: a new FlightGear launcher

Postby chris_blues » Wed Jan 20, 2016 6:57 pm

You could set up a launcher. I have no idea how it's actually called on Windows and english, but the last time I used sth like this it was called sth like (roughly translated) "create link". ("Verknüpfung erstellen" in german)
Right-click on ffgo file --> create link. Copy/Cut this link and paste it to your desktop, or whereever you wanna have it

As far as I know, it should work...


(german translation is pushed)
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian testing 64bit - Athlon II 2x2.6GHz - 8GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1532
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian 8 64

Re: Announcing FFGo: a new FlightGear launcher

Postby rominet » Wed Jan 20, 2016 8:16 pm

Excellent, thanks to both of you! Preparing the 1.9.0 release.

@legoboyvdlp:

1) Could you please post the terminal output between "XXX Locale debugging XXX" and "XXX End of locale debugging XXX" so as to remove any doubt as to what was happening on your side (mainly, I'd like to see your locale)? (for this, you need to run FFGo from the terminal as I used print() for the debug statements; they will not be in the FFGo log file)

2) As Chris said, you can probably create a launcher... to start FFGo, the FlightGear launcher. :roll: More seriously, I'm not even sure it would be useful. If you double-click on C:\Python34\Scripts\ffgo.exe, does Windows automatically open a terminal window (“command prompt”, cmd.exe...)? If yes, there may be a way around it (like .pyw vs. .py files), but before researching, I'd rather you tell me what happens in this case.
rominet
 
Posts: 557
Joined: Sat Nov 01, 2014 1:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: Announcing FFGo: a new FlightGear launcher

Postby legoboyvdlp » Wed Jan 20, 2016 8:34 pm

It's working perfectly now.

Yes, it does open the command prompt whenever I hit ffgo.exe. And ffgo closes whenever I exit the cmd.

Here you go!
Code: Select all
XXX Locale debugging XXX
Current locale and encoding: en_GB cp1252
MESSAGES and LOCALE_DIR: 'FFGo' 'C:\\Python34\\lib\\site-packages\\ffgo\\data\\l
ocale'
Contents of LOCALE_DIR:
['de', 'en', 'es', 'fr', 'it', 'ja', 'nl', 'pl']

gettext.find(MESSAGES, LOCALE_DIR): None
gettext.translation(MESSAGES, LOCALE_DIR).info():
not found

XXX End of locale debugging XXX
User avatar
legoboyvdlp
 
Posts: 6699
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: Announcing FFGo: a new FlightGear launcher

Postby legoboyvdlp » Wed Jan 20, 2016 8:37 pm

Actually, it's not the command line which opens when I hit ffgo.exe. It is the console of ffgo.
But the cmd acts as the console whenever I input 'ffgo' into the cmd.
User avatar
legoboyvdlp
 
Posts: 6699
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: Announcing FFGo: a new FlightGear launcher

Postby rominet » Wed Jan 20, 2016 11:45 pm

OK, it looks like a "command prompt window" from cmd.exe, but there are only FFGo messages there and no prompt to enter a command, right? It can be practical to have these messages (FFGo will warn about problems found in apt.dat and in groundnet files for instance), but they are also normally found in the log file (%APPDATA%/FFGo/Logs/FFGo.log on Windows; you may need to quit FFGo to see the file fully written and closed). There seems to be a few ways to start FFGo without the console window if you so wish, I'll tell you more tomorrow.

I have uploaded version 1.9.0. You (legoboyvdlp) don't need to upgrade, but otherwise it is just:
Code: Select all
pip install -U ffgo
(stable version, no need for --pre)
rominet
 
Posts: 557
Joined: Sat Nov 01, 2014 1:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest