You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue in detail and how to reproduce it:
Modern macOS is becoming increasingly restrictive about which folders applications are allowed to read and write to, and users could be storing their games anywhere but most likely they're putting them in places that macOS considers protected, such as ~/Desktop, or ~/Downloads, or ~/Documents, etc. This can cause write issues when trying to save, or even just the Player launching to an empty game browser, and the user gets very little (if any) feedback as to why.
To that end, I have two proposals:
We should write all saved games to ~/Application Support/EasyRPG Player/[game-specific prefix]/.
We should present an Open File dialog when the Player launches.
Saved games
Pros:
No special permission needed to write here
Cons:
Users updating the Player will no longer see their save games and will have to manually move them to the new folder. Depending on how we choose the game-specific prefix, it might be difficult to work out what the new folder even is. Plus, Apple hides the ~/Application Support directory by default... We might want to consider copying all existing saves to the new folder if it doesn't exist?
Might break some user's workflows, such as if they keep their games on an iCloud Drive, Dropbox or the like (and the ~/Documents folder is iCloud Drive synced by default these days).
Open File Dialogs
Depending on where people put their games the Player will pop up various directory permission prompts on first launch and I suspect some folks are inadvertently rejecting those which then makes the Player effectively useless, and it won’t ask for this permission again, and manually granting it is quite a faff.
Apple wants you to get permission to read into these protected directories by opening a standard Open File Dialog (or any other user initiated action, such as drag-and-drop, etc), and that implicitly grants you permission to read the contents… doing it this way lets users do the natural thing of just putting EasyRPG Player.app in their /Applications folder and letting it show a Open File Dialog on launch for which game they want to open. If the folder they choose doesn't have a game in it, we start the game browser pointed at that directory instead.
Pros:
Supports users who just want to install EasyRPG Player.app into their /Applications folder like any other macOS app.
Since access to the game folder is explicitly granted by the user via the system Open File Dialog, it should avoid the permission prompts entirely.
Cons:
If the user puts the EasyRPG Player.app inside their game folder and the game folder is in a protected directory, the Player is still going to try to discover the game in the same directory as the .app and therefore trigger the permission popup anyway. There's no API to determine if you've already been granted this permission, too, the only way to try to read there and then you'll either get your popup + file handle, or an error. The only way to avoid it entirely is to not support dropping the Player in the game directory, which every other platform supports...
I'm open to discussion on exactly what the logic should be but honestly I'm tempted to make it so Mac only supports launching games with either the Open File Dialog, or if the game is packaged inside the .app to just start up directly (is this implemented yet?). We can make the dialog less annoying too by having it remember the previously chosen directory and starting there on subsequent launches.
I will be on vacation until November 2nd but plan to start work on a pull request not long afterward, if you'd like to bikeshed some of the specifics of this proposal, doing so before I start coding would be appreciated 😂
The text was updated successfully, but these errors were encountered:
Name of the game:
All games
Player platform:
macOS Mojave (10.14) or later
Attach files (as a .zip archive or link them)
This issue is not game-specific.
Describe the issue in detail and how to reproduce it:
Modern macOS is becoming increasingly restrictive about which folders applications are allowed to read and write to, and users could be storing their games anywhere but most likely they're putting them in places that macOS considers protected, such as
~/Desktop
, or~/Downloads
, or~/Documents
, etc. This can cause write issues when trying to save, or even just the Player launching to an empty game browser, and the user gets very little (if any) feedback as to why.To that end, I have two proposals:
~/Application Support/EasyRPG Player/[game-specific prefix]/
.Saved games
Pros:
Cons:
~/Application Support
directory by default... We might want to consider copying all existing saves to the new folder if it doesn't exist?~/Documents
folder is iCloud Drive synced by default these days).Open File Dialogs
Depending on where people put their games the Player will pop up various directory permission prompts on first launch and I suspect some folks are inadvertently rejecting those which then makes the Player effectively useless, and it won’t ask for this permission again, and manually granting it is quite a faff.
Apple wants you to get permission to read into these protected directories by opening a standard Open File Dialog (or any other user initiated action, such as drag-and-drop, etc), and that implicitly grants you permission to read the contents… doing it this way lets users do the natural thing of just putting
EasyRPG Player.app
in their/Applications
folder and letting it show a Open File Dialog on launch for which game they want to open. If the folder they choose doesn't have a game in it, we start the game browser pointed at that directory instead.Pros:
EasyRPG Player.app
into their/Applications
folder like any other macOS app.Cons:
EasyRPG Player.app
inside their game folder and the game folder is in a protected directory, the Player is still going to try to discover the game in the same directory as the.app
and therefore trigger the permission popup anyway. There's no API to determine if you've already been granted this permission, too, the only way to try to read there and then you'll either get your popup + file handle, or an error. The only way to avoid it entirely is to not support dropping the Player in the game directory, which every other platform supports...I'm open to discussion on exactly what the logic should be but honestly I'm tempted to make it so Mac only supports launching games with either the Open File Dialog, or if the game is packaged inside the
.app
to just start up directly (is this implemented yet?). We can make the dialog less annoying too by having it remember the previously chosen directory and starting there on subsequent launches.I will be on vacation until November 2nd but plan to start work on a pull request not long afterward, if you'd like to bikeshed some of the specifics of this proposal, doing so before I start coding would be appreciated 😂
The text was updated successfully, but these errors were encountered: