-
Notifications
You must be signed in to change notification settings - Fork 252
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
honor the $XDG_CACHE_HOME env variable #625
base: main
Are you sure you want to change the base?
Conversation
I don't think that using environment variables is good idea. XDG specifications are Linux specific, and not all desktop environments are fully support them. Better to use known and controllable locations like path from |
On unix systems
That's why I fall back to It's a shame that SDL doesn't provide a wrapper around I don't think using |
Fallback to Don't forget also that Descent3 can be launched in dedicated mode without using desktop environment and where access to environment variables can be limited. |
bottom line: there is indeed an ideological resistance against XDG support in this project; it should be reflected by closing #373 XDG support is a platform specific feature, but you ask for it to be platform-independent ¯_(ツ)_/¯ |
Hi @twolife , thanks for opening this pull request! To provide more context, a lot of work has been put lately, especially by @winterheart , into making all target OS code even and unified. Descent 3 used to have a lot of quick-and-dirty tricks to make the game work on Linux and Mac, so we tend to be a little conservative when it comes to adding platform-specific code. That explains some of the push-back you could get here and on #373 when it comes to conforming to XDG specifications. Moving most of the I/O and system code to SDL2 helped greatly to build a robust cross-platform game, but it still falls short of implementing XDG support. 4 different people in #373 have expressed support for this feature, I think it is reasonable to consider implementing it and assist future Linux package managers. We try to be open to community suggestions and patches. However, as explained earlier, the current implementation is not correct, as only Linux should implement this logic. Moving the cache directory search to a dedicated and documented function aware of the target OS could be a better way to to it. |
See also #628 |
Pull Request Type
Description
First step toward the use XDG directories on Linux
Related Issues
This is related to #373 , but it doesn’t fully fix that issue.
Checklist
Additional Comments
I will try to handle the others XDG directories in another pull request, if you confirm that there is no ideological resistance against the concept. (that is still not clear to me when re-reading #373)