From 7447c3b76cbba3d39f6a6844d68925b42218d025 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 29 Mar 2021 00:04:48 +0300 Subject: [PATCH] [macOS] Enable code signing by default, use ad-hoc signature if no identity specified. (cherry picked from commit 09c8e69232ff5ec0c72c80d8b48168545876d5d4) --- platform/osx/export/export.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index 135f064a522..b72991ddf9c 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -135,7 +135,7 @@ void EditorExportPlatformOSX::get_export_options(List *r_options) r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/microphone_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need to use the microphone"), "")); #ifdef OSX_ENABLED - r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/enable"), false)); + r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/enable"), true)); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/identity", PROPERTY_HINT_PLACEHOLDER_TEXT, "Type: Name (ID)"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/timestamp"), true)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/hardened_runtime"), true)); @@ -420,7 +420,11 @@ Error EditorExportPlatformOSX::_code_sign(const Ref &p_prese } args.push_back("-s"); - args.push_back(p_preset->get("codesign/identity")); + if (p_preset->get("codesign/identity") == "") { + args.push_back("-"); + } else { + args.push_back(p_preset->get("codesign/identity")); + } args.push_back("-v"); /* provide some more feedback */