From 3b7aaee7e7aafe356720bb4164c9644d274aadef Mon Sep 17 00:00:00 2001 From: Anthony Nicholls Date: Wed, 27 Mar 2024 14:51:50 +0000 Subject: [PATCH] Projucer (Xcode): Only code-sign a copy of a plugin when `EXPANDED_CODE_SIGN_IDENTITY` is available --- .../ProjectSaving/jucer_ProjectExport_Xcode.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h index e384c4ee5ed1..7cb6d4809dae 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h @@ -2590,14 +2590,16 @@ class XcodeProjectExporter final : public ProjectExporter, : "/${FULL_PRODUCT_NAME}"; const auto codesignScript = ScriptBuilder{} - .ifSet ("CODE_SIGN_ENTITLEMENTS", - R"(entitlementsArg=(--entitlements "${CODE_SIGN_ENTITLEMENTS}"))") - .echo ("Signing Identity: " + doubleQuoted ("${EXPANDED_CODE_SIGN_IDENTITY_NAME}") ) - .run ("codesign --verbose=4 --force --sign", - doubleQuoted ("${EXPANDED_CODE_SIGN_IDENTITY}"), - "${entitlementsArg[*]-}", - "${OTHER_CODE_SIGN_FLAGS-}", - doubleQuoted (installPath + objectToSignTail)); + .ifSet ("EXPANDED_CODE_SIGN_IDENTITY", + ScriptBuilder{}.ifSet ("CODE_SIGN_ENTITLEMENTS", + R"(entitlementsArg=(--entitlements "${CODE_SIGN_ENTITLEMENTS}"))") + .echo ("Signing Identity: " + doubleQuoted ("${EXPANDED_CODE_SIGN_IDENTITY_NAME}") ) + .run ("codesign --verbose=4 --force --sign", + doubleQuoted ("${EXPANDED_CODE_SIGN_IDENTITY}"), + "${entitlementsArg[*]-}", + "${OTHER_CODE_SIGN_FLAGS-}", + doubleQuoted (installPath + objectToSignTail)) + .toString()); copyPluginStepScript.ifEqual (doubleQuoted ("${CONFIGURATION}"), doubleQuoted (config->getName()), ScriptBuilder{}.insertScript (copyScript.toString())