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

[macOS, Mono] Automatically enable JIT entitlements for the Mono exports. #50317

Merged
merged 1 commit into from
Jul 9, 2021

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Jul 9, 2021

Automatically enable entitlements which are always required to run managed code.

@bruvzg bruvzg added this to the 4.0 milestone Jul 9, 2021
@bruvzg bruvzg requested a review from a team as a code owner July 9, 2021 18:27
@@ -163,9 +164,11 @@ void EditorExportPlatformOSX::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/replace_existing_signature"), true));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/entitlements/custom_file", PROPERTY_HINT_GLOBAL_FILE, "*.plist"), ""));

#ifndef MODULE_MONO_ENABLED
Copy link
Member

Choose a reason for hiding this comment

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

I'd add an explanatory comment to make it clear why those are compiled out.

@@ -41,6 +41,7 @@
#include "editor/editor_export.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "modules/modules_enabled.gen.h"
Copy link
Member

Choose a reason for hiding this comment

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

That won't work on 3.x which predates this refactoring:

platform/osx/export/export.cpp:44:10: fatal error: 'modules/modules_enabled.gen.h' file not found
#include "modules/modules_enabled.gen.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

But you can instead rely on if (Engine::get_singleton()->has_singleton("GodotSharp")) to check if there's C# support.

@akien-mga akien-mga merged commit 0ee2358 into godotengine:master Jul 9, 2021
@akien-mga
Copy link
Member

Thanks!

@bruvzg bruvzg deleted the mono_force_ent branch July 9, 2021 22:00
@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jul 10, 2021
@akien-mga
Copy link
Member

Cherry-picked for 3.4.

@Calinou
Copy link
Member

Calinou commented Sep 3, 2021

Should this be cherry-picked to 3.3? See #52366.

@akien-mga
Copy link
Member

Cherry-picked for 3.3.4.

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

Successfully merging this pull request may close these issues.

3 participants