CreeperHost / modpacklauncher

Other
22 stars 3 forks source link

[Feature Request] Put modpack files in platform-native locations #15

Closed s0ph0s-2 closed 3 years ago

s0ph0s-2 commented 4 years ago

First off, I'd like to thank you guys for fixing the bug that torpedoed my saves every time the app automatically updated. I really appreciate not having to do the wifi off/launch app/close proxy dialog/wifi on/swap between news and modpacks dance every time I start the app.

That brings me to this feature request.

Current Behavior

The launcher creates ~/.ftba

Desired Behavior

I'd prefer this because it follows the conventions for where persistent, non-document app files belong on each of the three platforms. In my particular case, I know that Application Support will be backed up correctly, I know that I won't miss an important folder in a shell glob that doesn't explicitly include dotfiles, and so forth.

If you'd like to learn more about the XDG Base Directory specification, the Arch Wiki offers a brief but informative overview.

As an added bonus, it would be fantastic if the launcher could clean up after itself when this migration occurs, so that there is not a leftover .ftba directory hanging around in my home folder.

CobaltSpace commented 3 years ago

I made FTBTeam/FTB-App#294 before seeing this one specifically for Linux.

To expand on your issue for Linux specific, and undefined $XDG_CONFIG_HOME should fallback to $HOME/.config and undefined $XDG_DATA_HOME should fallback to $HOME/.local/share.

https://github.com/dirs-dev/directories-jvm could probably be used for this.

The spec is defined here: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html