Skip to content

Move global state to OS dependent directories#224

Merged
RedLime merged 2 commits intoRedLime:1.16.1from
me-nx:new-global-dirs
Jul 18, 2025
Merged

Move global state to OS dependent directories#224
RedLime merged 2 commits intoRedLime:1.16.1from
me-nx:new-global-dirs

Conversation

@me-nx
Copy link
Copy Markdown
Contributor

@me-nx me-nx commented Jun 20, 2025

Merge base version

  • MC Version: 1.16.1, can be cherry-picked to other branches
  • SpeedRunIGT Version: 16.1 (future)

Changes

Move global state from ~/speedrunigt to appropriate OS dependent paths to avoid polluting the home directory.

Context

I've seen #105, but:
a) there has been no progress on the linked fabric issue for the last year
b) that issue concerns cache directories, which speedrunigt shouldn't use for storing fonts & categories (for example on linux ~/.cache may be cleared at any time).

This PR moves the global state to %APPDATA% on Windows, an XDG mandated data directory on Linux, and ~/Library/Application Support/ on OS X.

I've quickly tested the changes on Linux and Windows.

Drawbacks

  • Possible user confusion?
  • Old versions of the mod will continue to use the old directory

Alternatives

Instead of moving the directory the mod could check if the new directory exists, else fall back to the old ~/speedrunigt path if it exists.

Feel free to reject if you don't think this is important enough.

@me-nx
Copy link
Copy Markdown
Contributor Author

me-nx commented Jun 20, 2025

@tildejustin ping since u wrote that PR

@tildejustin
Copy link
Copy Markdown
Contributor

mine was more concerned with allowing srigt to work with fabric loader sandbox but nothing has happened with that for a while. happy for this to supercede it, esp b/c it looks like you know what you're doing with what should go where more on different OSs more than me :P

@me-nx
Copy link
Copy Markdown
Contributor Author

me-nx commented Jun 21, 2025

Since this may hurt discoverability me-nx/SpeedRunIGT@a97234d adds a button to open the custom categories folder (like the one for the fonts folder), so that the user doesn't have to find it themselves. LMK if u want it in this PR

@RedLime RedLime merged commit b5d7fe9 into RedLime:1.16.1 Jul 18, 2025
tildejustin pushed a commit to tildejustin/speedrunigt that referenced this pull request Jan 30, 2026
* fix gradlew file mode

* change the global data path, move old files there
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants