Closed NovA-80 closed 1 year ago
I actually fully agree! Not that long ago there was a video about this & hidden directories on the youtube channel from Brodie Robertson. My bad.
I will try to change the default config location. Maybe there is a migration path needed from old to new location.
Then, probably the default location of prefixes is also worth to be changed in respect with XDG Base Directory Specification. Not ~/.winegui/prefixes
, but something like $XDG_DATA_HOME/wineprefixes
, i.e. ~/.local/share/wineprefixes
Yeah I think so. I tried to match official Wine config folder initially. But yes changing all this make sense.
The biggest problem is writing an additional migration script/code which detect the old installation and moves everything to the new locations, etc. Hopefully not breaking people setups.
Yeah, the backward compatibility is the problem here. But hopefully solvable.
First, I think there is need to move the config file only but keep prefixes. Else the desktop menu items generated by WINE will break. So, the change of default prefixes location will affect just the new installs.
Second, the movement of the config file can be accomplished during the next WineGUI run. Read the config from the old location (if exists) but save to the new one. Note, that in some projects, like GIT, they even keep both config files in cascading way. But I don't think its necessary in WineGUI.
I was thinking if users also go back one version, the config file is gone. So I understand that git keep it in both directories.
But I agree the chance that people roll back to an older version is slim.
I can code the migration in the application. Unless cmake/deb/rpm has a built in solution cross platform for this specific use case. But I don't think so. It's indeed checking if the new location contains a config file, if not, check if there was already a config file present in the old place, and move the file(s).
Prefixes are indeed a bit more tricky, since you are right. Moving is not the issue, but as you said it might break links/menu items. The prefix location is btw stored in the winegui config file, did you noticed that?
Prefixes are indeed a bit more tricky, since you are right. Moving is not the issue, but as you said it might break links/menu items. The prefix location is btw stored in the winegui config file, did you noticed that?
Yes, I did noticed. That's why I propose to change only the default location not touching the existing value.
BTW, the config file is actually pretty simple for now and user can reconfigure all from scratch pretty easily. Probably the migration code is not needed at all. :) But if the migration is done, the external way via package management sounds most appropriate. This allows to keep the code clean, and those who don't use packages are supposed to have enough skills to reconfigure all manually. :)
Let me check if I can work on this in weekend and see how hard the migration code needs to be in order to close this ticket.
@NovA-80 New Merge Request is created, ready for review: https://gitlab.melroy.org/melroy/winegui/-/merge_requests/18
You could also verify the new binary (which is not yet released), download from here: https://gitlab.melroy.org/melroy/winegui/-/jobs/15175/artifacts/browse/build_prod/ (as you noticed, is a bit more complicated than initially thought 😮 )
In the last case, try to avoid roll-back to an earlier release, to prevent potential configuration settings lose.
OK, I officially released the new config & data dir locations.
See version 2.1.0: https://gitlab.melroy.org/melroy/winegui/-/releases/v2.1.0
The WineGUI config dir is hardcoded to
~/.winegui
. But according to XDG Base Directory Specification, it should be$XDG_CONFIG_HOME/winegui
, i.e.~/.config/winegui
by default.It would be nice to change WineGUI config location respectively, so that the home dir is bloated less. :)
It seams the change can be as simple as: