mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Fixed an issue when using the macOS hardened runtime in plug-in projects
This commit is contained in:
parent
7d2310795f
commit
2c4ccf7b77
1 changed files with 15 additions and 14 deletions
|
|
@ -977,6 +977,11 @@ public:
|
|||
return String ("Info-") + String (getName()).replace (" ", "_") + String (".plist");
|
||||
}
|
||||
|
||||
String getEntitlementsFilename() const
|
||||
{
|
||||
return String (getName()).replace (" ", "_") + String (".entitlements");
|
||||
}
|
||||
|
||||
String xcodePackageType, xcodeBundleSignature, xcodeBundleExtension;
|
||||
String xcodeProductType, xcodeFileType;
|
||||
String xcodeOtherRezFlags, xcodeBundleIDSubPath;
|
||||
|
|
@ -1356,7 +1361,7 @@ public:
|
|||
s.set ("DEVELOPMENT_TEAM", owner.getDevelopmentTeamIDString());
|
||||
|
||||
if (shouldAddEntitlements())
|
||||
s.set ("CODE_SIGN_ENTITLEMENTS", owner.getEntitlementsFileName().quoted());
|
||||
s.set ("CODE_SIGN_ENTITLEMENTS", getEntitlementsFilename().quoted());
|
||||
|
||||
{
|
||||
auto cppStandard = owner.project.getCppStandardString();
|
||||
|
|
@ -2128,7 +2133,8 @@ private:
|
|||
|
||||
void addFilesAndGroupsToProject (StringArray& topLevelGroupIDs) const
|
||||
{
|
||||
addEntitlementsFile();
|
||||
for (auto* target : targets)
|
||||
addEntitlementsFile (*target);
|
||||
|
||||
for (auto& group : getAllGroups())
|
||||
{
|
||||
|
|
@ -3081,12 +3087,7 @@ private:
|
|||
return {};
|
||||
}
|
||||
|
||||
String getEntitlementsFileName() const
|
||||
{
|
||||
return project.getProjectFilenameRootString() + String (".entitlements");
|
||||
}
|
||||
|
||||
StringPairArray getEntitlements() const
|
||||
StringPairArray getEntitlements (XcodeTarget& target) const
|
||||
{
|
||||
StringPairArray entitlements;
|
||||
|
||||
|
|
@ -3097,7 +3098,7 @@ private:
|
|||
if (project.shouldEnableIAA())
|
||||
entitlements.set ("inter-app-audio", "<true/>");
|
||||
}
|
||||
else
|
||||
else if (target.type == XcodeTarget::AudioUnitv3PlugIn)
|
||||
{
|
||||
entitlements.set ("com.apple.security.app-sandbox", "<true/>");
|
||||
}
|
||||
|
|
@ -3152,7 +3153,7 @@ private:
|
|||
return entitlements;
|
||||
}
|
||||
|
||||
String addEntitlementsFile() const
|
||||
String addEntitlementsFile (XcodeTarget& target) const
|
||||
{
|
||||
String content =
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||
|
|
@ -3160,7 +3161,7 @@ private:
|
|||
"<plist version=\"1.0\">\n"
|
||||
"<dict>\n";
|
||||
|
||||
auto entitlements = getEntitlements();
|
||||
auto entitlements = getEntitlements (target);
|
||||
auto keys = entitlements.getAllKeys();
|
||||
|
||||
for (auto& key : keys)
|
||||
|
|
@ -3171,11 +3172,11 @@ private:
|
|||
content += "</dict>\n"
|
||||
"</plist>\n";
|
||||
|
||||
auto entitlementsFile = getTargetFolder().getChildFile (getEntitlementsFileName());
|
||||
auto entitlementsFile = getTargetFolder().getChildFile (target.getEntitlementsFilename());
|
||||
overwriteFileIfDifferentOrThrow (entitlementsFile, content);
|
||||
|
||||
RelativePath plistPath (entitlementsFile, getTargetFolder(), RelativePath::buildTargetFolder);
|
||||
return addFile (plistPath, false, false, false, false, nullptr, {});
|
||||
RelativePath entitlementsPath (entitlementsFile, getTargetFolder(), RelativePath::buildTargetFolder);
|
||||
return addFile (entitlementsPath, false, false, false, false, nullptr, {});
|
||||
}
|
||||
|
||||
String addProjectItem (const Project::Item& projectItem) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue