From 8483a4250a37dc02bf57f80a6a8ed811b4089662 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 8 Aug 2011 13:13:18 +0100 Subject: [PATCH] Use both internal and external UIs --- demo.lv2/Juce_Demo_Plugin.ttl | 10 +++++--- juce/Makefile | 4 +-- juce/juce.make | 30 +++++++++++----------- juce/premake.lua | 2 +- .../audio/plugin_client/LV2/juce_LV2_Wrapper.cpp | 18 +++++-------- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/demo.lv2/Juce_Demo_Plugin.ttl b/demo.lv2/Juce_Demo_Plugin.ttl index 61fb5ec..34079de 100644 --- a/demo.lv2/Juce_Demo_Plugin.ttl +++ b/demo.lv2/Juce_Demo_Plugin.ttl @@ -3,17 +3,21 @@ @prefix lv2ev: . @prefix lv2ui: . + + a lv2ui:JUCEUI ; + lv2ui:binary . a lv2ui:external ; lv2ui:binary . a lv2:Plugin ; - lv2ui:ui ; + lv2ui:ui , + ; lv2:port [ a lv2:InputPort, lv2ev:EventPort; - lv2ev:supportsEvent ; + lv2ev:supportsEvent ; lv2:index 0; lv2:symbol "midi_in"; lv2:name "MIDI Input"; @@ -21,7 +25,7 @@ lv2:port [ a lv2:OutputPort, lv2ev:EventPort; - lv2ev:supportsEvent ; + lv2ev:supportsEvent ; lv2:index 1; lv2:symbol "midi_out"; lv2:name "MIDI Output"; diff --git a/juce/Makefile b/juce/Makefile index 3dd4c8a..7dafad6 100644 --- a/juce/Makefile +++ b/juce/Makefile @@ -1,10 +1,10 @@ # Makefile autogenerated by premake # Don't edit this file! Instead edit `premake.lua` then rerun `make` # Options: -# CONFIG=[Release|Debug] +# CONFIG=[Debug|Release] ifndef CONFIG - CONFIG=Release + CONFIG=Debug endif export CONFIG diff --git a/juce/juce.make b/juce/juce.make index fddd59f..a2b0764 100644 --- a/juce/juce.make +++ b/juce/juce.make @@ -2,39 +2,39 @@ # Don't edit this file! Instead edit `premake.lua` then rerun `make` ifndef CONFIG - CONFIG=Release + CONFIG=Debug endif # if multiple archs are defined turn off automated dependency generation DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD) -ifeq ($(CONFIG),Release) +ifeq ($(CONFIG),Debug) BINDIR := . LIBDIR := .. - OBJDIR := ./intermediate/juce_Release + OBJDIR := ./intermediate/juce_Debug OUTDIR := .. - CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "JUCE_ALSA=0" -D "JUCE_USE_VSTSDK_2_4=1" -I "/usr/include" -I "/usr/include/freetype2" - CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O2 -march=native -Os -fPIC + CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCE_ALSA=0" -D "JUCE_USE_VSTSDK_2_4=1" -I "/usr/include" -I "/usr/include/freetype2" + CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -march=native -ggdb -O0 -fPIC CXXFLAGS += $(CFLAGS) - LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -s -L"/usr/X11R6/lib/" -lfreetype -lpthread -lrt -lX11 + LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -L"/usr/X11R6/lib/" -lfreetype -lpthread -lrt -lX11 LDDEPS := - RESFLAGS := -D "LINUX=1" -D "NDEBUG=1" -D "JUCE_ALSA=0" -D "JUCE_USE_VSTSDK_2_4=1" -I "/usr/include" -I "/usr/include/freetype2" - TARGET := libjuce.a + RESFLAGS := -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCE_ALSA=0" -D "JUCE_USE_VSTSDK_2_4=1" -I "/usr/include" -I "/usr/include/freetype2" + TARGET := libjuce_debug.a BLDCMD = ar -rcs $(OUTDIR)/$(TARGET) $(OBJECTS) $(TARGET_ARCH) endif -ifeq ($(CONFIG),Debug) +ifeq ($(CONFIG),Release) BINDIR := . LIBDIR := .. - OBJDIR := ./intermediate/juce_Debug + OBJDIR := ./intermediate/juce_Release OUTDIR := .. - CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCE_ALSA=0" -D "JUCE_USE_VSTSDK_2_4=1" -I "/usr/include" -I "/usr/include/freetype2" - CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -march=native -ggdb -O0 -fPIC + CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "JUCE_ALSA=0" -D "JUCE_USE_VSTSDK_2_4=1" -I "/usr/include" -I "/usr/include/freetype2" + CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O2 -march=native -Os -fPIC CXXFLAGS += $(CFLAGS) - LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -L"/usr/X11R6/lib/" -lfreetype -lpthread -lrt -lX11 + LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -s -L"/usr/X11R6/lib/" -lfreetype -lpthread -lrt -lX11 LDDEPS := - RESFLAGS := -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCE_ALSA=0" -D "JUCE_USE_VSTSDK_2_4=1" -I "/usr/include" -I "/usr/include/freetype2" - TARGET := libjuce_debug.a + RESFLAGS := -D "LINUX=1" -D "NDEBUG=1" -D "JUCE_ALSA=0" -D "JUCE_USE_VSTSDK_2_4=1" -I "/usr/include" -I "/usr/include/freetype2" + TARGET := libjuce.a BLDCMD = ar -rcs $(OUTDIR)/$(TARGET) $(OBJECTS) $(TARGET_ARCH) endif diff --git a/juce/premake.lua b/juce/premake.lua index 3c59ee6..72eb987 100644 --- a/juce/premake.lua +++ b/juce/premake.lua @@ -3,7 +3,7 @@ project.name = "juce" project.bindir = "." project.libdir = project.bindir .. "/.." -project.configs = { "Release", "Debug" } +project.configs = { "Debug", "Release" } package = newpackage() package.name = project.name diff --git a/juce/source/src/audio/plugin_client/LV2/juce_LV2_Wrapper.cpp b/juce/source/src/audio/plugin_client/LV2/juce_LV2_Wrapper.cpp index f765c03..1d3b688 100644 --- a/juce/source/src/audio/plugin_client/LV2/juce_LV2_Wrapper.cpp +++ b/juce/source/src/audio/plugin_client/LV2/juce_LV2_Wrapper.cpp @@ -158,11 +158,9 @@ String get_plugin_ttl(String URI, String Binary) plugin += "\n"; if (filter->hasEditor()) { -#if 0 plugin += "<" + get_juce_ui_uri() + ">\n"; plugin += " a lv2ui:JUCEUI ;\n"; plugin += " lv2ui:binary <" + Binary + ".so> .\n"; -#endif plugin += "<" + get_external_ui_uri() + ">\n"; plugin += " a lv2ui:external ;\n"; plugin += " lv2ui:binary <" + Binary + ".so> .\n"; @@ -173,10 +171,8 @@ String get_plugin_ttl(String URI, String Binary) plugin += " a " + get_plugin_type() + " ;\n"; if (filter->hasEditor()) { -#if 0 - plugin += " lv2ui:ui <" + get_juce_ui_uri() + ">;\n"; -#endif - plugin += " lv2ui:ui <" + get_external_ui_uri() + ">;\n"; + plugin += " lv2ui:ui <" + get_juce_ui_uri() + ">,\n"; + plugin += " <" + get_external_ui_uri() + ">;\n"; } plugin += "\n"; @@ -184,7 +180,7 @@ String get_plugin_ttl(String URI, String Binary) #if JucePlugin_WantsMidiInput plugin += " lv2:port [\n"; plugin += " a lv2:InputPort, lv2ev:EventPort;\n"; - plugin += " lv2ev:supportsEvent ;\n"; + plugin += " lv2ev:supportsEvent ;\n"; plugin += " lv2:index " + String(port_index++) + ";\n"; plugin += " lv2:symbol \"midi_in\";\n"; plugin += " lv2:name \"MIDI Input\";\n"; @@ -194,7 +190,7 @@ String get_plugin_ttl(String URI, String Binary) #if JucePlugin_ProducesMidiOutput plugin += " lv2:port [\n"; plugin += " a lv2:OutputPort, lv2ev:EventPort;\n"; - plugin += " lv2ev:supportsEvent ;\n"; + plugin += " lv2ev:supportsEvent ;\n"; plugin += " lv2:index " + String(port_index++) + ";\n"; plugin += " lv2:symbol \"midi_out\";\n"; plugin += " lv2:name \"MIDI Output\";\n"; @@ -1210,7 +1206,7 @@ LV2UI_Descriptor* getNewLv2UI(bool external) extern "C" __attribute__ ((visibility("default"))) const LV2UI_Descriptor* lv2ui_descriptor(uint32_t index) { - return (index <= 1) ? getNewLv2UI((index == 0)) : nullptr; + return (index <= 1) ? getNewLv2UI((index == 1)) : nullptr; } //============================================================================== @@ -1230,7 +1226,7 @@ LV2UI_Descriptor* getNewLv2UI(bool external) extern "C" __attribute__ ((visibility("default"))) const LV2UI_Descriptor* lv2ui_descriptor(uint32_t index) { - return (index <= 1) ? getNewLv2UI((index == 0)) : nullptr; + return (index <= 1) ? getNewLv2UI((index == 1)) : nullptr; } // don't put initialiseJuce_GUI or shutdownJuce_GUI in these... it will crash! @@ -1253,7 +1249,7 @@ LV2UI_Descriptor* getNewLv2UI(bool external) extern "C" __declspec (dllexport) const LV2UI_Descriptor* lv2ui_descriptor(uint32_t index) { - return (index <= 1) ? getNewLv2UI((index == 0)) : nullptr; + return (index <= 1) ? getNewLv2UI((index == 1)) : nullptr; } #endif -- 2.11.4.GIT