Skip to content

Commit

Permalink
Projucer (Xcode): Only code-sign a copy of a plugin when `EXPANDED_CO…
Browse files Browse the repository at this point in the history
…DE_SIGN_IDENTITY` is available
  • Loading branch information
Anthony-Nicholls authored and tpoole committed Apr 15, 2024
1 parent ae51448 commit 3b7aaee
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 3b7aaee

Please sign in to comment.