Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use XDG base directories by default under Linux #1942

Open
superuser-does opened this issue Dec 16, 2023 · 0 comments · May be fixed by #1954
Open

Use XDG base directories by default under Linux #1942

superuser-does opened this issue Dec 16, 2023 · 0 comments · May be fixed by #1954

Comments

@superuser-does
Copy link

superuser-does commented Dec 16, 2023

It would be nice if was to follow the XDG Base Directory Specification. It is intended for graphical/desktop software, which includes games.

Benefits for players

  • They will have one less hidden directory in their $HOME folder.
  • Backup solutions for configuration and data can automatically find files, without the player specifically having to add ~/.ja2 within their backup configuration.
  • It is preferred for distribution-independent packaging methods (e.g. see Flatpak documentation).
    However, I cannot say how exactly this is used.

Implementation

The logic used by Cmus* is an effective model to follow. Please note that this program had a specific variable for its directory location
At first instance, ~/.ja2 should be used if it already exists, to enable backward compatibility. However, new players should have XDG folders as their default.

To follow the specification closely and in line with other games which implement it, Stracciatella should:

  • Store configuration in XDG_CONFIG_HOME or $HOME/.local/share if unset
  • Store saves and mods in XDG_DATA_HOME or $HOME/.config if unset

It is also a chance to go further if people want, and change the default folder name from .ja2 to Jagged Alliance 2, which is more commonly accepted under Linux at this point.

History

I am filing this enhancement following #1864 being implemented on Windows. A desire to follow this specification was also mentioned as early as 2016 in #164 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants