Open fkaa opened 9 years ago
I think this is a good idea. Here is where it points to:
*nix: /home/foobar/.local/share/orgname/game/
OS X: /Users/foobar/Library/Application Support/orgname/game/
Windows: %appdata%/orgname/game/
EDIT: I suggest that we don't change the current folder structure. Instead if not already done so, the clsave,svsave and dlcache folders will be copied over to SDL_GetPrefPath() and will be used from there. If the user needs to reset to default, the files in SDL_GetPrefPath() will be removed and replaced with the default files.
Sounds good. Additionally, maybe we could find some use of SDL_GetBasePath()
? Sounds more reliable than using the working directory (SDL_GetBasePath()
returns the path where the actual executable is, not working dir)
I don't think we want users to be able to move the executable around. What other reason is there to use the executable path? Put binaries in a bin folder? Why?
The main one would be so that you don't have to set the executable path before launching it (such as for launching the dedi server from command-line, or a custom launcher). It's got nothing to do with users "moving the executable around".
Oh right, yeah that makes sense.
Currently all game related files are written to the current directory (in this case where the executable is located). I propose we use SDL2's
SDL_GetPrefPath()
instead so we can have a more permanent storage (good for screenshots etc.). This could also allow for having a lightweight launcher which downloads new versions.This may also cause some discrepancy with how iceball is currently set up. The purpose of switching to pref path would be to separate the launcher and the executable + game data. Currently the executable and the launcher are bundled together, so that may cause some issues in how it should be structured.
Please leave feedback on how you think this should be done, if at all!
:shipit: