Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set gameDir to $XDG_DATA_HOME and copy assets on initialization #658

Merged
merged 2 commits into from
Jan 20, 2024

Conversation

SkyLeite
Copy link

@SkyLeite SkyLeite commented Jan 7, 2024

This is somewhat of a stopgap solution to the issue of the game failing to launch when gameDir is set to a directory without the necessary assets. USC is shipped with the assets needed to at least run, so it can handle this scenario by copying them over to gameDir when it is detected to be empty. For my nix package I wrapped the executable with a bash script that does this at runtime, but it makes sense to me for the game to do this.

A more elegant solution would be to separate the specification of asset paths (for example, implementing -skinsdir, -fontsdir, -songsdir, etc), as well as allowing these options to contain multiple paths to be searched, akin to the colon-separated list of directories in $PATH. In this scenario, the game could always search the executable path for necessary assets, while still allowing the user to specify additional ones.

Fixes #645

@Drewol Drewol merged commit cc7402a into Drewol:develop Jan 20, 2024
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.

[Feature] Follow XDG Base Directory specifications for bundled and additional user data on Linux
2 participants