A01011010 / vdrift-ogre

Automatically exported from code.google.com/p/vdrift-ogre
0 stars 0 forks source link

User config files #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Configuration files should state the defaults and modifications should be saved 
to user's home directory as a separate file. I.e. the defaults are loaded first 
and then any variable in user config file overrides the default.

On Linux, XDG standard should be used (i.e. location for config files is 
~/.config/stuntrally)

On Windows, C:\Users\USERNAME\AppData\Roaming\stuntrally is probably the way 
right place.

For getting these paths, there is code available in Performous:
https://github.com/tapio/performous/blob/master/game/fs.cc

Original issue reported on code.google.com by tapiovie...@gmail.com on 21 Mar 2011 at 10:50

GoogleCodeExporter commented 9 years ago
There seems to be some related code in vdrift's pathmanager, but it is horribly 
broken. Probably better to way for issue #11 to clean things up a bit.

Original comment by tapiovie...@gmail.com on 21 Mar 2011 at 6:34

GoogleCodeExporter commented 9 years ago
Came to mind, this prevents creating Windows installers and Linux packages as 
user generally does not have permissions to write to the default installation 
directory and a game should definitely not be run as an administrator.

Original comment by tapiovie...@gmail.com on 21 Mar 2011 at 8:13

GoogleCodeExporter commented 9 years ago

Original comment by scrawl...@gmail.com on 21 Mar 2011 at 8:20

GoogleCodeExporter commented 9 years ago
Good progress.

Original comment by tapiovie...@gmail.com on 21 Mar 2011 at 10:19

GoogleCodeExporter commented 9 years ago
As a side effect of addressing issue #11, this is half done: the config is 
saved and subsequently loaded from user's config directory. What remains to be 
done is to load the defaults from game's system wide config dir if the file 
does not exist. This should be fairly easy.

Original comment by tapiovie...@gmail.com on 22 Mar 2011 at 9:04

GoogleCodeExporter commented 9 years ago
Now the default config files are used for creating the user's config file if it 
is missing. Only thing left to do is to make sure it works everywere.

Original comment by tapiovie...@gmail.com on 23 Mar 2011 at 8:45

GoogleCodeExporter commented 9 years ago
Also controls.cfg is handled. No bugs found so far. Closing.

Original comment by tapiovie...@gmail.com on 25 Mar 2011 at 9:26