Hi,
RE: --aircraft=ufo in system.fgfsrc is ignored *AND* Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Main fg_init.cxx, 1.115, 1.116
Well, it is 'not' ignored, exactly ... it is picked up in the full scan of the 'command' options, later ... but that is 'too late' ... the default c172 panel has been loaded ... and the fact that ufo has no panel does not 'remove' the 'default' panel ...
Yep, you got it now ... my 'just before' meant before the if( !aircraft.empty() ) else block, not exactly 1 line before the line fgSetString("/sim/aircraft" ... ;=(( I did say line 343 in my post ...
The 'purpose' of fgInitFGAircrat() is to establish the 'Aircraft', first from 'command line' , but if none, then from other places ... so in pseudo like code, it cascades -
1. set aircraft = fgScanForOption( on command line, argc, argv ); 2. #if unix or cygwin, if empty, check for .fgfsrc.hostname file 3. if empty, try "HOME" ".fgfsrc" }; 4. if still empty - add my patch - check for $fg_root/system.fgfsrc ); ending with, as it does at present, unchanged - if NOT ( aircraft.empty() ) add it fgSetString("/sim/aircraft",... else complain/explain "No user specified aircraft, using default" ;
Sorry I did not make it clear ... I do not have the 'diff' utility, but here is my 'diff' application output -
// Compare [C:\FGCVS\FlightGear\source\src\Main\fg_init.cxx] // Size: 64,642 02/01/05 00:10 // With [C:\FG099\FlightGear\source\src\Main\fg_init.cxx] // Size: 65,023 26/01/05 05:53 // Time: Left is EARLIER - CHECK! ===================================================== 344 !> if ( aircraft.empty() ) { 345 !> // Check for $fg_root/system.fgfsrc 346 !> SGPath sysconf( globals->get_fg_root() ); 347 !> sysconf.append( "system.fgfsrc" ); 348 !> aircraft = fgScanForOption( "--aircraft=", sysconf.str() ); 349 !> } 350 !> ===================================================== The '!>' denotes 'added' lines, like a plus, +, in diff
Those who 'regularly' use system.fgfsrc, like I do, to control each run of FG, and use 'panel-less' aircraft, like ufo, have probably been 'adding' this patch to fg_init for 'years' ;=)) Just trying to 'regularise' and share it ...
It crops up every now and then, with a query like - how can I remove the panel? ...
Hope this helps ...
Regards,
Geoff.
_________________________________________________________________
SEEK: Now with over 60,000 dream jobs! Click here: http://ninemsn.seek.com.au?hotmail
_______________________________________________ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d