From b93c9ffde7064fa497656ece21fd47c66606d585 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 6 Mar 2015 18:02:42 +0100 Subject: [PATCH] Update juce branch --- .../LV2/juce_LV2_Wrapper.cpp | 24 ++++++++++++------- scripts/premake-update.sh | 4 ++++ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/libs/juce/source/modules/juce_audio_plugin_client/LV2/juce_LV2_Wrapper.cpp b/libs/juce/source/modules/juce_audio_plugin_client/LV2/juce_LV2_Wrapper.cpp index 391fa6b7..315b818f 100644 --- a/libs/juce/source/modules/juce_audio_plugin_client/LV2/juce_LV2_Wrapper.cpp +++ b/libs/juce/source/modules/juce_audio_plugin_client/LV2/juce_LV2_Wrapper.cpp @@ -186,6 +186,7 @@ float safeParamValue (float value) /** Create the manifest.ttl file contents */ const String makeManifestFile (AudioProcessor* const filter, const String& binary) { + const String& pluginURI(getPluginURI()); String text; // Header @@ -196,7 +197,7 @@ const String makeManifestFile (AudioProcessor* const filter, const String& binar text += "\n"; // Plugin - text += "<" + getPluginURI() + ">\n"; + text += "<" + pluginURI + ">\n"; text += " a lv2:Plugin ;\n"; text += " lv2:binary <" + binary + PLUGIN_EXT "> ;\n"; text += " rdfs:seeAlso <" + binary + ".ttl> .\n"; @@ -205,14 +206,14 @@ const String makeManifestFile (AudioProcessor* const filter, const String& binar // UIs if (filter->hasEditor()) { - text += "<" + getPluginURI() + "#ExternalUI>\n"; + text += "<" + pluginURI + "#ExternalUI>\n"; text += " a <" LV2_EXTERNAL_UI__Widget "> ;\n"; text += " ui:binary <" + binary + PLUGIN_EXT "> ;\n"; text += " lv2:requiredFeature <" LV2_INSTANCE_ACCESS_URI "> ;\n"; text += " lv2:extensionData <" LV2_PROGRAMS__UIInterface "> .\n"; text += "\n"; - text += "<" + getPluginURI() + "#ParentUI>\n"; + text += "<" + pluginURI + "#ParentUI>\n"; #if JUCE_MAC text += " a ui:CocoaUI ;\n"; #elif JUCE_LINUX @@ -228,12 +229,14 @@ const String makeManifestFile (AudioProcessor* const filter, const String& binar } #if JucePlugin_WantsLV2Presets + const String presetSeparator(pluginURI.contains("#") ? ":" : "#"); + // Presets for (int i = 0; i < filter->getNumPrograms(); ++i) { - text += "<" + getPluginURI() + "#preset" + String::formatted("%03i", i+1) + ">\n"; + text += "<" + pluginURI + presetSeparator + "preset" + String::formatted("%03i", i+1) + ">\n"; text += " a pset:Preset ;\n"; - text += " lv2:appliesTo <" + getPluginURI() + "> ;\n"; + text += " lv2:appliesTo <" + pluginURI + "> ;\n"; text += " rdfs:seeAlso .\n"; text += "\n"; } @@ -245,6 +248,7 @@ const String makeManifestFile (AudioProcessor* const filter, const String& binar /** Create the -plugin-.ttl file contents */ const String makePluginFile (AudioProcessor* const filter) { + const String& pluginURI(getPluginURI()); String text; // Header @@ -258,7 +262,7 @@ const String makePluginFile (AudioProcessor* const filter) text += "\n"; // Plugin - text += "<" + getPluginURI() + ">\n"; + text += "<" + pluginURI + ">\n"; text += " a " + getPluginType() + " ;\n"; text += " lv2:requiredFeature <" LV2_BUF_SIZE__boundedBlockLength "> ,\n"; #if JucePlugin_WantsLV2FixedBlockLength @@ -275,8 +279,8 @@ const String makePluginFile (AudioProcessor* const filter) // UIs if (filter->hasEditor()) { - text += " ui:ui <" + getPluginURI() + "#ExternalUI> ,\n"; - text += " <" + getPluginURI() + "#ParentUI> ;\n"; + text += " ui:ui <" + pluginURI + "#ExternalUI> ,\n"; + text += " <" + pluginURI + "#ParentUI> ;\n"; text += "\n"; } @@ -428,6 +432,7 @@ const String makePluginFile (AudioProcessor* const filter) /** Create the presets.ttl file contents */ const String makePresetsFile (AudioProcessor* const filter) { + const String& pluginURI(getPluginURI()); String text; // Header @@ -442,6 +447,7 @@ const String makePresetsFile (AudioProcessor* const filter) // Presets const int numPrograms = filter->getNumPrograms(); + const String presetSeparator(pluginURI.contains("#") ? ":" : "#"); for (int i = 0; i < numPrograms; ++i) { @@ -452,7 +458,7 @@ const String makePresetsFile (AudioProcessor* const filter) // Label filter->setCurrentProgram(i); - preset += "<" + getPluginURI() + "#preset" + String::formatted("%03i", i+1) + "> a pset:Preset ;\n"; + preset += "<" + pluginURI + presetSeparator + "preset" + String::formatted("%03i", i+1) + "> a pset:Preset ;\n"; preset += " rdfs:label \"" + filter->getProgramName(i) + "\" ;\n"; // State diff --git a/scripts/premake-update.sh b/scripts/premake-update.sh index 9c8f2df2..430ad095 100755 --- a/scripts/premake-update.sh +++ b/scripts/premake-update.sh @@ -83,6 +83,10 @@ if [ ! -d sdks/vstsdk2.4 ]; then exit 0 fi +if [ -L sdks/vstsdk2.4/pluginterfaces ]; then + exit 0 +fi + if [ -d /usr/include/pluginterfaces ]; then cp -r /usr/include/pluginterfaces sdks/vstsdk2.4/ fi