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

XDG Base Directory support #90

Open
ghost opened this issue Jun 10, 2021 · 5 comments
Open

XDG Base Directory support #90

ghost opened this issue Jun 10, 2021 · 5 comments

Comments

@ghost
Copy link

ghost commented Jun 10, 2021

http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
Can you add a XDG support? Move files from ~/instead/ to there, for example:

  • ~/instead/games -> $XDG_DATA_HOME/instead/games
  • ~/instead/saves -> $XDG_DATA_HOME/instead/saves
  • ~/instead/insteadrc -> $XDG_CONFIG_HOME/instead/insteadrc
@hugeping
Copy link
Contributor

Btw, there is also themes and stead/ lua files to put them in XDG_DATA.

Currently, INSTEAD uses single appdata concept exposed to user via command line -appdata for ex.). And XDG data must be splitted in two places.

Moreover, INSTEAD is not Linux only software, so appdata concept is much simpler concept to make instead more portable.

So, i am currently not in interest to implement this feature, that will complicate code. But i leave this issue opened, if someone send me good solution (patch).

@hugeping
Copy link
Contributor

btw, you can use -appdata /some/dir -- and instead will put there saves/config and looking there games and other data...

@ghost
Copy link
Author

ghost commented Jun 10, 2021

What do you mean a "good solution"? What are accurate requirements for it?

@hugeping
Copy link
Contributor

hugeping commented Jun 10, 2021

What do you mean a "good solution"? What are accurate requirements for it?

I mean, solution that will no break existing things. And existing ports should still works.
It's looks like very easy thing to implement, but it is not.

For example, what we should do with -appdata switch? Where saves should be contained? Btw, saves files can be store in gamesdir... INSTEAD can be compiled in standalone mode and in system wide mode. There are tons of entities that instead can work with in different situations and variants: themes, custom lua files, games, savedirs inside games, profiles, config file.. Currently all of them uses appdir() to get basedir.

Of course it is possible to do, but for me XDG feature does not solve anything (you can use -appdata switch if you do not like ~/.instead dir) and makes things more complicated.

But if i will get patch (unix.c?) and it will not break existing things i will likely merge it.

@rumly111
Copy link
Contributor

rumly111 commented May 8, 2024

If you want to follow xdg specs, I think you need to store configs in ~/.config/instead , and saves in ~/.local/share/instead , and it's quite a hassle . Current approach has no problem IMO. Also the front-end insteadman expects your game files in ~/.instead directory, so why break it?

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

No branches or pull requests

2 participants