summaryrefslogtreecommitdiffstats
path: root/platform/macos/export
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2023-09-20 12:12:50 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2023-09-20 12:21:18 +0300
commitf3162838230d796dba2ee774730da35ac1cadc3f (patch)
treebebda2c417af54e12a3f2071e6579b0f82a89266 /platform/macos/export
parent571cd0eb791b37e9a8adda9f909251138170f6b7 (diff)
downloadredot-engine-f3162838230d796dba2ee774730da35ac1cadc3f.tar.gz
[macOS export] Fix GDExtension framework +x flag errors, allow recursive signing on non macOS platform.
Diffstat (limited to 'platform/macos/export')
-rw-r--r--platform/macos/export/export_plugin.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp
index 559c2c4e62..fb64b68971 100644
--- a/platform/macos/export/export_plugin.cpp
+++ b/platform/macos/export/export_plugin.cpp
@@ -1046,6 +1046,8 @@ Error EditorExportPlatformMacOS::_code_sign(const Ref<EditorExportPreset> &p_pre
args.push_back("--p12-password");
args.push_back(certificate_pass);
}
+ args.push_back("--code-signature-flags");
+ args.push_back("runtime");
args.push_back("-v"); /* provide some more feedback */
@@ -1138,7 +1140,6 @@ Error EditorExportPlatformMacOS::_code_sign(const Ref<EditorExportPreset> &p_pre
Error EditorExportPlatformMacOS::_code_sign_directory(const Ref<EditorExportPreset> &p_preset, const String &p_path,
const String &p_ent_path, bool p_should_error_on_non_code) {
-#ifdef MACOS_ENABLED
static Vector<String> extensions_to_sign;
if (extensions_to_sign.is_empty()) {
@@ -1185,7 +1186,6 @@ Error EditorExportPlatformMacOS::_code_sign_directory(const Ref<EditorExportPres
current_file = dir_access->get_next();
}
-#endif
return OK;
}
@@ -1224,7 +1224,7 @@ Error EditorExportPlatformMacOS::_copy_and_sign_files(Ref<DirAccess> &dir_access
if (extensions_to_sign.find(p_in_app_path.get_extension()) > -1) {
err = _code_sign(p_preset, p_in_app_path, p_ent_path, false);
}
- if (is_executable(p_in_app_path)) {
+ if (dir_access->file_exists(p_in_app_path) && is_executable(p_in_app_path)) {
// chmod with 0755 if the file is executable.
FileAccess::set_unix_permissions(p_in_app_path, 0755);
}