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
Application data shouldn't be written to ~/Documents/OpenTTD on OSX #6851
Comments
Before we end up in a he-said-she-said situation, do you have references to support this statement? (URL to their best-practice manual, or something like that?). Thank you! |
It's strangely hard to find a definitive statement, the best I could come up with is https://developer.apple.com/library/archive/documentation/General/Conceptual/MOSXAppProgrammingGuide/AppRuntime/AppRuntime.html#//apple_ref/doc/uid/TP40010543-CH2-SW9, under the "Application Support directory" section. It's easier to find StackOverflow references, such as https://stackoverflow.com/questions/9495503/applications-data-folder-in-mac |
Do you have a list of the data that you would prefer to be in ~/Library/Application Support/OpenTTD ? :) . I can understand the reasoning for suggesting this location. However for personal reasons, I am -1 to sharding where OpenTTD keeps data on macOS. It's very convenient to have a single dir for OpenTTD. My case is oriented towards development. ;) |
@andythenorth What do you mean by sharding? The development use case should be the same, right? The only difference is the location of the files you are inspecting. On OSX, I'd be running the game from ~/Downloads/OpenTTD or ~/Games/OpenTTD, but in both cases it creates the separate data directory in ~/Documents/OpenTTD, with subdirs ai, baseset, content_download, game, etc. So, I'd expect that the game directory created when unzipping openttd-1.8.0-macosx-universal.zip would be kept as is, but everything currently created in ~/Documents/OpenTTD would be pushed to the ~/Library/Application Support/OpenTTD directory (even save games). That would be downloaded content such as game tiles, scenarios, etc, as well as config (*.cfg) and save game files. There's only a handful of apps I've used that uses ~/Documents as a storage location (FS-UAE is one). Most other apps push everything to ~/Library. |
Good explanation, thanks :) Savegames IMHO are content, not settings. Quoting the Apple doc you linked for Application Support dir, "The files should be app-specific but should never store user data." So savegames need to continue to go in ~/Documents. That's kind of janky. I'm not massively -1 to this; it just seems unclean for all three options (Documents, Application Support, split over both). Given that all options are crap, why change? :) |
Sorry I took a few days to respond. I'd interpret the quote you mentioned differently. As it says, the files in there should be app-specific, which they are. However, while they are user data, I wouldn't expect users would open them in anything other than OpenTTD - it's a binary file. Similarly, the .cfg files that are currently in there I wouldn't expect most users would edit directly - even though they are in a standard .cfg file format - since the expected values need to be parsed by OpenTTD. That's why I feel they are app-specific files and while a user has created them, they aren't user data. I reckon it's still one place (i.e. option 2 in your list), I wasn't advocating splitting the locations, but at the end of the day it's your code and your call. :-) |
I'm not an expert on Apple UX guidelines, but my expectation is generally that the Documents folder should only contain files I have named myself. Apps/games shouldn't put files in there "for me". The app could contain a command to open the folder with settings files etc. in Finder, but during normal use the user should only see their own saved data in Documents. |
Thanks for this. There's been no activity on this for some time, and as it stands, it doesn't look likely that it will go any further. I'm closing it as we try to keep the issue count low for OpenTTD, it helps us focus on things that are important and fun. Feel free to discuss in irc or request re-opening if you disagree. Thanks for contributing! |
Application data should be placed in ~/Library/Application Support/OpenTTD instead
The text was updated successfully, but these errors were encountered: