instead
instead copied to clipboard
XDG Base Directory support
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
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).
btw, you can use -appdata /some/dir -- and instead will put there saves/config and looking there games and other data...
What do you mean a "good solution"? What are accurate requirements for it?
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.
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?