-
Notifications
You must be signed in to change notification settings - Fork 115
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
Config search #114
base: master
Are you sure you want to change the base?
Config search #114
Conversation
This work is handled by the ApplicationSettings class. On linux, it searches the config.json file first in working directory (directory level), then in ~/.config/bonzomatic (user level), then in /etc/bonzomatic (system level). It also infers the data directory (where are stored textures and other files) based on that location. In directory level and user level it is the same directory, in system level it's /usr/share/bonzomatic.
The platform_common (Windows and OSX) implementation always searches for config.json in current working directory.
Default shader is now loaded from data directory according to where config.json was found.
I don't know how I feel about this, it feels like a ton of code for one specific platform that isn't necessarily needed because it's trying to compensate for a misconfiguration. Thoughts, @PoroCYon ? |
The diff is a bit large for what it actually does. While it could've been added in an And even then, you're not actually adhering to the XDG standard Secondly, you might want to put the relative search path in the config file instead of kludging it in like this, but idk what Gargaj would think of this. EDIT: sorry for the late reply, but somehow I missed this. I blame exams |
You can already pass a path as parameter for an explicit config file path. |
Thank you for the reply
Actually there is no
Mmmmh I'm sorry about that. I suppose I could make a shorter version and enclose it with an
Same, sorry as well for the late reply, but I blame life :) |
This is to give bonzomatic, when on Linux, the Linux way of looking for configuration and data.
It searches the config.json file first in the working directory, then in the user directory (
~/.config/bonzomatic
), and lastly in the system config directory (/etc/bonzomatic
).