Browse Source

Fix plugin bridges build

tags/1.9.4
falkTX 11 years ago
parent
commit
3a5fe3e1bc
7 changed files with 136 additions and 143 deletions
  1. +8
    -8
      Makefile
  2. +2
    -2
      source/backend/engine/CarlaEngineJack.cpp
  3. +11
    -0
      source/backend/plugin/DssiPlugin.cpp
  4. +5
    -0
      source/backend/plugin/LadspaPlugin.cpp
  5. +6
    -50
      source/backend/plugin/VstPlugin.cpp
  6. +1
    -1
      source/bridges/CarlaBridgePlugin.cpp
  7. +103
    -82
      source/bridges/Makefile

+ 8
- 8
Makefile View File

@@ -32,28 +32,28 @@ discovery:
$(MAKE) -C source/discovery

posix32:
$(MAKE) -C source/bridge posix32
$(MAKE) -C source/bridges posix32
$(MAKE) -C source/discovery posix32

posix64:
$(MAKE) -C source/bridge posix64
$(MAKE) -C source/bridges posix64
$(MAKE) -C source/discovery posix64

win32:
$(MAKE) -C source/bridge win32
$(MAKE) -C source/bridges win32
$(MAKE) -C source/discovery win32

win64:
$(MAKE) -C source/bridge win64
$(MAKE) -C source/bridges win64
$(MAKE) -C source/discovery win64

wine32:
$(MAKE) -C source/jackbridge wine32
$(LINK) source/libs/jackbridge/libcarla-jackbridge-win32.dll.so source/bridge/libcarla-jackbridge-win32.dll
$(MAKE) -C source/libs jackbridge-win32.dll.so
$(LINK) ../libs/jackbridge-win32.dll.so source/bridges/jackbridge-win32.dll

wine64:
$(MAKE) -C source/jackbridge wine64
$(LINK) source/libs/jackbridge/libcarla-jackbridge-win64.dll.so source/bridge/libcarla-jackbridge-win64.dll
$(MAKE) -C source/libs jackbridge-win64.dll.so
$(LINK) ../libs/jackbridge-win64.dll.so source/bridges/jackbridge-win64.dll

# -----------------------------------------------------------------------------------------------------------------------------------------
# Resources


+ 2
- 2
source/backend/engine/CarlaEngineJack.cpp View File

@@ -1523,7 +1523,7 @@ private:
{
for (uint32_t i=0; i < inCount; i++)
{
uint aOutI = (i >= outCount) ? outCount : i;
uint32_t aOutI = (i >= outCount) ? outCount : i;
jack_port_t* const portIn = ((CarlaEngineJackAudioPort*)CarlaPluginGetAudioInPort(plugin, i))->kPort;
jack_port_t* const portOut = ((CarlaEngineJackAudioPort*)CarlaPluginGetAudioOutPort(plugin, aOutI))->kPort;

@@ -1537,7 +1537,7 @@ private:
{
for (uint32_t i=0; i < outCount; i++)
{
uint aInI = (i >= inCount) ? inCount : i;
uint32_t aInI = (i >= inCount) ? inCount : i;
jack_port_t* const portIn = ((CarlaEngineJackAudioPort*)CarlaPluginGetAudioInPort(plugin, aInI))->kPort;
jack_port_t* const portOut = ((CarlaEngineJackAudioPort*)CarlaPluginGetAudioOutPort(plugin, i))->kPort;



+ 11
- 0
source/backend/plugin/DssiPlugin.cpp View File

@@ -141,8 +141,14 @@ public:
{
CARLA_ASSERT(fDescriptor != nullptr);

#ifdef __USE_GNU
const bool isDssiVst = fFilename.contains("dssi-vst", true);
const bool isZASX = fFilename.contains("zynaddsubfx", true);
#else
const bool isDssiVst = fFilename.contains("dssi-vst");
const bool isZASX = fFilename.contains("zynaddsubfx");
#endif

unsigned int options = 0x0;

options |= PLUGIN_OPTION_MAP_PROGRAM_CHANGES;
@@ -705,8 +711,13 @@ public:

// plugin hints
const bool hasGUI = (fHints & PLUGIN_HAS_GUI);
#ifdef __USE_GNU
const bool isDssiVst = fFilename.contains("dssi-vst", true);
const bool isZASX = fFilename.contains("zynaddsubfx", true);
#else
const bool isDssiVst = fFilename.contains("dssi-vst");
const bool isZASX = fFilename.contains("zynaddsubfx");
#endif

fHints = 0x0;



+ 5
- 0
source/backend/plugin/LadspaPlugin.cpp View File

@@ -155,7 +155,12 @@ public:

unsigned int availableOptions()
{
#ifdef __USE_GNU
const bool isDssiVst = fFilename.contains("dssi-vst", true);
#else
const bool isDssiVst = fFilename.contains("dssi-vst");
#endif

unsigned int options = 0x0;

if (! isDssiVst)


+ 6
- 50
source/backend/plugin/VstPlugin.cpp View File

@@ -327,53 +327,9 @@ public:
CarlaPlugin::setProgram(index, sendGui, sendOsc, sendCallback);
}

#if 0
// -------------------------------------------------------------------
// Set gui stuff

void setGuiContainer(GuiContainer* const container)
{

// open UI

{
// get UI size again, can't fail now
vstRect = nullptr;
effect->dispatcher(effect, effEditGetRect, 0, 0, &vstRect, 0.0f);

if (vstRect)
{
int width = vstRect->right - vstRect->left;
int height = vstRect->bottom - vstRect->top;

if (width <= 0 || height <= 0)
{
carla_stderr2("VstPlugin::setGuiContainer(%p) - failed to get proper editor size", container);
return;
}

gui.width = width;
gui.height = height;

container->setFixedSize(width, height);
carla_debug("VstPlugin::setGuiContainer(%p) -> setFixedSize(%i, %i)", container, width, height);
}
else
carla_stderr2("VstPlugin::setGuiContainer(%p) - failed to get plugin editor size", container);
}
else
{
// failed to open UI
carla_stderr("VstPlugin::setGuiContainer(%p) - failed to open UI", container);

m_hints &= ~PLUGIN_HAS_GUI;
x_engine->callback(CALLBACK_SHOW_GUI, m_id, -1, 0, 0.0, nullptr);


}
}
#endif

void showGui(const bool yesNo)
{
if (fGui.isOsc)
@@ -407,7 +363,7 @@ public:
#endif
void* const ptr = (void*)kData->gui->getWinId();

if (dispatcher(effEditOpen, 0, value, ptr, 0.0f) == 1)
if (dispatcher(effEditOpen, 0, value, ptr, 0.0f) != 0)
{
ERect* vstRect = nullptr;

@@ -1670,8 +1626,9 @@ protected:
switch (opcode)
{
case audioMasterAutomate:
CARLA_ASSERT_INT(index < static_cast<int32_t>(kData->param.count), index);
CARLA_SAFE_ASSERT(fEnabled); // plugins should never do this!
// plugins should never do this:
CARLA_SAFE_ASSERT(fEnabled);
CARLA_SAFE_ASSERT_INT(index < static_cast<int32_t>(kData->param.count), index);

if (index < 0 || index >= static_cast<int32_t>(kData->param.count) || ! fEnabled)
break;
@@ -1728,7 +1685,6 @@ protected:
#endif

case audioMasterGetTime:
CARLA_ASSERT(fIsProcessing);
#ifdef VESTIGE_HEADER
ret = getAddressFromPointer(&fTimeInfo);
#else
@@ -1843,8 +1799,8 @@ protected:
CARLA_ASSERT(kData->gui != nullptr);

// FIXME - ensure thread safe
if (kData->gui != nullptr)
kData->gui->setFixedSize(index, value);
//if (kData->gui != nullptr)
// kData->gui->setFixedSize(index, value);

ret = 1;
break;


+ 1
- 1
source/bridges/CarlaBridgePlugin.cpp View File

@@ -503,6 +503,7 @@ int main(int argc, char* argv[])
}

QApplication app(argc, argv, true);
app.setQuitOnLastWindowClosed(false);

// Init Plugin client
CarlaPluginClient client(name ? name : label);
@@ -526,7 +527,6 @@ int main(int argc, char* argv[])
{
if (useOsc)
{
app.setQuitOnLastWindowClosed(false);
client.sendOscUpdate();
client.sendOscBridgeUpdate();
}


+ 103
- 82
source/bridges/Makefile View File

@@ -19,8 +19,7 @@ BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo QtCore QtXml)
LINK_FLAGS += $(shell pkg-config --libs liblo QtCore QtXml) -lpthread

ifeq ($(CARLA_PLUGIN_SUPPORT),true)
BUILD_CXX_FLAGS += -DWANT_LADSPA -DWANT_DSSI
#-DWANT_LV2 -DWANT_VST
BUILD_CXX_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST
endif

ifeq ($(HAVE_QT5),true)
@@ -41,15 +40,23 @@ BUILD_PLUGIN_FLAGS += $(shell pkg-config --cflags jack) $(QT_UI_FLAGS)
LINK_PLUGIN_FLAGS = $(LINK_FLAGS)
LINK_PLUGIN_FLAGS += $(QT_UI_LIBS)

NATIVE_BUILD_FLAGS = $(BUILD_PLUGIN_FLAGS)
NATIVE_LINK_FLAGS = $(LINK_PLUGIN_FLAGS) $(shell pkg-config --libs jack) -ldl

ifeq ($(HAVE_SUIL),true)
NATIVE_BUILD_FLAGS += $(shell pkg-config --cflags suil-0) -DWANT_SUIL
NATIVE_LINK_FLAGS += $(shell pkg-config --libs suil-0)
endif

POSIX_BUILD_FLAGS = $(BUILD_PLUGIN_FLAGS)
POSIX_32BIT_FLAGS = $(32BIT_FLAGS) -L/usr/lib32 -L/usr/lib/i386-linux-gnu
POSIX_64BIT_FLAGS = $(64BIT_FLAGS) -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu
POSIX_LINK_FLAGS = $(LINK_PLUGIN_FLAGS) $(shell pkg-config --libs jack) -ldl

WIN_BUILD_FLAGS = $(BUILD_PLUGIN_FLAGS) -DJACKBRIDGE_EXPORT -DPTW32_STATIC_LIB
WIN_BUILD_FLAGS = $(BUILD_PLUGIN_FLAGS) -DJACKBRIDGE_EXPORT -DPTW32_STATIC_LIB -I../libs/jackbridge
WIN_32BIT_FLAGS = $(32BIT_FLAGS)
WIN_64BIT_FLAGS = $(64BIT_FLAGS)
WIN_LINK_FLAGS = $(LINK_PLUGIN_FLAGS) -mwindows -L../carla-jackbridge -lpthread -lwinspool -lole32 -luuid -limm32 -lshell32 -lws2_32
WIN_LINK_FLAGS = $(LINK_PLUGIN_FLAGS) -mwindows -L../libs -lpthread -lwinspool -lole32 -luuid -limm32 -lshell32 -lws2_32

# --------------------------------------------------------------
# UI bridges
@@ -234,14 +241,6 @@ carla-bridge-vst-x11: $(OBJS_UI_VST_X11)
# --------------------------------------------------------------
# native

NATIVE_BUILD_FLAGS = $(BUILD_PLUGIN_FLAGS)
NATIVE_LINK_FLAGS = $(LINK_PLUGIN_FLAGS) $(shell pkg-config --libs jack) -ldl

ifeq ($(HAVE_SUIL),true)
NATIVE_BUILD_FLAGS += $(shell pkg-config --cflags suil-0) -DWANT_SUIL
NATIVE_LINK_FLAGS += $(shell pkg-config --libs suil-0)
endif

OBJS_NATIVE = CarlaBridgePlugin__native.o \
CarlaBridgeClient__native.o CarlaBridgeOsc__native.o

@@ -283,29 +282,37 @@ carla-bridge-native: $(OBJS_NATIVE)
# --------------------------------------------------------------
# posix32

OBJS_POSIX32 = carla_bridge_plugin__posix32.o \
carla_bridge_client__posix32.o carla_bridge_osc__posix32.o
OBJS_POSIX32 = CarlaBridgePlugin__posix32.o \
CarlaBridgeClient__posix32.o CarlaBridgeOsc__posix32.o

# carla-engine
OBJS_POSIX32 += \
../carla-engine/carla_engine__posix32.o \
../carla-engine/carla_engine_osc__posix32.o \
../carla-engine/carla_engine_thread__posix32.o \
../carla-engine/jack__posix32.o
../backend/engine/CarlaEngine__posix32.o \
../backend/engine/CarlaEngineOsc__posix32.o \
../backend/engine/CarlaEngineThread__posix32.o \
../backend/engine/CarlaEngineJack__posix32.o

# carla-plugin
OBJS_POSIX32 += \
../carla-plugin/carla_plugin__posix32.o \
../carla-plugin/carla_plugin_thread__posix32.o \
../carla-plugin/ladspa__posix32.o \
../carla-plugin/dssi__posix32.o \
../carla-plugin/lv2__posix32.o \
../carla-plugin/vst__posix32.o
../backend/plugin/CarlaPlugin__posix32.o \
../backend/plugin/CarlaPluginThread__posix32.o \
../backend/plugin/NativePlugin__posix32.o \
../backend/plugin/LadspaPlugin__posix32.o \
../backend/plugin/DssiPlugin__posix32.o \
../backend/plugin/Lv2Plugin__posix32.o \
../backend/plugin/VstPlugin__posix32.o \
../backend/plugin/Vst3Plugin__posix32.o \
../backend/plugin/FluidSynthPlugin__posix32.o \
../backend/plugin/LinuxSamplerPlugin__posix32.o

# carla-standalone
OBJS_POSIX32 += \
../backend/standalone/CarlaStandalone__posix32.o

# libs
OBJS_POSIX32 += \
../carla-lilv/carla_lilv_posix32.a \
../carla-rtmempool/carla_rtmempool_posix32.a
../libs/lilv_posix32.a \
../libs/rtmempool_posix32.a

carla-bridge-posix32: $(OBJS_POSIX32)
$(CXX) $^ $(POSIX_LINK_FLAGS) $(POSIX_32BIT_FLAGS) -o $@ && $(STRIP) $@
@@ -316,33 +323,37 @@ carla-bridge-posix32: $(OBJS_POSIX32)
# --------------------------------------------------------------
# posix64

OBJS_POSIX64 = carla_bridge_plugin__posix64.o \
carla_bridge_client__posix64.o carla_bridge_osc__posix64.o

# carla
OBJS_POSIX64 += \
../carla/Shared__posix64.o
OBJS_POSIX64 = CarlaBridgePlugin__posix64.o \
CarlaBridgeClient__posix64.o CarlaBridgeOsc__posix64.o

# carla-engine
OBJS_POSIX64 += \
../carla-engine/carla_engine__posix64.o \
../carla-engine/carla_engine_osc__posix64.o \
../carla-engine/carla_engine_thread__posix64.o \
../carla-engine/jack__posix64.o
../backend/engine/CarlaEngine__posix64.o \
../backend/engine/CarlaEngineOsc__posix64.o \
../backend/engine/CarlaEngineThread__posix64.o \
../backend/engine/CarlaEngineJack__posix64.o

# carla-plugin
OBJS_POSIX64 += \
../carla-plugin/carla_plugin__posix64.o \
../carla-plugin/carla_plugin_thread__posix64.o \
../carla-plugin/ladspa__posix64.o \
../carla-plugin/dssi__posix64.o \
../carla-plugin/lv2__posix64.o \
../carla-plugin/vst__posix64.o
../backend/plugin/CarlaPlugin__posix64.o \
../backend/plugin/CarlaPluginThread__posix64.o \
../backend/plugin/NativePlugin__posix64.o \
../backend/plugin/LadspaPlugin__posix64.o \
../backend/plugin/DssiPlugin__posix64.o \
../backend/plugin/Lv2Plugin__posix64.o \
../backend/plugin/VstPlugin__posix64.o \
../backend/plugin/Vst3Plugin__posix64.o \
../backend/plugin/FluidSynthPlugin__posix64.o \
../backend/plugin/LinuxSamplerPlugin__posix64.o

# carla-standalone
OBJS_POSIX64 += \
../backend/standalone/CarlaStandalone__posix64.o

# libs
OBJS_POSIX64 += \
../carla-lilv/carla_lilv_posix64.a \
../carla-rtmempool/carla_rtmempool_posix64.a
../libs/lilv_posix64.a \
../libs/rtmempool_posix64.a

carla-bridge-posix64: $(OBJS_POSIX64)
$(CXX) $^ $(POSIX_LINK_FLAGS) $(POSIX_64BIT_FLAGS) -o $@ && $(STRIP) $@
@@ -353,32 +364,40 @@ carla-bridge-posix64: $(OBJS_POSIX64)
# --------------------------------------------------------------
# win32

OBJS_WIN32 = carla_bridge_plugin__win32.o \
carla_bridge_client__win32.o carla_bridge_osc__win32.o
OBJS_WIN32 = CarlaBridgePlugin__win32.o \
CarlaBridgeClient__win32.o CarlaBridgeOsc__win32.o

# carla-engine
OBJS_WIN32 += \
../carla-engine/carla_engine__win32.o \
../carla-engine/carla_engine_osc__win32.o \
../carla-engine/carla_engine_thread__win32.o \
../carla-engine/jack__win32.o
../backend/engine/CarlaEngine__win32.o \
../backend/engine/CarlaEngineOsc__win32.o \
../backend/engine/CarlaEngineThread__win32.o \
../backend/engine/CarlaEngineJack__win32.o

# carla-plugin
OBJS_WIN32 += \
../carla-plugin/carla_plugin__win32.o \
../carla-plugin/carla_plugin_thread__win32.o \
../carla-plugin/ladspa__win32.o \
../carla-plugin/dssi__win32.o \
../carla-plugin/lv2__win32.o \
../carla-plugin/vst__win32.o
../backend/plugin/CarlaPlugin__win32.o \
../backend/plugin/CarlaPluginThread__win32.o \
../backend/plugin/NativePlugin__win32.o \
../backend/plugin/LadspaPlugin__win32.o \
../backend/plugin/DssiPlugin__win32.o \
../backend/plugin/Lv2Plugin__win32.o \
../backend/plugin/VstPlugin__win32.o \
../backend/plugin/Vst3Plugin__win32.o \
../backend/plugin/FluidSynthPlugin__win32.o \
../backend/plugin/LinuxSamplerPlugin__win32.o

# carla-standalone
OBJS_WIN32 += \
../backend/standalone/CarlaStandalone__win32.o

# libs
OBJS_WIN32 += \
../carla-lilv/carla_lilv_win32.a \
../carla-rtmempool/carla_rtmempool_win32.a
../libs/lilv_win32.a \
../libs/rtmempool_win32.a

carla-bridge-win32.exe: $(OBJS_WIN32) ../carla-jackbridge/libcarla-jackbridge-win32.dll
$(CXX) $(OBJS_WIN32) $(WIN_32BIT_FLAGS) $(WIN_LINK_FLAGS) -lcarla-jackbridge-win32 -o $@ && $(STRIP) $@
carla-bridge-win32.exe: $(OBJS_WIN32) ../libs/jackbridge-win32.dll
$(CXX) $(OBJS_WIN32) $(WIN_32BIT_FLAGS) $(WIN_LINK_FLAGS) -ljackbridge-win32 -o $@ && $(STRIP) $@

%__win32.o: %.cpp
$(CXX) $< $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) -c -o $@
@@ -386,32 +405,40 @@ carla-bridge-win32.exe: $(OBJS_WIN32) ../carla-jackbridge/libcarla-jackbridge-wi
# --------------------------------------------------------------
# win64

OBJS_WIN64 = carla_bridge_plugin__win64.o \
carla_bridge_client__win64.o carla_bridge_osc__win64.o
OBJS_WIN64 = CarlaBridgePlugin__win64.o \
CarlaBridgeClient__win64.o CarlaBridgeOsc__win64.o

# carla-engine
OBJS_WIN64 += \
../carla-engine/carla_engine__win64.o \
../carla-engine/carla_engine_osc__win64.o \
../carla-engine/carla_engine_thread__win64.o \
../carla-engine/jack__win64.o
../backend/engine/CarlaEngine__win64.o \
../backend/engine/CarlaEngineOsc__win64.o \
../backend/engine/CarlaEngineThread__win64.o \
../backend/engine/CarlaEngineJack__win64.o

# carla-plugin
OBJS_WIN64 += \
../carla-plugin/carla_plugin__win64.o \
../carla-plugin/carla_plugin_thread__win64.o \
../carla-plugin/ladspa__win64.o \
../carla-plugin/dssi__win64.o \
../carla-plugin/lv2__win64.o \
../carla-plugin/vst__win64.o
../backend/plugin/CarlaPlugin__win64.o \
../backend/plugin/CarlaPluginThread__win64.o \
../backend/plugin/NativePlugin__win64.o \
../backend/plugin/LadspaPlugin__win64.o \
../backend/plugin/DssiPlugin__win64.o \
../backend/plugin/Lv2Plugin__win64.o \
../backend/plugin/VstPlugin__win64.o \
../backend/plugin/Vst3Plugin__win64.o \
../backend/plugin/FluidSynthPlugin__win64.o \
../backend/plugin/LinuxSamplerPlugin__win64.o

# carla-standalone
OBJS_WIN64 += \
../backend/standalone/CarlaStandalone__win64.o

# libs
OBJS_WIN64 += \
../carla-lilv/carla_lilv_win64.a \
../carla-rtmempool/carla_rtmempool_win64.a
../libs/lilv_win64.a \
../libs/rtmempool_win64.a

carla-bridge-win64.exe: $(OBJS_WIN64) ../carla-jackbridge/libcarla-jackbridge-win64.dll
$(CXX) $(OBJS_WIN64) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -lcarla-jackbridge-win64 -o $@ && $(STRIP) $@
carla-bridge-win64.exe: $(OBJS_WIN64) ../libs/jackbridge-win64.dll
$(CXX) $(OBJS_WIN64) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -ljackbridge-win64 -o $@ && $(STRIP) $@

%__win64.o: %.cpp
$(CXX) $< $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) -c -o $@
@@ -421,12 +448,6 @@ carla-bridge-win64.exe: $(OBJS_WIN64) ../carla-jackbridge/libcarla-jackbridge-wi
../libs/%:
$(MAKE) -C ../libs $*

../carla-jackbridge/libcarla-jackbridge-win32.dll:
$(MAKE) -C ../carla-jackbridge win32

../carla-jackbridge/libcarla-jackbridge-win64.dll:
$(MAKE) -C ../carla-jackbridge win64

# --------------------------------------------------------------

doxygen: carla_bridge.doxygen


Loading…
Cancel
Save