From 0a57dd4682985d1be4b831c100c03121233535a7 Mon Sep 17 00:00:00 2001 From: Leonardo Demartino Date: Tue, 13 Aug 2024 16:55:27 -0300 Subject: [PATCH] Only main binaries require entitlements. This fixes signing issues on macOS. --- platform/macos/export/export_plugin.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp index 2ff02d2e74a..057fb4ec165 100644 --- a/platform/macos/export/export_plugin.cpp +++ b/platform/macos/export/export_plugin.cpp @@ -1092,7 +1092,7 @@ void EditorExportPlatformMacOS::_code_sign(const Ref &p_pres List args; args.push_back("sign"); - if (p_path.get_extension() != "dmg") { + if (!p_ent_path.is_empty()) { args.push_back("--entitlements-xml-path"); args.push_back(p_ent_path); } @@ -1153,7 +1153,7 @@ void EditorExportPlatformMacOS::_code_sign(const Ref &p_pres args.push_back("runtime"); } - if (p_path.get_extension() != "dmg") { + if (!p_ent_path.is_empty()) { args.push_back("--entitlements"); args.push_back(p_ent_path); } @@ -1237,7 +1237,7 @@ void EditorExportPlatformMacOS::_code_sign_directory(const Ref &dir_access _code_sign_directory(p_preset, p_in_app_path, p_ent_path, p_helper_ent_path, p_should_error_on_non_code_sign); } else { if (extensions_to_sign.has(p_in_app_path.get_extension())) { - String ent_path = p_ent_path; + String ent_path; bool set_bundle_id = false; if (p_sandbox && FileAccess::exists(p_in_app_path)) { int ftype = MachO::get_filetype(p_in_app_path);