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

Adhere to XDG Base Directory Specification #754

Closed
Mailaender opened this issue Dec 27, 2022 · 4 comments
Closed

Adhere to XDG Base Directory Specification #754

Mailaender opened this issue Dec 27, 2022 · 4 comments
Labels

Comments

@Mailaender
Copy link
Contributor

The hardcoded

set(CDOGS_CFG_DIR ".config/cdogs-sdl/")

breaks flathub/io.github.cxong.cdogs-sdl#1.

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

@cxong
Copy link
Owner

cxong commented Feb 6, 2023

What's the tl;dr of this? XDG_CONFIG_HOME defaults to .config so why doesn't this work? Does the spec say the config files (this game uses 3 or 4 different files) should all be in .config and not a subfolder?

@Mailaender
Copy link
Contributor Author

Don't hardcode at build time. Use the environment variable at runtime. Even though in the default configuration, the result is the same. This is useful in this case for backwards compatibility.

@cxong cxong added the bug label Feb 11, 2023
@cxong cxong moved this to To do in C-Dogs SDL next release Feb 11, 2023
@cxong cxong moved this from To do to In progress in C-Dogs SDL next release Feb 13, 2023
@cxong
Copy link
Owner

cxong commented Feb 13, 2023

Pushed a PR but I don't have a linux to test it, can you help verify that this resolves the issue?

@Mailaender
Copy link
Contributor Author

I still get

ERROR [MAIN ] [player_template.c:110] PlayerTemplatesLoad(): loading player templates 'players.cnf'

but saving settings works.

@cxong cxong closed this as completed in 3adfb30 Feb 13, 2023
@github-project-automation github-project-automation bot moved this from In progress to Done in C-Dogs SDL next release Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

2 participants