Browse Source

Build: Provide option to suppress resourceUsage keys in AU plists

tags/2021-05-28
reuk 4 years ago
parent
commit
ba172bc828
7 changed files with 27 additions and 3 deletions
  1. +7
    -0
      docs/CMake API.md
  2. +4
    -0
      extras/Build/CMake/JUCEUtils.cmake
  3. +1
    -1
      extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp
  4. +1
    -0
      extras/Build/juce_build_tools/utils/juce_PlistOptions.h
  5. +1
    -0
      extras/Build/juceaide/Main.cpp
  6. +12
    -2
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h
  7. +1
    -0
      extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h

+ 7
- 0
docs/CMake API.md View File

@@ -480,6 +480,13 @@ attributes directly to these creation functions, rather than adding them later.
- `AU_SANDBOX_SAFE`
- May be either TRUE or FALSE. Adds the appropriate entries to an AU plugin's Info.plist.

- `SUPPRESS_AU_PLIST_RESOURCE_USAGE`
- May be either TRUE or FALSE. Defaults to FALSE. Set this to TRUE to disable the `resourceUsage`
key in the target's plist. This is useful for AU plugins that must access resources which cannot
be declared in the resourceUsage block, such as UNIX domain sockets. In particular,
PACE-protected AU plugins may require this option to be enabled in order for the plugin to load
in GarageBand.

- `AAX_CATEGORY`
- Should be one of: `AAX_ePlugInCategory_None`, `AAX_ePlugInCategory_EQ`,
`AAX_ePlugInCategory_Dynamics`, `AAX_ePlugInCategory_PitchShift`, `AAX_ePlugInCategory_Reverb`,


+ 4
- 0
extras/Build/CMake/JUCEUtils.cmake View File

@@ -766,6 +766,7 @@ function(_juce_write_configure_time_info target)
_juce_append_target_property(file_content PLUGIN_AU_MAIN_TYPE ${target} JUCE_AU_MAIN_TYPE_CODE)
_juce_append_target_property(file_content IS_AU_SANDBOX_SAFE ${target} JUCE_AU_SANDBOX_SAFE)
_juce_append_target_property(file_content IS_PLUGIN_SYNTH ${target} JUCE_IS_SYNTH)
_juce_append_target_property(file_content SUPPRESS_AU_PLIST_RESOURCE_USAGE ${target} JUCE_SUPPRESS_AU_PLIST_RESOURCE_USAGE)
_juce_append_target_property(file_content HARDENED_RUNTIME_ENABLED ${target} JUCE_HARDENED_RUNTIME_ENABLED)
_juce_append_target_property(file_content APP_SANDBOX_ENABLED ${target} JUCE_APP_SANDBOX_ENABLED)
_juce_append_target_property(file_content APP_SANDBOX_INHERIT ${target} JUCE_APP_SANDBOX_INHERIT)
@@ -1728,6 +1729,8 @@ function(_juce_set_fallback_properties target)

_juce_set_property_if_not_set(${target} AU_SANDBOX_SAFE FALSE)

_juce_set_property_if_not_set(${target} SUPPRESS_AU_PLIST_RESOURCE_USAGE FALSE)

_juce_set_property_if_not_set(${target} HARDENED_RUNTIME_ENABLED NO)
_juce_set_property_if_not_set(${target} APP_SANDBOX_ENABLED NO)
_juce_set_property_if_not_set(${target} APP_SANDBOX_INHERIT NO)
@@ -1910,6 +1913,7 @@ function(_juce_initialise_target target)
AU_MAIN_TYPE
AU_EXPORT_PREFIX
AU_SANDBOX_SAFE
SUPPRESS_AU_PLIST_RESOURCE_USAGE
AAX_CATEGORY
PLUGINHOST_AU # Set this true if you want to host AU plugins
USE_LEGACY_COMPATIBILITY_PLUGIN_CODE


+ 1
- 1
extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp View File

@@ -302,7 +302,7 @@ namespace build_tools
{
addPlistDictionaryKey (*dict, "sandboxSafe", true);
}
else
else if (! suppressResourceUsage)
{
dict->createNewChildElement ("key")->addTextElement ("resourceUsage");
auto* resourceUsageDict = dict->createNewChildElement ("dict");


+ 1
- 0
extras/Build/juce_build_tools/utils/juce_PlistOptions.h View File

@@ -89,6 +89,7 @@ namespace build_tools
String auMainType;
bool isAuSandboxSafe = false;
bool isPluginSynth = false;
bool suppressResourceUsage = false;
private:
void write (MemoryOutputStream&) const;


+ 1
- 0
extras/Build/juceaide/Main.cpp View File

@@ -260,6 +260,7 @@ juce::build_tools::PlistOptions parsePlistOptions (const juce::File& file,
updateField ("PLUGIN_AU_MAIN_TYPE", result.auMainType);
updateField ("IS_AU_SANDBOX_SAFE", result.isAuSandboxSafe);
updateField ("IS_PLUGIN_SYNTH", result.isPluginSynth);
updateField ("SUPPRESS_AU_PLIST_RESOURCE_USAGE", result.suppressResourceUsage);
updateField ("BUNDLE_ID", result.bundleIdentifier);
updateField ("ICON_FILE", result.iconFile);


+ 12
- 2
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h View File

@@ -181,7 +181,8 @@ public:
keepCustomXcodeSchemesValue (settings, Ids::keepCustomXcodeSchemes, getUndoManager()),
useHeaderMapValue (settings, Ids::useHeaderMap, getUndoManager()),
customLaunchStoryboardValue (settings, Ids::customLaunchStoryboard, getUndoManager()),
exporterBundleIdentifierValue (settings, Ids::bundleIdentifier, getUndoManager())
exporterBundleIdentifierValue (settings, Ids::bundleIdentifier, getUndoManager()),
suppressPlistResourceUsage (settings, Ids::suppressPlistResourceUsage, getUndoManager())
{
if (iOS)
{
@@ -268,6 +269,8 @@ public:
bool isDocumentBrowserEnabled() const { return uiSupportsDocumentBrowserValue.get(); }
bool isStatusBarHidden() const { return uiStatusBarHiddenValue.get(); }
bool getSuppressPlistResourceUsage() const { return suppressPlistResourceUsage.get(); }
String getDocumentExtensionsString() const { return documentExtensionsValue.get(); }
bool shouldKeepCustomXcodeSchemes() const { return keepCustomXcodeSchemesValue.get(); }
@@ -567,6 +570,12 @@ public:
props.add (new TextPropertyComponent (pListPrefixHeaderValue, "PList Prefix Header", 512, false),
"Header file containing definitions used in plist file (see PList Preprocess).");
props.add (new ChoicePropertyComponent (suppressPlistResourceUsage, "Suppress AudioUnit Plist resourceUsage Key"),
"Suppress the resourceUsage key in the target's generated Plist. This is useful for AU"
" plugins that must access resources which cannot be declared in the resourceUsage block, such"
" as UNIX domain sockets. In particular, PACE-protected AU plugins may require this option to be enabled"
" in order for the plugin to load in GarageBand.");
props.add (new TextPropertyComponent (extraFrameworksValue, "Extra System Frameworks", 2048, false),
"A comma-separated list of extra system frameworks that should be added to the build. "
"(Don't include the .framework extension in the name)"
@@ -1742,6 +1751,7 @@ public:
options.auMainType = owner.project.getAUMainTypeString();
options.isAuSandboxSafe = owner.project.isAUSandBoxSafe();
options.isPluginSynth = owner.project.isPluginSynth();
options.suppressResourceUsage = owner.getSuppressPlistResourceUsage();
options.write (infoPlistFile);
}
@@ -1951,7 +1961,7 @@ private:
uiFileSharingEnabledValue, uiSupportsDocumentBrowserValue, uiStatusBarHiddenValue, documentExtensionsValue, iosInAppPurchasesValue,
iosContentSharingValue, iosBackgroundAudioValue, iosBackgroundBleValue, iosPushNotificationsValue, iosAppGroupsValue, iCloudPermissionsValue,
iosDevelopmentTeamIDValue, iosAppGroupsIDValue, keepCustomXcodeSchemesValue, useHeaderMapValue, customLaunchStoryboardValue,
exporterBundleIdentifierValue;
exporterBundleIdentifierValue, suppressPlistResourceUsage;
static String sanitisePath (const String& path)
{


+ 1
- 0
extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h View File

@@ -357,6 +357,7 @@ namespace Ids
DECLARE_ID (pluginAAXDisableMultiMono);
DECLARE_ID (pluginVSTNumMidiInputs);
DECLARE_ID (pluginVSTNumMidiOutputs);
DECLARE_ID (suppressPlistResourceUsage);
DECLARE_ID (exporters);
DECLARE_ID (website);
DECLARE_ID (mainClass);


Loading…
Cancel
Save