Added support for XDG directory standards #108
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For a long time I've had to create symlinks in my system so that Runelite doesn't pollute my home directory. Sufficient to say, this is not fun.
I added support for XDG standards, and is now the default on both Linux and MacOS versions.
RUNELITE_DIR
is nowXDG_DATA_HOME/runelite
.LOGS_DIR
is nowXDG_STATE_HOME/runelite
.REPO_DIR
hasn't changed:RUNELITE_DIR/repository2
(documenting what this directory means would be nice)CRASH_FILES
haven't changed:LOGS_DIR/jvm_crash_pid_%p.log
Furthermore, we should now use
OS.getXDG("config", "runelite")
,OS.getXDG("data", "runelite")
,OS.getXDG("cache", "runelite")
, andOS.getXDG("state", "runelite")
,OS.getXDG("pictures", "runelite")
to appropriately place stuff. Replace"runelite"
with"runescape"
if that makes more sense for certain things.With this, we should move towards separating
runescape
-specific stuff fromrunelite
specific stuff, and make sure plugins also follow up. We should probably also move configuration into the configuration directory, and add a configuration file for each plugin under a subdirectory.Important note for Linux and MacOS users: Manually move the directories from
~/.runelite
into the ones specified above! Nothing will be lost if you don't do it, but it's not automatic.