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

OpenTTD asks for permission to access documents folder with every launch #6

Open
danidoedel opened this issue Apr 5, 2021 · 4 comments
Labels
wontfix This will not be worked on

Comments

@danidoedel
Copy link
Contributor

danidoedel commented Apr 5, 2021

Version of OpenTTD

1.11

Expected result

OpenTTD should only ask once to get permission to access the documents folder (works fine in vanilla OpenTTD)

Actual result

With every game launch the user is asked to grant permissions for the game to access the documents folder.

Steps to reproduce

Launch the game a few times on macOS (11.2.3)

image

Not sure if that is easy fixable or if that would require the application to be signed which is only possible with an Apple developer account.

Sorry for all the issues I create, I just drop whatever I find. Feel free to close if it's not fixable or not worth investing a lot of time :)

@ldpl
Copy link
Collaborator

ldpl commented Apr 6, 2021

Does that happen with older version of vanilla that aren't signed?
Unfortunately I'm unable to test or support macos version in any way, so if it works it works if not I can only remove it.
If it can be solved with a patch, well, PRs are welcome. SIgning may be possible in future via openttd account it devs figure out something for patchpacks. But for now I don't see how I can change anything about this issue.

@yan-zaitsev
Copy link

@danidoedel I have meet the same issue.
My quick solution: Open OpenTTD with Terminal:

  1. Open Terminal
  2. Enter /Applications/OpenTTD.app/Contents/MacOS/openttd

@yan-zaitsev
Copy link

I have tried to look into source codes and fix is not easy. As I understand, app requires to implement Security-Scoped Bookmarks and Persistent Resource Access from https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html
In this case, src/fileio.cpp had to be modified a lot to ask user for first time using NSOpenDialog class, then store security bookmark and use it later.

@James103
Copy link

James103 commented Sep 23, 2022

Are you still having this issue? If so, try running the following command:

codesign -s - --deep /Applications/OpenTTD.app (replace the path with the actual path to your OpenTTD cmclient installation)

Warning: This signs recursively into the app's folder. Do not use if you don't fully trust the app. See JGRennison/OpenTTD-patches#318 (comment)

Source of command: qbittorrent/qBittorrent#16728

@ldpl ldpl added the wontfix This will not be worked on label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants