Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 53 additions & 47 deletions extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,45 +292,44 @@ namespace juce::build_tools
plistKey.addTextElement ("AudioComponents");

XmlElement plistEntry ("array");
auto* dict = plistEntry.createNewChildElement ("dict");

auto truncatedCode = pluginManufacturerCode.substring (0, 4);
auto pluginSubType = pluginCode.substring (0, 4);
const std::vector<juce::String> auTypes { "aumu", "aumf" };
const std::vector<juce::String> subTypes { "2kXa", "2kXL" };

if (truncatedCode.toLowerCase() == truncatedCode)
for (int i = 0; i < auTypes.size(); i++)
{
throw SaveError ("AudioUnit plugin code identifiers invalid!\n\n"
"You have used only lower case letters in your AU plugin manufacturer identifier. "
"You must have at least one uppercase letter in your AU plugin manufacturer "
"identifier code.");
}
const auto auType = auTypes[i];
const auto subType = subTypes[i];

addPlistDictionaryKey (*dict, "name", pluginManufacturer + ": " + pluginName);
addPlistDictionaryKey (*dict, "description", pluginDescription);
addPlistDictionaryKey (*dict, "factoryFunction", pluginAUExportPrefix + "Factory");
addPlistDictionaryKey (*dict, "manufacturer", truncatedCode);
addPlistDictionaryKey (*dict, "type", auMainType.removeCharacters ("'"));
addPlistDictionaryKey (*dict, "subtype", pluginSubType);
addPlistDictionaryKey (*dict, "version", getAUVersionAsHexInteger (*this));
auto* dict = plistEntry.createNewChildElement ("dict");

if (isAuSandboxSafe)
{
addPlistDictionaryKey (*dict, "sandboxSafe", true);
}
else if (! suppressResourceUsage)
{
dict->createNewChildElement ("key")->addTextElement ("resourceUsage");
auto* resourceUsageDict = dict->createNewChildElement ("dict");
addPlistDictionaryKey (*dict, "name", "Izmar: VMPC2000XL AUv2");
addPlistDictionaryKey (*dict, "description", pluginDescription);
addPlistDictionaryKey (*dict, "factoryFunction", pluginAUExportPrefix + "Factory");
addPlistDictionaryKey (*dict, "manufacturer", "Izmr");
addPlistDictionaryKey (*dict, "type", auType);
addPlistDictionaryKey (*dict, "subtype", subType);
addPlistDictionaryKey (*dict, "version", getAUVersionAsHexInteger (*this));

addPlistDictionaryKey (*resourceUsageDict, "network.client", true);
addPlistDictionaryKey (*resourceUsageDict, "temporary-exception.files.all.read-write", true);
}
if (isAuSandboxSafe)
{
addPlistDictionaryKey (*dict, "sandboxSafe", true);
}
else if (! suppressResourceUsage)
{
dict->createNewChildElement ("key")->addTextElement ("resourceUsage");
auto* resourceUsageDict = dict->createNewChildElement ("dict");

if (isPluginARAEffect)
{
dict->createNewChildElement ("key")->addTextElement ("tags");
auto* tagsArray = dict->createNewChildElement ("array");
tagsArray->createNewChildElement ("string")->addTextElement ("ARA");
addPlistDictionaryKey (*resourceUsageDict, "network.client", true);
addPlistDictionaryKey (*resourceUsageDict, "temporary-exception.files.all.read-write", true);
}

if (isPluginARAEffect)
{
dict->createNewChildElement ("key")->addTextElement ("tags");
auto* tagsArray = dict->createNewChildElement ("array");
tagsArray->createNewChildElement ("string")->addTextElement ("ARA");
}
}

return { plistKey, plistEntry };
Expand All @@ -347,29 +346,36 @@ namespace juce::build_tools
addPlistDictionaryKey (plistEntry, "NSExtensionPointIdentifier", "com.apple.AudioUnit-UI");
plistEntry.createNewChildElement ("key")->addTextElement ("NSExtensionAttributes");

const std::vector<juce::String> auTypes { "aumu", "aumf" };
const std::vector<juce::String> subTypes { "2kXa", "2kXL" };
auto* dict = plistEntry.createNewChildElement ("dict");

dict->createNewChildElement ("key")->addTextElement ("AudioComponents");
auto* componentArray = dict->createNewChildElement ("array");

auto* componentDict = componentArray->createNewChildElement ("dict");

addPlistDictionaryKey (*componentDict, "name", pluginManufacturer + ": " + pluginName);
addPlistDictionaryKey (*componentDict, "description", pluginDescription);
addPlistDictionaryKey (*componentDict, "factoryFunction", pluginAUExportPrefix + "FactoryAUv3");
addPlistDictionaryKey (*componentDict, "manufacturer", pluginManufacturerCode.substring (0, 4));
addPlistDictionaryKey (*componentDict, "type", auMainType.removeCharacters ("'"));
addPlistDictionaryKey (*componentDict, "subtype", pluginCode.substring (0, 4));
addPlistDictionaryKey (*componentDict, "version", getAUVersionAsHexInteger (*this));
addPlistDictionaryKey (*componentDict, "sandboxSafe", true);
for (int i = 0; i < auTypes.size(); i++)
{
const auto auType = auTypes[i];
const auto subType = subTypes[i];

auto* componentDict = componentArray->createNewChildElement ("dict");

componentDict->createNewChildElement ("key")->addTextElement ("tags");
auto* tagsArray = componentDict->createNewChildElement ("array");
addPlistDictionaryKey (*componentDict, "name", "Izmar: VMPC2000XL AUv3");
addPlistDictionaryKey (*componentDict, "description", pluginDescription);
addPlistDictionaryKey (*componentDict, "factoryFunction", pluginAUExportPrefix + "FactoryAUv3");
addPlistDictionaryKey (*componentDict, "manufacturer", "Izmr");
addPlistDictionaryKey (*componentDict, "type", auType);
addPlistDictionaryKey (*componentDict, "subtype", subType);
addPlistDictionaryKey (*componentDict, "version", getAUVersionAsHexInteger (*this));
addPlistDictionaryKey (*componentDict, "sandboxSafe", true);

tagsArray->createNewChildElement ("string")
->addTextElement (isPluginSynth ? "Synth" : "Effects");
componentDict->createNewChildElement ("key")->addTextElement ("tags");
auto* tagsArray = componentDict->createNewChildElement ("array");

if (auMainType.removeCharacters ("'") == "aumi")
tagsArray->createNewChildElement ("string")->addTextElement ("MIDI");
tagsArray->createNewChildElement ("string")
->addTextElement ("Sampler");
}

return { plistKey, plistEntry };
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void AudioIODeviceType::callDeviceChangeListeners()
AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_ALSA() { return nullptr; }
#endif

#if (JUCE_LINUX || JUCE_BSD) && JUCE_JACK
#if (JUCE_LINUX || JUCE_BSD || JUCE_MAC || JUCE_WINDOWS) && JUCE_JACK
AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_JACK() { return new JackAudioIODeviceType(); }
#else
AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_JACK() { return nullptr; }
Expand Down
32 changes: 19 additions & 13 deletions modules/juce_audio_devices/juce_audio_devices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,19 +164,6 @@
#include "native/juce_ALSA_linux.cpp"
#endif

#if JUCE_JACK
/* Got an include error here? If so, you've either not got jack-audio-connection-kit
installed, or you've not got your paths set up correctly to find its header files.

The package you need to install to get JACK support is "libjack-dev".

If you don't have the jack-audio-connection-kit library and don't want to build
JUCE with low latency audio support, just set the JUCE_JACK flag to 0.
*/
#include <jack/jack.h>
#include "native/juce_JackAudio_linux.cpp"
#endif

#if (JUCE_LINUX && JUCE_BELA)
/* Got an include error here? If so, you've either not got the bela headers
installed, or you've not got your paths set up correctly to find its header
Expand Down Expand Up @@ -244,6 +231,25 @@ namespace juce

#endif

#if (JUCE_LINUX || JUCE_BSD || JUCE_MAC || JUCE_WINDOWS) && JUCE_JACK
/* Got an include error here? If so, you've either not got jack-audio-connection-kit
installed, or you've not got your paths set up correctly to find its header files.

Linux: The package you need to install to get JACK support is libjack-dev.

macOS: The package you need to install to get JACK support is jack, which you can
install using Homebrew.

Windows: The package you need to install to get JACK support is available from the
JACK Audio website. Download and run the installer for Windows.

If you don't have the jack-audio-connection-kit library and don't want to build
JUCE with low latency audio support, just set the JUCE_JACK flag to 0.
*/
#include <jack/jack.h>
#include "native/juce_JackAudio.cpp"
#endif

#if ! JUCE_SYSTEMAUDIOVOL_IMPLEMENTED
namespace juce
{
Expand Down
2 changes: 1 addition & 1 deletion modules/juce_audio_devices/juce_audio_devices.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
#endif

/** Config: JUCE_JACK
Enables JACK audio devices (Linux only).
Enables JACK audio devices.
*/
#ifndef JUCE_JACK
#define JUCE_JACK 0
Expand Down
Loading
Loading