blobbyvolley2
blobbyvolley2 copied to clipboard
Support XDG directory specificiation
The game should save settings in proper directory, defined by XDG specification, instead of just ~/.blobby, by default it should be ~/.config/blobby for example.
Please take a look at:
- https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
- https://wiki.archlinux.org/index.php/XDG_Base_Directory
Should we set our write-directory to PHYSFS_getPrefDir()?
This would put things in .local/share/blobby.
Also, while we are at it, we probably want to change things so that we are writing to this directory also in a windows installation.
You are right. We should use PHYSFS_getPrefDir(). It does the right thing. On linux it takes XDG_DATA_HOME also into account.
Added a first PR for discussion.
Please keep backward compatibility for users who already have Blobby Volley installed. The app should check whether the directory exists in legacy path and then execute one of the following:
- just use the legacy path forever if it exists;
- move files from legacy path to current path and remove old directory.
Also, according to XDG directories standard there should be separation between data and config. Configuration files (window size, game settings, preferences) should be stored somewhere in $XDG_CONFIG_HOME (defaults to ~/.config). From the other hand, data files like game scripts, highscores, backgrounds should be stored in $XDG_DATA_HOME (defaults to ~/.local/share).
imho backward compatibility is not important in this case.
Following the spec we should separate config and data that's right. Physfs may support this in the future (https://github.com/icculus/physfs/issues/41). If Physfs supports this, we will also get this separation for other systems.
imho backward compatibility is not important in this case.
This may be bad user experience when user loses configuration, replays, input settings right after game update. Typical end user don't have to understand what's going on with config directories so it would be good idea to avoid this kind of experience.
Hi, I prepared pull request for Flatpak package to update the game to new version: https://github.com/flathub/de.blobbyvolley.BlobbyVolley2/pull/4
I noticed that new version supports XDG config directories but does not migrate data from legacy ~/.blobby. After upgrade the user loses all customizations. It this intentional?
Currently I am not going to merge my pull request so Flatpak users still get old version.
Hi this looks great. Thank you very much.
There are no plans to migrate the settings from the old folder. Maybe you can wait with your merge until version 1.1.1 is released, because there are critical bugs in 1.1 .
I will do what you prefer. However, it would be nice if you would use GitHub "releases" instead of just bare git tags so I will get notification from GitHub when new release will be available.