Skip to content
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

Closed
bruny opened this issue Jul 11, 2018 · 8 comments
Closed

Application data shouldn't be written to ~/Documents/OpenTTD on OSX #6851

bruny opened this issue Jul 11, 2018 · 8 comments
Labels
OS: MacOS This issue is related to a Mac OS problem question Further information is requested

Comments

@bruny
Copy link

bruny commented Jul 11, 2018

Application data should be placed in ~/Library/Application Support/OpenTTD instead

@TrueBrain
Copy link
Member

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!

@TrueBrain TrueBrain added question Further information is requested OS: MacOS This issue is related to a Mac OS problem labels Jul 12, 2018
@bruny
Copy link
Author

bruny commented Jul 13, 2018

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

@andythenorth
Copy link
Contributor

andythenorth commented Jul 13, 2018

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. ;)

@bruny
Copy link
Author

bruny commented Jul 19, 2018

@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.

@andythenorth
Copy link
Contributor

andythenorth commented Jul 19, 2018

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? :)

@bruny
Copy link
Author

bruny commented Jul 25, 2018

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. :-)

@nielsmh
Copy link
Contributor

nielsmh commented Jul 25, 2018

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.

@andythenorth
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: MacOS This issue is related to a Mac OS problem question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants