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 export] Fix GDExtension framework +x flag errors, allow recursive signing on non macOS platform. #81969

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions platform/macos/export/export_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down Expand Up @@ -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()) {
Expand Down Expand Up @@ -1185,7 +1186,6 @@ Error EditorExportPlatformMacOS::_code_sign_directory(const Ref<EditorExportPres

current_file = dir_access->get_next();
}
#endif

return OK;
}
Expand Down Expand Up @@ -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);
}
Expand Down