summaryrefslogtreecommitdiff
path: root/platform/osx
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-03-29 00:48:46 +0200
committerGitHub <noreply@github.com>2021-03-29 00:48:46 +0200
commit02471ba44d4b00af51af7bb3061437c6001d2c88 (patch)
tree1df253223bc7e602cb2e8c4f5edc46bef4dcbb99 /platform/osx
parentb253aca53f4590b173b110017eb5095a5a6059a0 (diff)
parent09c8e69232ff5ec0c72c80d8b48168545876d5d4 (diff)
Merge pull request #47446 from bruvzg/macos_sign_exports_by_default
[macOS] Enable code signing by default, use ad-hoc signature if no identity specified.
Diffstat (limited to 'platform/osx')
-rw-r--r--platform/osx/export/export.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index 6ac98cae9c..aca9471849 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -155,7 +155,7 @@ void EditorExportPlatformOSX::get_export_options(List<ExportOption> *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));
@@ -487,7 +487,11 @@ Error EditorExportPlatformOSX::_code_sign(const Ref<EditorExportPreset> &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 */
@@ -1060,12 +1064,6 @@ bool EditorExportPlatformOSX::can_export(const Ref<EditorExportPreset> &p_preset
}
bool sign_enabled = p_preset->get("codesign/enable");
- if (sign_enabled) {
- if (p_preset->get("codesign/identity") == "") {
- err += TTR("Codesign: identity not specified.") + "\n";
- valid = false;
- }
- }
bool noto_enabled = p_preset->get("notarization/enable");
if (noto_enabled) {
if (!sign_enabled) {