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

Ignore process serial number argument passed by macOS Gatekeeper. #37719

Merged
merged 1 commit into from Apr 10, 2020

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Apr 9, 2020

Ignore process serial number (-psn_...) command line argument passed by macOS Gatekeeper.

PSN is only passed on the first start of the downloaded app (.app bundle with com.apple.quarantine extended file attribute), confuses Godot, causing it to load non-existent project instead of project manager.

Fixes #37713
Probably fixes #37446, fixes #35383 and fixes #36616?

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a comment so we know why this was added in the future 🙂

main/main.cpp Show resolved Hide resolved
@akien-mga akien-mga added this to the 4.0 milestone Apr 10, 2020
@akien-mga
Copy link
Member

It's really a weird design for macOS to arbitrarily pass arguments to thirdparty processes that are not designed to handle them... I'm sure we're not the only ones to have issues with that (though our argument parsing is particularly bad right now, but we'll get to properly fixing #20000 eventually :)).

Anyway, this is hacky but seems like a good solution for now.

@akien-mga akien-mga merged commit 4c36feb into godotengine:master Apr 10, 2020
@akien-mga
Copy link
Member

Thanks!

@bruvzg bruvzg deleted the macos_ignore_psn branch April 10, 2020 08:46
@bruvzg
Copy link
Member Author

bruvzg commented Apr 10, 2020

It's really a weird design for macOS to arbitrarily pass arguments to thirdparty processes that are not designed to handle them...

This was the normal way to pass PSN to the Carbon apps (API deprecated in 10.8 and removed in 10.15), probably some of the old code accidentally get into the Gatekeeper.

I'm sure we're not the only ones to have issues with that...

For the reference, it's definitely known issue: Chromium, Qt, Firefox

@akien-mga
Copy link
Member

Cherry-picked for 3.2.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment