mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Build: Provide option to suppress resourceUsage keys in AU plists
This commit is contained in:
parent
6cb364e33f
commit
ba172bc828
7 changed files with 27 additions and 3 deletions
|
|
@ -480,6 +480,13 @@ attributes directly to these creation functions, rather than adding them later.
|
||||||
- `AU_SANDBOX_SAFE`
|
- `AU_SANDBOX_SAFE`
|
||||||
- May be either TRUE or FALSE. Adds the appropriate entries to an AU plugin's Info.plist.
|
- 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`
|
- `AAX_CATEGORY`
|
||||||
- Should be one of: `AAX_ePlugInCategory_None`, `AAX_ePlugInCategory_EQ`,
|
- Should be one of: `AAX_ePlugInCategory_None`, `AAX_ePlugInCategory_EQ`,
|
||||||
`AAX_ePlugInCategory_Dynamics`, `AAX_ePlugInCategory_PitchShift`, `AAX_ePlugInCategory_Reverb`,
|
`AAX_ePlugInCategory_Dynamics`, `AAX_ePlugInCategory_PitchShift`, `AAX_ePlugInCategory_Reverb`,
|
||||||
|
|
|
||||||
|
|
@ -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 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_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 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 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_ENABLED ${target} JUCE_APP_SANDBOX_ENABLED)
|
||||||
_juce_append_target_property(file_content APP_SANDBOX_INHERIT ${target} JUCE_APP_SANDBOX_INHERIT)
|
_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} 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} HARDENED_RUNTIME_ENABLED NO)
|
||||||
_juce_set_property_if_not_set(${target} APP_SANDBOX_ENABLED NO)
|
_juce_set_property_if_not_set(${target} APP_SANDBOX_ENABLED NO)
|
||||||
_juce_set_property_if_not_set(${target} APP_SANDBOX_INHERIT 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_MAIN_TYPE
|
||||||
AU_EXPORT_PREFIX
|
AU_EXPORT_PREFIX
|
||||||
AU_SANDBOX_SAFE
|
AU_SANDBOX_SAFE
|
||||||
|
SUPPRESS_AU_PLIST_RESOURCE_USAGE
|
||||||
AAX_CATEGORY
|
AAX_CATEGORY
|
||||||
PLUGINHOST_AU # Set this true if you want to host AU plugins
|
PLUGINHOST_AU # Set this true if you want to host AU plugins
|
||||||
USE_LEGACY_COMPATIBILITY_PLUGIN_CODE
|
USE_LEGACY_COMPATIBILITY_PLUGIN_CODE
|
||||||
|
|
|
||||||
|
|
@ -302,7 +302,7 @@ namespace build_tools
|
||||||
{
|
{
|
||||||
addPlistDictionaryKey (*dict, "sandboxSafe", true);
|
addPlistDictionaryKey (*dict, "sandboxSafe", true);
|
||||||
}
|
}
|
||||||
else
|
else if (! suppressResourceUsage)
|
||||||
{
|
{
|
||||||
dict->createNewChildElement ("key")->addTextElement ("resourceUsage");
|
dict->createNewChildElement ("key")->addTextElement ("resourceUsage");
|
||||||
auto* resourceUsageDict = dict->createNewChildElement ("dict");
|
auto* resourceUsageDict = dict->createNewChildElement ("dict");
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@ namespace build_tools
|
||||||
String auMainType;
|
String auMainType;
|
||||||
bool isAuSandboxSafe = false;
|
bool isAuSandboxSafe = false;
|
||||||
bool isPluginSynth = false;
|
bool isPluginSynth = false;
|
||||||
|
bool suppressResourceUsage = false;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void write (MemoryOutputStream&) const;
|
void write (MemoryOutputStream&) const;
|
||||||
|
|
|
||||||
|
|
@ -260,6 +260,7 @@ juce::build_tools::PlistOptions parsePlistOptions (const juce::File& file,
|
||||||
updateField ("PLUGIN_AU_MAIN_TYPE", result.auMainType);
|
updateField ("PLUGIN_AU_MAIN_TYPE", result.auMainType);
|
||||||
updateField ("IS_AU_SANDBOX_SAFE", result.isAuSandboxSafe);
|
updateField ("IS_AU_SANDBOX_SAFE", result.isAuSandboxSafe);
|
||||||
updateField ("IS_PLUGIN_SYNTH", result.isPluginSynth);
|
updateField ("IS_PLUGIN_SYNTH", result.isPluginSynth);
|
||||||
|
updateField ("SUPPRESS_AU_PLIST_RESOURCE_USAGE", result.suppressResourceUsage);
|
||||||
updateField ("BUNDLE_ID", result.bundleIdentifier);
|
updateField ("BUNDLE_ID", result.bundleIdentifier);
|
||||||
updateField ("ICON_FILE", result.iconFile);
|
updateField ("ICON_FILE", result.iconFile);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,8 @@ public:
|
||||||
keepCustomXcodeSchemesValue (settings, Ids::keepCustomXcodeSchemes, getUndoManager()),
|
keepCustomXcodeSchemesValue (settings, Ids::keepCustomXcodeSchemes, getUndoManager()),
|
||||||
useHeaderMapValue (settings, Ids::useHeaderMap, getUndoManager()),
|
useHeaderMapValue (settings, Ids::useHeaderMap, getUndoManager()),
|
||||||
customLaunchStoryboardValue (settings, Ids::customLaunchStoryboard, getUndoManager()),
|
customLaunchStoryboardValue (settings, Ids::customLaunchStoryboard, getUndoManager()),
|
||||||
exporterBundleIdentifierValue (settings, Ids::bundleIdentifier, getUndoManager())
|
exporterBundleIdentifierValue (settings, Ids::bundleIdentifier, getUndoManager()),
|
||||||
|
suppressPlistResourceUsage (settings, Ids::suppressPlistResourceUsage, getUndoManager())
|
||||||
{
|
{
|
||||||
if (iOS)
|
if (iOS)
|
||||||
{
|
{
|
||||||
|
|
@ -268,6 +269,8 @@ public:
|
||||||
bool isDocumentBrowserEnabled() const { return uiSupportsDocumentBrowserValue.get(); }
|
bool isDocumentBrowserEnabled() const { return uiSupportsDocumentBrowserValue.get(); }
|
||||||
bool isStatusBarHidden() const { return uiStatusBarHiddenValue.get(); }
|
bool isStatusBarHidden() const { return uiStatusBarHiddenValue.get(); }
|
||||||
|
|
||||||
|
bool getSuppressPlistResourceUsage() const { return suppressPlistResourceUsage.get(); }
|
||||||
|
|
||||||
String getDocumentExtensionsString() const { return documentExtensionsValue.get(); }
|
String getDocumentExtensionsString() const { return documentExtensionsValue.get(); }
|
||||||
|
|
||||||
bool shouldKeepCustomXcodeSchemes() const { return keepCustomXcodeSchemesValue.get(); }
|
bool shouldKeepCustomXcodeSchemes() const { return keepCustomXcodeSchemesValue.get(); }
|
||||||
|
|
@ -567,6 +570,12 @@ public:
|
||||||
props.add (new TextPropertyComponent (pListPrefixHeaderValue, "PList Prefix Header", 512, false),
|
props.add (new TextPropertyComponent (pListPrefixHeaderValue, "PList Prefix Header", 512, false),
|
||||||
"Header file containing definitions used in plist file (see PList Preprocess).");
|
"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),
|
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. "
|
"A comma-separated list of extra system frameworks that should be added to the build. "
|
||||||
"(Don't include the .framework extension in the name)"
|
"(Don't include the .framework extension in the name)"
|
||||||
|
|
@ -1742,6 +1751,7 @@ public:
|
||||||
options.auMainType = owner.project.getAUMainTypeString();
|
options.auMainType = owner.project.getAUMainTypeString();
|
||||||
options.isAuSandboxSafe = owner.project.isAUSandBoxSafe();
|
options.isAuSandboxSafe = owner.project.isAUSandBoxSafe();
|
||||||
options.isPluginSynth = owner.project.isPluginSynth();
|
options.isPluginSynth = owner.project.isPluginSynth();
|
||||||
|
options.suppressResourceUsage = owner.getSuppressPlistResourceUsage();
|
||||||
|
|
||||||
options.write (infoPlistFile);
|
options.write (infoPlistFile);
|
||||||
}
|
}
|
||||||
|
|
@ -1951,7 +1961,7 @@ private:
|
||||||
uiFileSharingEnabledValue, uiSupportsDocumentBrowserValue, uiStatusBarHiddenValue, documentExtensionsValue, iosInAppPurchasesValue,
|
uiFileSharingEnabledValue, uiSupportsDocumentBrowserValue, uiStatusBarHiddenValue, documentExtensionsValue, iosInAppPurchasesValue,
|
||||||
iosContentSharingValue, iosBackgroundAudioValue, iosBackgroundBleValue, iosPushNotificationsValue, iosAppGroupsValue, iCloudPermissionsValue,
|
iosContentSharingValue, iosBackgroundAudioValue, iosBackgroundBleValue, iosPushNotificationsValue, iosAppGroupsValue, iCloudPermissionsValue,
|
||||||
iosDevelopmentTeamIDValue, iosAppGroupsIDValue, keepCustomXcodeSchemesValue, useHeaderMapValue, customLaunchStoryboardValue,
|
iosDevelopmentTeamIDValue, iosAppGroupsIDValue, keepCustomXcodeSchemesValue, useHeaderMapValue, customLaunchStoryboardValue,
|
||||||
exporterBundleIdentifierValue;
|
exporterBundleIdentifierValue, suppressPlistResourceUsage;
|
||||||
|
|
||||||
static String sanitisePath (const String& path)
|
static String sanitisePath (const String& path)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -357,6 +357,7 @@ namespace Ids
|
||||||
DECLARE_ID (pluginAAXDisableMultiMono);
|
DECLARE_ID (pluginAAXDisableMultiMono);
|
||||||
DECLARE_ID (pluginVSTNumMidiInputs);
|
DECLARE_ID (pluginVSTNumMidiInputs);
|
||||||
DECLARE_ID (pluginVSTNumMidiOutputs);
|
DECLARE_ID (pluginVSTNumMidiOutputs);
|
||||||
|
DECLARE_ID (suppressPlistResourceUsage);
|
||||||
DECLARE_ID (exporters);
|
DECLARE_ID (exporters);
|
||||||
DECLARE_ID (website);
|
DECLARE_ID (website);
|
||||||
DECLARE_ID (mainClass);
|
DECLARE_ID (mainClass);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue