Board index FlightGear Support Tools FGRun

FGRUN, Launcers, and writing a new Launcher

FGRun is a graphical frontend to run FlightGear.

FGRUN, Launcers, and writing a new Launcher

Postby openflight » Thu Jul 23, 2020 9:03 am

Hi

I did not see any other topic to put this under, but this is an attempt to write a new GUI launcher (text versions already done) and /or seek advice. A faster, one page launcher that will work on all versions flawlessly and will obtain the correct list of airports.

The FGRUN launcher for Flight Gear 2018 does not work properly. Flight Gear works - I installed 2018 for Linux (Mint 19.3) on a Celeron no less, and it works! If you do not have too much of the trees and stuff running, it works. I have flown the CH701 and the Cessna 172 and its all very nice. Frame rates are good enough to fly.

The Launcher for Flight Gear 2018, FGRUN, does not show any other aircraft or places to fly from. I had to resort to writing my own shell script I call FGTLX and it actually works, but I have to enter all the options into the program itself, which is not too much trouble considering the alternative.

As you know, I have written my own launcher, FGWALK, which is very limited, and under development. It is written in Python, however.

FGWALK - Written in Python, and requires user to install Python. Python > exe programs have not worked for me yet.
FGWALK - Earlier version written in GAMBAS - GAMBAS is no longer installable on my Linux OS.
FGTL - Works fine on Wine (for the win32 fgfs.exe) but is limited and not very nice. The Beta version is listed at the bottom of the page.
FGTLX - Shell script for Linux as above.
FGWALK - C++ attempt - I have had the worst time trying to get DEVC++ WxDevC++, Visual Studio 2019 (on WIn 7) to work, VS does not generate an .exe . I know. C#?
FGWALK using GLADE and C++ may be the way out for Linux, just getting into it, however.

So any other programmers have half lost their minds trying to program desktop apps for Windows (VB and VSCRIPT and Java was easier, also JSP) ?

What are my options?

Do I purchase an old copy of VB6? Do I try C# .NET (VS took about an hour to download and requires many Gigabytes of stuff)

Now what about the other launchers? As far as I know their sites are down and the never worked on my computer. No Offense.

Should this topic be moved to something else?


Code: Select all
:MENU
ECHO OFF
ECHO.
ECHO ...............................................
ECHO PRESS 1, 2 OR 3 to select your task, or 4 to EXIT.
ECHO ...............................................
ECHO.
ECHO 1 - Cessna 172P N 1234 KLAX New SCenery, Autocoordination
ECHO 2 - UFO Object Placement Tool from Parking Area
ECHO 3 - Piper PA-28 from parking area, Autocoordination
ECHO 4 - EXIT
ECHO.

CD \
C:
cd Program Files
Cd FlightGear
Cd bin
cd win32


SET /P M=bla bla bla bla
IF %M%==1 GOTO c172pN1234
IF %M%==2 GOTO UFO
IF %M%==3 GOTO PA28-161
IF %M%==4 GOTO EOF

:c172pN1234
fgfs.exe --aircraft=c172pN1234 --airport=KLAX --fg-root="c:\Program Files\FlightGear\data" --fg-scenery="c:\Program Files\FlightGear\data\Scenery;c:\Program Files\FlightGear\Scenery;c:\Program Files\FlightGear\data\WorldScenery" --enable-auto-coordination  --timeofday=noon
pause
GOTO MENU

:UFO
fgfs.exe --aircraft=ufo --lon=-122.495823 --lat=37.513869 --fg-root="c:\Program Files\FlightGear\data" --fg-scenery="c:\Program Files\FlightGear\data\Scenery;c:\Program Files\FlightGear\Scenery" --enable-auto-coordination  --timeofday=noon
pause
GOTO MENU

:PA28-161
fgfs.exe --aircraft=pa28-161 --lon=-122.495823 --lat=37.513869 --fg-root="c:\Program Files\FlightGear\data" --fg-scenery="c:\Program Files\FlightGear\data\Scenery;c:\Program Files\FlightGear\Scenery" --enable-auto-coordination  --timeofday=noon
pause
GOTO MENU


pause



openflight
 
Posts: 480
Joined: Fri Sep 16, 2011 11:14 am
Version: 1 2 2018
OS: Linux Mint 19.3

Re: FGRUN, Launcers, and writing a new Launcher

Postby legoboyvdlp » Thu Jul 23, 2020 10:09 am

The Launcher for Flight Gear 2018, FGRUN, does not show any other aircraft or places to fly from.


...?

FGRun is not included with flightgear 2018. It stopped with 2016.

Why run through all these hoops when there's a perfectly good launcher?

Image
User avatar
legoboyvdlp
 
Posts: 7674
Joined: Sat Jul 26, 2014 1:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: FGRUN, Launcers, and writing a new Launcher

Postby openflight » Fri Jul 24, 2020 1:19 am

I meant the Flight Gear QT Launcher.

http://wiki.flightgear.org/FlightGear_Qt_launcher

It does not work properly. What are my options then?

Some backgound reading....
Background

In addition, this was also motivated by the plethora of 3rd party GUI launchers/frontends developed by numerous contributors over the years [5].

As for why the change, because the old one was Windows-only - the Qt5 thing works for Mac and Linux as well and allows to do things OS-independently, which is really conceptually superior as we don't need to deal with dedicated Win, Mac and Linux issues.[6]
Last edited by Johan G on Fri Jul 24, 2020 1:03 pm, edited 1 time in total.
Reason: Please do not quote the entire post that is right above your post.
openflight
 
Posts: 480
Joined: Fri Sep 16, 2011 11:14 am
Version: 1 2 2018
OS: Linux Mint 19.3

Re: FGRUN, Launcers, and writing a new Launcher

Postby wlbragg » Fri Jul 24, 2020 3:08 am

I meant the Flight Gear QT Launcher.

That is the launcher legoboyvdlp is talking about. It is not broken and works well. It is the default launcher and built in. Why do you think it is broken?
It really would be a waist of time and resources to make yet another launcher. I think if it is indeed "broken" for you, which I seriously doubt it is actually broken, maybe not configured correctly instead, it would be far better to figure out what is wrong and fix that than a new launcher.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5597
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: FGRUN, Launcers, and writing a new Launcher

Postby Hooray » Fri Jul 24, 2020 2:36 pm

Speaking in general, the Qt5 launcher is optional and should "just work" (that is, if FlightGear is configured/built with Qt5 support) - it's being actively developed and maintained by the leading FlightGear core developer, and it's unlikely that any other launcher can be brought up to par with it in any reasonable amount of time.

That being said, Qt5 is obviously a rather hefty dependency for a optional feature - but fgrun should also "just work", since all it's doing is assembling a command line to start fgfs with.

And as a matter of fact, regardless if their development/maintenance status, that applies to any other fgfs launcher/frontends, too.

So I do agree, it would be kinda pointless to create yet another GUI front-end - just take/use/customize and configure any of the existing ones.

http://wiki.flightgear.org/Suggested_software#Frontends
http://wiki.flightgear.org/FlightGear_Sessions

EDIT: Thinking about it more seriously, an additional external launcher implemented from scratch using the command line, would be best built by using/processing just $FG_ROOT, i.e. options.xml and the translations - that way, it would be very little work to support all documented startup options, at the mere cost of augmenting the underlying XML data. But an internal launcher would be best built using Nasal and the Canvas system: http://wiki.flightgear.org/Aircraft_Center

Image

If you are set on using Python, see:

http://wiki.flightgear.org/FFGo
http://wiki.flightgear.org/FGo!

These could be adapted and made to work using bugman's Python groundwork here:

http://wiki.flightgear.org/FGPythonSys
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11836
Joined: Tue Mar 25, 2008 8:40 am

Re: FGRUN, Launchers, and writing a new Launcher

Postby openflight » Sat Jul 25, 2020 2:07 pm

Fgo:

Downloaded and tried to install:

Code: Select all
Python 3.6.8 (default, Oct  7 2019, 12:59:55)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license()" for more information.
>>>
================ RESTART: /home/starlight7/Downloads/fgo/fgo ================
Traceback (most recent call last):
  File "/home/starlight7/Downloads/fgo/fgo", line 10, in <module>
    from src import run
  File "/home/starlight7/Downloads/fgo/src/__init__.py", line 68
    print _(CLI_MESSAGE)
          ^
SyntaxError: invalid syntax
>>>


FGGo
Code: Select all
ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys, setuptoo


With the FG QT based launcher - it works fine, but aircraft do not show: access rights problems?
openflight
 
Posts: 480
Joined: Fri Sep 16, 2011 11:14 am
Version: 1 2 2018
OS: Linux Mint 19.3

Re: FGRUN, Launchers, and writing a new Launcher

Postby openflight » Sat Jul 25, 2020 2:34 pm

Maybe there are access rights problems, but the old FGRUN worked fine, except for path settings, which can be easily fixed if you know what you are doing.

Speaking in general, the Qt5 launcher is optional and should "just work"


Well it does not. Was it tested with Linux?

it's unlikely that any other launcher can be brought up to par with it in any reasonable amount of time.


I agree with this one: however, I could very well use a one page launcher which simply stores a list of launch strings and maybe a list of recently used ones.

So I do agree, it would be kinda pointless to create yet another GUI front-end - just take/use/customize and configure any of the existing ones.


The existing ones that are written in Python run into hundreds of lines of code, and debugging that is not what I want to do. Also, special options like a stored latitude and longitude starting location (realism demands we start in the parking lot) , are not available in the other launchers.

I am looking at the following programming environments: Visual Studio with C#, C# and Mono Develop, C# and Sharp Develop, Python, and maybe this thing called Electron which is fascinating because I used to be an VBScript developer once.

The thing should just work like a portable .exe like the ones in Windows 3.1. Just type in FS5 (Microsoft Flight Simulator 5 from 1992) and start.

A requirements spec would be nice at this point...

EDIT: Thinking about it more seriously, an additional external launcher implemented from scratch using the command line, would be best built by using/processing just $FG_ROOT, i.e. options.xml and the translation.


I had a look at options.xml, not sure what it means but it will be in the documentation. The bigger question is how to obtain a list of airports in the installed scenery only, even FGRUN shows airports from all over, ariports that are outside the installed scenery.
Last edited by openflight on Sun Jul 26, 2020 12:32 am, edited 2 times in total.
openflight
 
Posts: 480
Joined: Fri Sep 16, 2011 11:14 am
Version: 1 2 2018
OS: Linux Mint 19.3

Re: FGRUN, Launcers, and writing a new Launcher

Postby wkitty42 » Sat Jul 25, 2020 2:38 pm

openflight wrote in Sat Jul 25, 2020 2:34 pm:Speaking in general, the Qt5 launcher is optional and should "just work"

Well it does not. Was it tested with Linux?

of course it was... not only by myself as soon as it was introduced but also by others...

if your craft are not showing up, it is because you have not pointed to the proper directory for the Qt launcher to find and enumerate the craft directories within it... i thought we covered this already in another topic?? i know i showed you some sample directory trees and specifically pointed to which directories the launcher should be pointed to... you responded to that post of mine, too...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 6494
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: FGRUN, Launcers, and writing a new Launcher

Postby Hooray » Sat Jul 25, 2020 2:58 pm

I still think that implementing _any_ launcher from scratch would be highly redundant, unless it comes with benefits that no other launcher provides (such as not requiring any new/external depdencies or one that is actually running inside the fgfs main loop like the original Canvas based aircraft center).

If I were to do this, I would merely use a function to parse options.xml and the translation to populate a wizard with a handful of pages, so that the launcher is automatically updated whenever options.xml is updated - organizing "options" into categories (pages) would then be as simple as using an additional PropertyList XML file to encode the dependencies between startup settings (some of which are incompatible/mutually exclusive, while others may only make sense in conjunction with certain options).

Regarding your final question about retrieving only a subset of navdb results based on available scenery, you would have to filter the results accordingly, i.e. first of all by determining which tiles are available, which then gives you the regions of interest - you can then run a conventional navdb query and/or query the underlying SQLite database directly.

But again, creating a new launcher from scratch is highly redundant, it would make so much more sense to get involved in one of the existing launchers, or preferably reach out to the developers mailing list to troubleshoot your exact problem, and while you're there make any remaining feature requests you might still have.

All that being said, the original aircraft center is merely using Nasal + Canvas, and would be up to the job of running a simple options.xml based launcher directly inside the main loop itself, but that would only make sense if fgfs itself is fixed up WRT to its "reset/reinit" shortcomings.

For an entirely new launcher to make _any_ sense at all, it would have to provide advantages that no other launcher provides/can provide - such as having support for some of the more esoteric features (HLA/RTI, multi-screen/multi-gpu, clustered multi-instance setups, running a multiplayer server locally etc). Other than that, I simply cannot see any use-case at all.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11836
Joined: Tue Mar 25, 2008 8:40 am

Re: FGRUN, Launcers, and writing a new Launcher

Postby wlbragg » Sat Jul 25, 2020 4:04 pm

@openflight, chances are the problem is what wkitty42 said or you don't have all the dependencies installed, but the later usually gets you a blank screen, as in no functionality at all.
If you post the log from the Linux build process and the FGFS log we it may help expose the issue.
I think you will fine in the long run that getting the built in launcher to function properly is less work than making a new launcher.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5597
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: FGRUN, Launcers, and writing a new Launcher

Postby openflight » Sun Jul 26, 2020 12:53 am

I installed Flight Gear from the Software Manager in Linux Mint 19.3. The FGQT5 Launcher came with it. If I could download the source and compile it maybe I can get better results.

Here is another one: https://sourceforge.net/projects/fglc/. Written in GAMBAS and GAMBAS will not install on my Mint 19.3 computer any more for some reason.

No one mentioned "Phi" http://wiki.flightgear.org/Phi

I guess I will head on over to my original FGWALK topic and list the requirements. Maybe the text based launcher can be used as a sort of emergency launcher in case FGQT5 does not work or is not configured correctly. I have certainly found it useful. To be fair, however, all the launchers developed so far have far more features than I ever developed.

UPDATE: fgo works out of the box - I just had to open fgo from pythonw (remember I am running in WINE) , and the blank selection boxes show that I have not set the paths correctly, in fact it says so when I try to run it. Added paths and it says "cannot find apt database". Didn't know there was one. It starts Flight Gear with the default c172 at KSFO. So it works.. Maybe I could do something with this.
openflight
 
Posts: 480
Joined: Fri Sep 16, 2011 11:14 am
Version: 1 2 2018
OS: Linux Mint 19.3

Re: FGRUN, Launcers, and writing a new Launcher

Postby wkitty42 » Sun Jul 26, 2020 1:52 am

apt database is the apt.dat.gz file in your FGData Airports directory where ever that installer placed it...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 6494
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: FGRUN, Launcers, and writing a new Launcher

Postby wlbragg » Sun Jul 26, 2020 3:56 am

I am still unclear as to exactly what isn't working in the QT launcher?
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5597
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: FGRUN, Launcers, and writing a new Launcher

Postby openflight » Sun Jul 26, 2020 4:34 am

wkitty42 wrote in Sun Jul 26, 2020 1:52 am:apt database is the apt.dat.gz file in your FGData Airports directory where ever that installer placed it...


Thanks will have a look. That solves it: I note that fgo checks for airports in current scenery so I can look at that code.
openflight
 
Posts: 480
Joined: Fri Sep 16, 2011 11:14 am
Version: 1 2 2018
OS: Linux Mint 19.3

Re: FGRUN, Launcers, and writing a new Launcher

Postby openflight » Sun Jul 26, 2020 4:41 am

wlbragg wrote in Sun Jul 26, 2020 3:56 am:I am still unclear as to exactly what isn't working in the QT launcher?


I feel it has to do with the path settings, I will figure it out I guess, but I should not have to:

Unfortunately I encountered problems in my own launcher, FGWALK, downloaded from SourceForge. I encountered these two errors:

Code: Select all
# Diagnostics 
    lb.curselection()
    print(lb.curselection())


The brackets were missing from the print statement! I cannot believe I uploaded it like this, so it must have got dropped by the archiver?
YUP, original code had it, checked Source Forge.

Code: Select all
from tkinter import *


I had to change the Tkinter word to tkinter (lower case t).

Even my own program does not run without some changes. The solution is to use C# and create and .exe or maybe nodeJS...
openflight
 
Posts: 480
Joined: Fri Sep 16, 2011 11:14 am
Version: 1 2 2018
OS: Linux Mint 19.3

Next

Return to FGRun

Who is online

Users browsing this forum: No registered users and 1 guest