Opened 12 years ago
Last modified 12 years ago
#1145 closed enhancement
Improve game data paths in OS X and Windows — at Initial Version
Reported by: | historic_bruno | Owned by: | historic_bruno |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 10 |
Component: | Core engine | Keywords: | osx, build |
Cc: | Patch: |
Description
Paths could be greatly improved for usability and to follow OS conventions on Windows and OS X. The current vision is something like this table with a few tweaks as I go along. To summarize discussions to this point:
- On Windows,
%appdata%
or%localappdata%
are used for behind-the-scenes data the game creates, and are considered more obscure locations than, say, My Documents. Most users don't even know they exist. So we should use%localappdata%
for cache for the reasons given here, and My Documents for most other things like saved games, screenshots, and the proposed user mod. Config and log locations are still up in the air, because at this stage people are often wanting to access the config and log files directly (for troubleshooting things), hopefully less often as we get closer to beta.- Implementation is straightforward, just copying and pasting code in wutil.
- On OS X, ~/Library/Application Support is what we're supposed to use for our run-time game data, with the exception of preferences and cache. Since we're unlikely to switch to using
NSPreferences
, we can ignore than suggestion, but cache should probably go in~/Library/Caches
(the main distinction is that Application Support is included in backups but Caches is not). However, Application Support is hidden on Lion, so it doesn't seem the best place for saved games, screenshots, and other friendly data. We can use~/Documents
instead.- Implementation should use NSSearchPathForDirectoriesInDomains implemented in Objective-C with a plain C wrapper. I hope this will work with Premake and gcc with little extra work, I don't know because we don't have any Objective-C code yet :)
- There may be some weird cases to test, like what happens if the app bundle is run in "sandbox" mode or if the directory doesn't exist.
Note:
See TracTickets
for help on using tickets.