| @@ -49,7 +49,7 @@ namespace build_tools | |||
| if (isiOS) | |||
| { | |||
| if (isAudioPluginProject && shouldEnableIAA) | |||
| if ((isAudioPluginProject && shouldEnableIAA) || isAUPluginHost) | |||
| entitlements.set ("inter-app-audio", "<true/>"); | |||
| if (isiCloudPermissionsEnabled) | |||
| @@ -36,6 +36,7 @@ namespace build_tools | |||
| bool isiOS = false; | |||
| bool isAudioPluginProject = false; | |||
| bool shouldEnableIAA = false; | |||
| bool isAUPluginHost = false; | |||
| bool isiCloudPermissionsEnabled = false; | |||
| bool isPushNotificationsEnabled = false; | |||
| bool isAppGroupsEnabled = false; | |||
| @@ -103,6 +103,7 @@ Project::Project (const File& f) | |||
| setFile (f); | |||
| createEnabledModulesList(); | |||
| initialiseProjectValues(); | |||
| initialiseMainGroup(); | |||
| initialiseAudioPluginValues(); | |||
| @@ -677,6 +678,7 @@ Result Project::loadDocument (const File& file) | |||
| projectRoot = newTree; | |||
| projectRoot.addListener (this); | |||
| createEnabledModulesList(); | |||
| initialiseProjectValues(); | |||
| initialiseMainGroup(); | |||
| initialiseAudioPluginValues(); | |||
| @@ -2324,27 +2326,27 @@ int Project::getARATransformationFlags() const noexcept | |||
| } | |||
| //============================================================================== | |||
| bool Project::isAUPluginHost() | |||
| bool Project::isAUPluginHost() const | |||
| { | |||
| return getEnabledModules().isModuleEnabled ("juce_audio_processors") && isConfigFlagEnabled ("JUCE_PLUGINHOST_AU", false); | |||
| } | |||
| bool Project::isVSTPluginHost() | |||
| bool Project::isVSTPluginHost() const | |||
| { | |||
| return getEnabledModules().isModuleEnabled ("juce_audio_processors") && isConfigFlagEnabled ("JUCE_PLUGINHOST_VST", false); | |||
| } | |||
| bool Project::isVST3PluginHost() | |||
| bool Project::isVST3PluginHost() const | |||
| { | |||
| return getEnabledModules().isModuleEnabled ("juce_audio_processors") && isConfigFlagEnabled ("JUCE_PLUGINHOST_VST3", false); | |||
| } | |||
| bool Project::isLV2PluginHost() | |||
| bool Project::isLV2PluginHost() const | |||
| { | |||
| return getEnabledModules().isModuleEnabled ("juce_audio_processors") && isConfigFlagEnabled ("JUCE_PLUGINHOST_LV2", false); | |||
| } | |||
| bool Project::isARAPluginHost() | |||
| bool Project::isARAPluginHost() const | |||
| { | |||
| return (isVST3PluginHost() || isAUPluginHost()) && isConfigFlagEnabled ("JUCE_PLUGINHOST_ARA", false); | |||
| } | |||
| @@ -2505,12 +2507,21 @@ Array<var> Project::getDefaultARATransformationFlags() const noexcept | |||
| } | |||
| //============================================================================== | |||
| EnabledModulesList& Project::getEnabledModules() | |||
| template <typename This> | |||
| auto& Project::getEnabledModulesImpl (This& t) | |||
| { | |||
| if (enabledModulesList == nullptr) | |||
| enabledModulesList.reset (new EnabledModulesList (*this, projectRoot.getOrCreateChildWithName (Ids::MODULES, nullptr))); | |||
| // This won't work until you've loaded a project! | |||
| jassert (t.enabledModulesList != nullptr); | |||
| return *enabledModulesList; | |||
| return *t.enabledModulesList; | |||
| } | |||
| EnabledModulesList& Project::getEnabledModules() { return getEnabledModulesImpl (*this); } | |||
| const EnabledModulesList& Project::getEnabledModules() const { return getEnabledModulesImpl (*this); } | |||
| void Project::createEnabledModulesList() | |||
| { | |||
| enabledModulesList = std::make_unique<EnabledModulesList> (*this, projectRoot.getOrCreateChildWithName (Ids::MODULES, nullptr)); | |||
| } | |||
| static StringArray getModulePathsFromExporters (Project& project, bool onlyThisOS) | |||
| @@ -339,11 +339,11 @@ public: | |||
| String getLV2URI() const { return pluginLV2URIValue.get(); } | |||
| //============================================================================== | |||
| bool isAUPluginHost(); | |||
| bool isVSTPluginHost(); | |||
| bool isVST3PluginHost(); | |||
| bool isLV2PluginHost(); | |||
| bool isARAPluginHost(); | |||
| bool isAUPluginHost() const; | |||
| bool isVSTPluginHost() const; | |||
| bool isVST3PluginHost() const; | |||
| bool isLV2PluginHost() const; | |||
| bool isARAPluginHost() const; | |||
| //============================================================================== | |||
| bool shouldBuildTargetType (build_tools::ProjectType::Target::Type targetType) const noexcept; | |||
| @@ -494,7 +494,10 @@ public: | |||
| bool isConfigFlagEnabled (const String& name, bool defaultIsEnabled = false) const; | |||
| //============================================================================== | |||
| EnabledModulesList& getEnabledModules(); | |||
| void createEnabledModulesList(); | |||
| EnabledModulesList& getEnabledModules(); | |||
| const EnabledModulesList& getEnabledModules() const; | |||
| AvailableModulesList& getExporterPathsModulesList() { return exporterPathsModulesList; } | |||
| void rescanExporterPathModules (bool async = false); | |||
| @@ -547,6 +550,10 @@ private: | |||
| void valueTreeChildRemoved (ValueTree&, ValueTree&, int) override; | |||
| void valueTreeChildOrderChanged (ValueTree&, int, int) override; | |||
| //============================================================================== | |||
| template <typename This> | |||
| static auto& getEnabledModulesImpl (This&); | |||
| //============================================================================== | |||
| struct ProjectFileModificationPoller : private Timer | |||
| { | |||
| @@ -1316,7 +1316,9 @@ public: | |||
| capabilities["ApplicationGroups.iOS"] = owner.iOS && owner.isAppGroupsEnabled(); | |||
| capabilities["InAppPurchase"] = owner.isInAppPurchasesEnabled(); | |||
| capabilities["InterAppAudio"] = owner.iOS && type == Target::StandalonePlugIn && owner.getProject().shouldEnableIAA(); | |||
| capabilities["InterAppAudio"] = owner.iOS && ((type == Target::StandalonePlugIn | |||
| && owner.getProject().shouldEnableIAA()) | |||
| || owner.getProject().isAUPluginHost()); | |||
| capabilities["Push"] = owner.isPushNotificationsEnabled(); | |||
| capabilities["Sandbox"] = type == Target::AudioUnitv3PlugIn || owner.isAppSandboxEnabled(); | |||
| capabilities["HardenedRuntime"] = owner.isHardenedRuntimeEnabled(); | |||
| @@ -1377,7 +1379,8 @@ public: | |||
| || owner.isAppSandboxEnabled() | |||
| || owner.isHardenedRuntimeEnabled() | |||
| || owner.isNetworkingMulticastEnabled() | |||
| || (owner.isiOS() && owner.isiCloudPermissionsEnabled())) | |||
| || (owner.isiOS() && owner.isiCloudPermissionsEnabled()) | |||
| || (owner.isiOS() && owner.getProject().isAUPluginHost())) | |||
| return true; | |||
| if (owner.project.isAudioPluginProject() | |||
| @@ -3155,6 +3158,7 @@ private: | |||
| options.isiOS = isiOS(); | |||
| options.isAudioPluginProject = project.isAudioPluginProject(); | |||
| options.shouldEnableIAA = project.shouldEnableIAA(); | |||
| options.isAUPluginHost = project.isAUPluginHost(); | |||
| options.isiCloudPermissionsEnabled = isiCloudPermissionsEnabled(); | |||
| options.isPushNotificationsEnabled = isPushNotificationsEnabled(); | |||
| options.isAppGroupsEnabled = isAppGroupsEnabled(); | |||