Right now a new folder for configurations and userdata is created in $HOME/.megaglest.
To be more flexible it would be nice to implement the XDG Base Directory Specification.
$XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used.
$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.
$XDG_CACHE_HOME defines the base directory relative to which user specific non-essential data files should be stored. If $XDG_CACHE_HOME is either not set or empty, a default equal to $HOME/.cache should be used.
An easy explanation can be found in the gnome wiki.
This would result in the following folders:
$XDG_CONFIG_HOME/megaglest/<GLESTUSER.INI|GLESTUSERKEYS.INI> defaulting to $HOME/.config/megaglest/<GLESTUSER.INI|GLESTUSERKEYS.INI> when $XDG_CONFIG_HOME is not set or empty.
$XDG_DATA_HOME/megaglest/<MAPS|SAVED|SCENARIOS|SCREENS|TECHS|TILESETS|TUTORIALS|DEBUGWORLD.LOG|GLEST.LOG> defaulting to $HOME/.local/share/megaglest/<MAPS|SAVED|SCENARIOS|SCREENS|TECHS|TILESETS|TUTORIALS|DEBUGWORLD.LOG|GLEST.LOG> when $XDG_DATA_HOME is not set or empty.
$XDG_CACHE_HOME/megaglest/<CACHE|TEMP> defaulting to $HOME/.cache/megaglest/<CACHE|TEMP> when $XDG_CACHE_HOME is not set or empty.
Advantages are:
No predefined paths. The user can decide where his or her data is located.
No cluttered home directory. Some selectors will automatically show dotfiles, finding the files you want will be easier.
A shared storage location for data. Application data does not have to be searched for, as these are no longer located in different places. This also benefits a backup.
Resetting the settings and keeping the application data at the same time becomes easier, as there is a clear separation.
Right now a new folder for configurations and userdata is created in
$HOME/.megaglest
. To be more flexible it would be nice to implement the XDG Base Directory Specification.An easy explanation can be found in the gnome wiki.
This would result in the following folders:
$XDG_CONFIG_HOME/megaglest/<GLESTUSER.INI|GLESTUSERKEYS.INI>
defaulting to$HOME/.config/megaglest/<GLESTUSER.INI|GLESTUSERKEYS.INI>
when$XDG_CONFIG_HOME
is not set or empty.$XDG_DATA_HOME/megaglest/<MAPS|SAVED|SCENARIOS|SCREENS|TECHS|TILESETS|TUTORIALS|DEBUGWORLD.LOG|GLEST.LOG>
defaulting to$HOME/.local/share/megaglest/<MAPS|SAVED|SCENARIOS|SCREENS|TECHS|TILESETS|TUTORIALS|DEBUGWORLD.LOG|GLEST.LOG>
when$XDG_DATA_HOME
is not set or empty.$XDG_CACHE_HOME/megaglest/<CACHE|TEMP>
defaulting to$HOME/.cache/megaglest/<CACHE|TEMP>
when$XDG_CACHE_HOME
is not set or empty.Advantages are: