On Sunday, 12 December 2004 23:32, Curtis L. Olson wrote:
> IMO this should be discussed very carefully before proceeding.  What
> data do we want to write out?

- Personally I want to store some very specific menu info (not the state of 
the menus)
- Melchior pointed out that we may want nasal to be able to write files too 
(aircraft could store unique switch settings, hobbs meter readings, battery 
levels, etc)
- Screenshots should be stored there too
- Menu states/settings/options can be stored there
- The state of FG when last run can be stored there so when you start up 
without specifying an airport and aircraft the aircraft will be on the apron 
or grass where you left it and not be dumped onto an active runway.

>  What section of the code will do the
> writing.

Various sections of code will need to write data to .flightgear
Would you prefer to have a single piece of code doing the reading and writing?
If so that could make things rather complex and it would have to be thread 
safe too.

> I'm not opposed to using a ~/.fgfs/ directory.  Perhaps we should have a
> ~/.fgfs/settings.xml file instead of a ~/.fgfsrc, if we wanted to make
> this writable, then perhaps the first time FG is run, it would create
> this directory and copy in a default template file.  We would also want
> to have a "restore defaults" option available.  But to really do this,
> we would probably want a more consistent/coherent way to set options
> within FG ... perhaps we could start to move some fgrun functionality
> (the part the sets various options inside FG.)  We should probably look
> at sorting/grouping the options a bit more and pehaps explaining them a
> bit more.  This would be a very large gui task ... but certainly would
> be nice to have.
>
> Curt.

I'll leave the storing of GUI options for later but they certainly would 
belong in .flightgear/ as each user should be able to have their own settings.

What I'm trying to do at the moment is create a fg-home variable that is 
accessable throughout FG just like fg-root.

Here is the order of the search of FGInitFGHome : (almost the same as fg-root)
1. Look for --fg-home in command line options
2. Look for --fg-home in HOME/.fgfsrc.hostname file  (is this neccessary?)
3. Look for --fg-home in HOME/.fgfsrc file
4. Check if fg-home is set as env variable FG_HOME
5. Check if HOME is set as an env variable and use HOME/.flightgear
6. Otherwise use ./.flightgear as fg-home

If no .flightgear directory exists it will be created automatically.

Paul

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to