-
Notifications
You must be signed in to change notification settings - Fork 38
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
Allow source files to be found system-wide and don't hardcode /usr prefix on UNIX #93
Conversation
Thanks for contribution!
|
This is tried before ~/.local/share/{NCINE_LINUX_PACKAGE}/Source, which is slightly counter-intuitive but necessary. If you favour the user directory, it will be automatically created on first launch and the system-wide directory will never be considered again, even if the user directory is still empty. The game shouldn't try to create the system-wide directory because it wouldn't have permission to do so.
39386ff
to
53a55de
Compare
Okay, I dropped that commit. It wasn't essential.
I'm not sure what you mean. Apart from the
Actually, the default set by CMake is Good point about
Yeah, I didn't really want to do it that way, but I couldn't think of an alternative without dropping the automatic directory creation. Even then, users who have already run the game once without any files won't see any system-wide files installed subsequently. It would need to check whether the directory was empty or not. You don't currently have a helper for checking directory contents. If I was to start writing a new game, I'd probably use something like PhysicsFS, but I wasn't going to go that far here. 😄 |
I think I can change it to check presence of Lines 1009 to 1012 in bdf0ebd
Then the priority would be as expected (user first).
I meant mainly FreeBSD which I know is not very popular, but the game works there.
If you think nobody will complain, then it's fine for me. I looked at PhysicsFS, but I didn't like it, I don't remember why and I wanted migrate C# code as fast as possible, so I created my own IO API. The advantage is that I can extend it as much as I want. |
I'll merge this PR and adjust it in the next commits. |
/usr/share/{NCINE_LINUX_PACKAGE}/Source
is tried before~/.local/share/{NCINE_LINUX_PACKAGE}/Source
, which is slightly counter-intuitive but necessary. If you favour the user directory, it will be automatically created on first launch and the system-wide directory will never be considered again, even if the user directory is still empty. The game shouldn't try to create the system-wide directory because it wouldn't have permission to do so.