MegaGlest / megaglest-source

MegaGlest real-time strategy game engine (cross-platform, 3-d)
http://megaglest.org/
348 stars 89 forks source link

Follow XDG basedir specification #175

Open Lucki opened 6 years ago

Lucki commented 6 years ago

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:

Advantages are: