Browse Source

AU: Added an option to the Projucer to enable sandbox safe AUs (required for newer versions of GarageBand)

tags/2021-05-28
hogliux 7 years ago
parent
commit
fefbbc89b4
5 changed files with 17 additions and 1 deletions
  1. +10
    -0
      extras/Projucer/Source/Project/jucer_Project.cpp
  2. +2
    -1
      extras/Projucer/Source/Project/jucer_Project.h
  3. +3
    -0
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h
  4. +1
    -0
      extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h
  5. +1
    -0
      extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.cpp

+ 10
- 0
extras/Projucer/Source/Project/jucer_Project.cpp View File

@@ -249,6 +249,7 @@ void Project::initialiseAudioPluginValues()
CodeHelpers::makeValidIdentifier (getProjectNameString(), false, true, false) + "AU");
pluginAUMainTypeValue.referTo (projectRoot, Ids::pluginAUMainType, getUndoManager(), getDefaultAUMainTypes(), ",");
pluginAUSandboxSafe.referTo (projectRoot, Ids::pluginAUIsSandboxSafe, getUndoManager(), false);
pluginVSTCategoryValue.referTo (projectRoot, Ids::pluginVSTCategory, getUndoManager(), getDefaultVSTCategories(), ",");
pluginVST3CategoryValue.referTo (projectRoot, Ids::pluginVST3Category, getUndoManager(), getDefaultVST3Categories(), ",");
pluginRTASCategoryValue.referTo (projectRoot, Ids::pluginRTASCategory, getUndoManager(), getDefaultRTASCategories(), ",");
@@ -1062,6 +1063,10 @@ void Project::createAudioPluginPropertyEditors (PropertyListBuilder& props)
props.add (new MultiChoicePropertyComponent (pluginAUMainTypeValue, "Plugin AU Main Type", getAllAUMainTypeStrings(), getAllAUMainTypeVars(), 1),
"AU main type.");
props.add (new ChoicePropertyComponent (pluginAUSandboxSafe, "Plugin AU is sandbox safe"),
"Check this box if your plug-in is sandbox safe. A sand-box safe plug-in is loaded in a restricted path and can only access it's own bundle resources and "
"the Music folder. Your plug-in must be able to deal with this. Newer versions of GarageBand require this to be enabled.");
{
Array<var> vst3CategoryVars;
for (auto s : getAllVST3CategoryStrings())
@@ -1626,6 +1631,11 @@ String Project::getAUMainTypeString() const noexcept
return {};
}
bool Project::isAUSandBoxSafe() const noexcept
{
return pluginAUSandboxSafe.get();
}
String Project::getVSTCategoryString() const noexcept
{
auto v = pluginVSTCategoryValue.get();


+ 2
- 1
extras/Projucer/Source/Project/jucer_Project.h View File

@@ -192,6 +192,7 @@ public:
Array<var> getDefaultRTASCategories() const noexcept;
String getAUMainTypeString() const noexcept;
bool isAUSandBoxSafe() const noexcept;
String getVSTCategoryString() const noexcept;
String getVST3CategoryString() const noexcept;
int getAAXCategory() const noexcept;
@@ -407,7 +408,7 @@ private:
ValueWithDefault pluginFormatsValue, pluginNameValue, pluginDescriptionValue, pluginManufacturerValue, pluginManufacturerCodeValue,
pluginCodeValue, pluginChannelConfigsValue, pluginCharacteristicsValue, pluginAUExportPrefixValue, pluginAAXIdentifierValue,
pluginAUMainTypeValue, pluginRTASCategoryValue, pluginVSTCategoryValue, pluginVST3CategoryValue, pluginAAXCategoryValue;
pluginAUMainTypeValue, pluginAUSandboxSafe, pluginRTASCategoryValue, pluginVSTCategoryValue, pluginVST3CategoryValue, pluginAAXCategoryValue;
//==============================================================================
std::unique_ptr<CompileEngineSettings> compileEngineSettings;


+ 3
- 0
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h View File

@@ -1565,6 +1565,9 @@ public:
addPlistDictionaryKey (dict, "subtype", pluginSubType);
addPlistDictionaryKeyInt (dict, "version", owner.project.getVersionAsHexInteger());
if (owner.project.isAUSandBoxSafe())
addPlistDictionaryKeyBool (dict, "sandboxSafe", true);
xcodeExtraPListEntries.add (plistKey);
xcodeExtraPListEntries.add (plistEntry);
}


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

@@ -320,6 +320,7 @@ namespace Ids
DECLARE_ID (pluginVST3Category);
DECLARE_ID (pluginAUExportPrefix);
DECLARE_ID (pluginAUMainType);
DECLARE_ID (pluginAUIsSandboxSafe);
DECLARE_ID (pluginRTASCategory);
DECLARE_ID (pluginRTASDisableBypass);
DECLARE_ID (pluginRTASDisableMultiMono);


+ 1
- 0
extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.cpp View File

@@ -460,6 +460,7 @@ Result PIPGenerator::setProjectSettings (ValueTree& jucerTree)
{
jucerTree.setProperty (Ids::projectType, "audioplug", nullptr);
jucerTree.setProperty (Ids::pluginManufacturer, metadata[Ids::vendor], nullptr);
jucerTree.setProperty (Ids::pluginAUIsSandboxSafe, "1", nullptr);
StringArray pluginFormatsToBuild (Ids::buildVST3.toString(), Ids::buildAU.toString(), Ids::buildStandalone.toString());
pluginFormatsToBuild.addArray (getExtraPluginFormatsToBuild());


Loading…
Cancel
Save