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
[Linux] Follow xdg specs or allow user to provide directories #2285
Comments
This isn't a dupe of #381. While the introduction of the App Directory Path does help, it doesn't fully address the issue in the current implementation: the config files, saves, mods and assets are all assumed to be in the same working directory as the binary. There is work in progress for a nix package, though, with a pull request in NixOS/nixpkgs#207770. You can follow the discussion on the Discord thread about the nix package, under support. |
not with |
sidenote, i don't think we should follow the spec by default until we have a "open config/mods/etc. directory" button in soh itself. a large number of linux users are on deck and new to linux, trying to explain how to find config/spoiler logs/save files would be a lot harder than it is now if they lived in hidden dirs as per xdg guidelines |
one of the nixos packagers here, having a separate configurable directory for configs, saves, and another directory for OTRs would mean we wouldn't have to patch. |
Yeah, having a configurable way to split directories soh mutably writes to and the immutable compile assets like the OTRs would be very benefitial. |
@j0lol @IvarWithoutBones so does this not help you all? #2285 (comment) |
i'd assume not, since |
It does help a fair bit by reducing the number of patches we need. The current derivation (NixOS packaging solution) by @j0lol unfortunately does still need a patch to look for the OTRs in a compile-time configurable immutable directory though, so our needs are not completely fulfilled with it. |
i think this was resolved by #3119, if there's more that's needed for it i can reopen |
First of all, thanks for making this great project and thanks for supporting it on Linux.
I finally got the Ship to build on my machine today after some CMake issues, and the first thing I noticed was the somewhat weird way in which all files are handled.
The game expects all assets to be stored alongside the
soh
binary (or, well, be in the working directory at least) and also stores all save data AND configuration files AND thegamecontrollerdb.txt
file alongside it (or, again, the current working directory).On Linux, this is actually pretty inconvenient. I know this may not sound like a big issue, since most users likely use Windows and most Linux users probably use the AppImage anyway. For everyone else though, it's rather annoying.
For example, I personally use NixOS (which sharply increases the obscurity of my use case even further, but please here me out). I won't dig in to the details, but on this distro you essentially have to package all software using its own system, and all packaged software gets stored in a read-only repository on your machine. So right away this is a bit conflicting, as I can't write save data or configuration files there. (Moreover, AppImages aren't well supported on my distro)
This is not exclusively a Linux problem of course, in Windows-land I assume that configuration data and save data should probably be located in
%APPDATA%
as well or something. But it's even more annoying on Linux where we usually keep binaries in a a seperate store (like/usr/bin
or a read-only store like in my case).My proposal is rather modest: it would be nice if Linux builds would follow the xdg spec at least loosely and keep configuration and save data in one of the classic directories (Somewhere under
~/.config
is already really nice, though technically save data etc should go somewhere under~/.local
, but let's keep things simple for now). If the location of the assets directory andoot.otr
file can be overwritten by specifying them on the command line or in a config file in the previously mentioned config directory, that would be even better. And this change could go hand-in-hand with maybe placing save data in a more appropriate location for Windows as well.Sorry for the rambling explanation, hopefully my point is clear.
The text was updated successfully, but these errors were encountered: