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

First pass at improving *nix userdir handling #107

Closed
wants to merge 2 commits into from
Closed

First pass at improving *nix userdir handling #107

wants to merge 2 commits into from

Conversation

erysdren
Copy link
Contributor

If it's built using SDL2, it will use the built-in functions SDL_GetBasePath() and SDL_GetPrefPath(). Otherwise it will prefer ~/.local/share/games/quake/ or /usr/local/share/games/quake/for game data and ~/.local/share/quakespasm/ for configuration files.

I've also reworked the desktop file and installation process in the makefile, as well as updated the Haiku code for userdirs.

quakespasm.svg attribution:

Sasha Shor, Public domain, via Wikimedia Commons

/* note - we're specifically not using XDG_CONFIG_HOME here so we can match
* the behaviour of SDL_GetPrefPath()
*/
const char *env = getenv("XDG_DATA_HOME");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that XDG paths are being employed, one less dot file/folder in $HOME. But should there be a fallback to $HOME/.quakespasm so as to not break current installations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it could check if there's an existing $HOME/.quakespasm folder and use that if so?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds reasonable

@erysdren erysdren closed this by deleting the head repository Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants