Skip to content

Commit de44c20

Browse files
committed
Merge pull request #95498 from LeonardoDemartino/fix_macos_dylibsigning
macOS: Only set entitlements for main binaries, fixing C# signing issues
2 parents 63397b5 + 0a57dd4 commit de44c20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

platform/macos/export/export_plugin.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ void EditorExportPlatformMacOS::_code_sign(const Ref<EditorExportPreset> &p_pres
10921092
List<String> args;
10931093
args.push_back("sign");
10941094

1095-
if (p_path.get_extension() != "dmg") {
1095+
if (!p_ent_path.is_empty()) {
10961096
args.push_back("--entitlements-xml-path");
10971097
args.push_back(p_ent_path);
10981098
}
@@ -1153,7 +1153,7 @@ void EditorExportPlatformMacOS::_code_sign(const Ref<EditorExportPreset> &p_pres
11531153
args.push_back("runtime");
11541154
}
11551155

1156-
if (p_path.get_extension() != "dmg") {
1156+
if (!p_ent_path.is_empty()) {
11571157
args.push_back("--entitlements");
11581158
args.push_back(p_ent_path);
11591159
}
@@ -1237,7 +1237,7 @@ void EditorExportPlatformMacOS::_code_sign_directory(const Ref<EditorExportPrese
12371237
}
12381238

12391239
if (extensions_to_sign.has(current_file.get_extension())) {
1240-
String ent_path = p_ent_path;
1240+
String ent_path;
12411241
bool set_bundle_id = false;
12421242
if (sandbox && FileAccess::exists(current_file_path)) {
12431243
int ftype = MachO::get_filetype(current_file_path);
@@ -1357,7 +1357,7 @@ Error EditorExportPlatformMacOS::_copy_and_sign_files(Ref<DirAccess> &dir_access
13571357
_code_sign_directory(p_preset, p_in_app_path, p_ent_path, p_helper_ent_path, p_should_error_on_non_code_sign);
13581358
} else {
13591359
if (extensions_to_sign.has(p_in_app_path.get_extension())) {
1360-
String ent_path = p_ent_path;
1360+
String ent_path;
13611361
bool set_bundle_id = false;
13621362
if (p_sandbox && FileAccess::exists(p_in_app_path)) {
13631363
int ftype = MachO::get_filetype(p_in_app_path);

0 commit comments

Comments
 (0)