On 05.02.2013 10:02, Michael T. Pope wrote: > How do we want to manage the XDG (BR#2419) fix? There are compliance > and transition issues to decide. The relevant compliance issues are: > > 1. freedesktop.org want user specific data stored in $XDG_DATA_HOME > (defaults to $HOME/.local/share). > > 2. ...and user specific configuration data stored in $XDG_CONFIG_HOME > (defaults to $HOME/.config). > > 3. $XDG_DATA_DIRS and $XDG_CONFIG_DIRS are colon separated lists of additional > directories to search. > > 4. There is also XDG_CACHE_HOME and XDG_RUNTIME_HOME which might be the place > to put the log file. > > FreeCol does not really distinguish user data from user configs. IMHO > saved games are clearly "user data", options files are more > config-like, mods are unclear. A simple way to deal with issues #1,2 > is to declare all our user data as non-config, preserve our existing > user directory structure, but move it from ~/.freecol to > $XDG_DATA_HOME/FreeCol. >
I'd say there is a small distinction between config files and data. The files written by the program (except logs and savegames) are config, the others are data. That would make game_options.xml, customs.xml and map_generator_options.xml config files. Despite the misleading name, I think XDG_CACHE_HOME would be the right place to save log files. > Implementing #3 does not offer us much functionality IMHO. > XDG_DATA_DIRS is actually set on my machine, but the directories on > the list are all read-only to users so its not that useful for > read/write data like saved games or options files. You could argue it > might be useful for finding mods, but we already know where to find > the system mods. > > I do not have a strong opinion on #4. Doing nothing is an option, but using > one of the magic XDG locations is not hard. > > > WRT transition, I am undecided how intrusive we should be with the > existing user data. Assuming we decide to move some directory or other, > do we have FreeCol actually do the move, or create the new directory > and start using it, or only use the new directory if it already exists, > or something else? > I'd argue for creating and using the directories and telling the users about the change. It might be a good idea to have a popup panel that informs users of changes like these when starting the game. This might be combined with something like a "tip of the day" panel. "Did you know you can rename a unit by doing x, y and z?" > > Other issue: Mac OS may be a unix somewhere underneath, but there is > no pretence that Apple are interested in freedesktop.org standards so > this is a non-issue there. What is an issue on Mac OS (BR#2393) is > that we use ~/.freecol when it probably should be ~/Library/FreeCol (to be > clarified). > > Cheers, > Mike Pope > A short look at stackoverflow indicates that config files should be stored in /Users/username/Library/Preferences. I haven't been able to find any definitive standard, but since we are talking about Apple here, there must be some document that mandates what is to be done in excruciatingly minute detail. On the other hand, it may be that you have to sign an NDA with your first-born's blood before you are allowed to read it. Regards Michael ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers