-
Notifications
You must be signed in to change notification settings - Fork 9
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
Make the linux version aware of its installation path #52
Comments
Probably a good idea to have the linux bin search common path locations ./ , /usr/share/openparsec, ~/.openparsec/ that sort of thing like other games do if we want people to be able to make distro packages for thing |
One thing it needs to do is write parsecrc.con to a user home dir. That file stores the user's prefs and is pretty bad if it can't write it out. A useful default would be good too |
For a guaranteed writable path for settings, SDL_GetPrefPath seems like it'd be useful. |
SDL_GetPrefPath() seems ok for the user-config directory. |
For linux builds it would be no problem to find the path to the place from where the parsec application has been started.
Because this may be usefull for the server as well it would be part of the libparsec. Whether a new modul gets created or the function get incorporated into some existing modules is not clear at the moment
With the solution I would add some classes I developed a long time ago to handle filenames/directories and files in a in-between way more like parsec inventors did. They use the standard C-library functions and define some sort of encapsulation of these function.
Whether these functions are going to be used in the future is up to you.
Anyway. Looking up the location the executed binary is from is done via the /proc filesystem and very linux specific. But it will be the base for any location specific file access.
The text was updated successfully, but these errors were encountered: