@@ -1,11 +1,7 @@ | |||||
# Carla TODO | # Carla TODO | ||||
MAKEFILE: | |||||
- "strip" usage | |||||
GENERAL: | GENERAL: | ||||
- add direct program access on ui-dialogs (needed for standalone bridges), maybe add extra buttons too (reset plugin, fix ui size) | - add direct program access on ui-dialogs (needed for standalone bridges), maybe add extra buttons too (reset plugin, fix ui size) | ||||
- implement osc-based uis in bridge mode | |||||
- implement midi-learn (new dialog) | - implement midi-learn (new dialog) | ||||
- implement midi-cc automation special rules (invert, half, logarithmic, etc) | - implement midi-cc automation special rules (invert, half, logarithmic, etc) | ||||
- allow to change position of plugins (up/down) | - allow to change position of plugins (up/down) | ||||
@@ -28,7 +24,6 @@ LADSPA: | |||||
DSSI: | DSSI: | ||||
LV2: | LV2: | ||||
- complete lv2-atom messages support | |||||
- complete lv2-worker support | - complete lv2-worker support | ||||
VST: | VST: | ||||
@@ -74,11 +74,16 @@ CarlaPluginGui::~CarlaPluginGui() | |||||
if (fOptions.parented) | if (fOptions.parented) | ||||
{ | { | ||||
CARLA_ASSERT(fContainer != nullptr); | CARLA_ASSERT(fContainer != nullptr); | ||||
if (fContainer != nullptr) | |||||
{ | |||||
#ifdef Q_WS_X11 | #ifdef Q_WS_X11 | ||||
delete (QX11EmbedContainer*)fContainer; | |||||
delete (QX11EmbedContainer*)fContainer; | |||||
#else | #else | ||||
delete fContainer; | |||||
delete fContainer; | |||||
#endif | #endif | ||||
fContainer = nullptr; | |||||
} | |||||
} | } | ||||
} | } | ||||
@@ -21,6 +21,7 @@ endif | |||||
# Common | # Common | ||||
LINK_FLAGS += $(shell pkg-config --libs liblo) | LINK_FLAGS += $(shell pkg-config --libs liblo) | ||||
LINK_FLAGS += -lpthread | |||||
ifeq ($(HAVE_QT4),true) | ifeq ($(HAVE_QT4),true) | ||||
LINK_FLAGS += $(shell pkg-config --libs QtCore QtGui QtXml) | LINK_FLAGS += $(shell pkg-config --libs QtCore QtGui QtXml) | ||||
@@ -18,7 +18,6 @@ | |||||
#include "CarlaBridgeClient.hpp" | #include "CarlaBridgeClient.hpp" | ||||
#ifdef BUILD_BRIDGE_UI | #ifdef BUILD_BRIDGE_UI | ||||
# include "CarlaBridgeToolkit.hpp" | |||||
# include "CarlaLibUtils.hpp" | # include "CarlaLibUtils.hpp" | ||||
#endif | #endif | ||||
@@ -54,16 +53,9 @@ bool CarlaBridgeClient::uiInit(const char* const, const char* const) | |||||
{ | { | ||||
carla_debug("CarlaBridgeClient::uiInit()"); | carla_debug("CarlaBridgeClient::uiInit()"); | ||||
// Test for single init | |||||
{ | |||||
static bool initiated = false; | |||||
CARLA_ASSERT(! initiated); | |||||
initiated = true; | |||||
} | |||||
fUI.init(); | fUI.init(); | ||||
return false; | |||||
return true; | |||||
} | } | ||||
void CarlaBridgeClient::uiClose() | void CarlaBridgeClient::uiClose() | ||||
@@ -75,6 +67,44 @@ void CarlaBridgeClient::uiClose() | |||||
fUI.close(); | fUI.close(); | ||||
} | } | ||||
// --------------------------------------------------------------------- | |||||
// ui toolkit | |||||
void CarlaBridgeClient::toolkitShow() | |||||
{ | |||||
carla_debug("CarlaBridgeClient::toolkitShow()"); | |||||
fUI.toolkit->show(); | |||||
} | |||||
void CarlaBridgeClient::toolkitHide() | |||||
{ | |||||
carla_debug("CarlaBridgeClient::toolkitHide()"); | |||||
fUI.toolkit->hide(); | |||||
} | |||||
void CarlaBridgeClient::toolkitResize(const int width, const int height) | |||||
{ | |||||
carla_debug("CarlaBridgeClient::toolkitResize(%i, %i)", width, height); | |||||
fUI.toolkit->resize(width, height); | |||||
} | |||||
void CarlaBridgeClient::toolkitExec(const bool showGui) | |||||
{ | |||||
carla_debug("CarlaBridgeClient::toolkitExec(%s)", bool2str(showGui)); | |||||
fUI.toolkit->exec(showGui); | |||||
} | |||||
void CarlaBridgeClient::toolkitQuit() | |||||
{ | |||||
carla_debug("CarlaBridgeClient::toolkitQuit()"); | |||||
fUI.close(); | |||||
} | |||||
#endif | #endif | ||||
// --------------------------------------------------------------------- | // --------------------------------------------------------------------- | ||||
@@ -82,6 +112,7 @@ void CarlaBridgeClient::uiClose() | |||||
void CarlaBridgeClient::oscInit(const char* const url) | void CarlaBridgeClient::oscInit(const char* const url) | ||||
{ | { | ||||
CARLA_ASSERT(fOscData == nullptr); | |||||
carla_debug("CarlaBridgeClient::oscInit(\"%s\")", url); | carla_debug("CarlaBridgeClient::oscInit(\"%s\")", url); | ||||
kOsc.init(url); | kOsc.init(url); | ||||
@@ -144,46 +175,6 @@ void CarlaBridgeClient::sendOscBridgeError(const char* const error) | |||||
} | } | ||||
#endif | #endif | ||||
#ifdef BUILD_BRIDGE_UI | |||||
// --------------------------------------------------------------------- | |||||
// toolkit | |||||
void CarlaBridgeClient::toolkitShow() | |||||
{ | |||||
carla_debug("CarlaBridgeClient::toolkitShow()"); | |||||
fUI.toolkit->show(); | |||||
} | |||||
void CarlaBridgeClient::toolkitHide() | |||||
{ | |||||
carla_debug("CarlaBridgeClient::toolkitHide()"); | |||||
fUI.toolkit->hide(); | |||||
} | |||||
void CarlaBridgeClient::toolkitResize(const int width, const int height) | |||||
{ | |||||
carla_debug("CarlaBridgeClient::toolkitResize(%i, %i)", width, height); | |||||
fUI.toolkit->resize(width, height); | |||||
} | |||||
void CarlaBridgeClient::toolkitExec(const bool showGui) | |||||
{ | |||||
carla_debug("CarlaBridgeClient::toolkitExec(%s)", bool2str(showGui)); | |||||
fUI.toolkit->exec(showGui); | |||||
} | |||||
void CarlaBridgeClient::toolkitQuit() | |||||
{ | |||||
carla_debug("CarlaBridgeClient::toolkitQuit()"); | |||||
fUI.close(); | |||||
} | |||||
#endif | |||||
// --------------------------------------------------------------------- | // --------------------------------------------------------------------- | ||||
void CarlaBridgeClient::sendOscConfigure(const char* const key, const char* const value) | void CarlaBridgeClient::sendOscConfigure(const char* const key, const char* const value) | ||||
@@ -265,6 +256,7 @@ void CarlaBridgeClient::sendOscLv2UridMap(const uint32_t urid, const char* const | |||||
#ifdef BUILD_BRIDGE_UI | #ifdef BUILD_BRIDGE_UI | ||||
void* CarlaBridgeClient::getContainerId() | void* CarlaBridgeClient::getContainerId() | ||||
{ | { | ||||
carla_debug("CarlaBridgeClient::getContainerId()"); | |||||
return fUI.toolkit->getContainerId(); | return fUI.toolkit->getContainerId(); | ||||
} | } | ||||
@@ -272,6 +264,7 @@ bool CarlaBridgeClient::uiLibOpen(const char* const filename) | |||||
{ | { | ||||
CARLA_ASSERT(fUI.lib == nullptr); | CARLA_ASSERT(fUI.lib == nullptr); | ||||
CARLA_ASSERT(filename != nullptr); | CARLA_ASSERT(filename != nullptr); | ||||
carla_debug("CarlaBridgeClient::uiLibOpen(\"%s\")", filename); | |||||
fUI.lib = lib_open(filename); | fUI.lib = lib_open(filename); | ||||
fUI.filename = filename; | fUI.filename = filename; | ||||
@@ -282,6 +275,7 @@ bool CarlaBridgeClient::uiLibOpen(const char* const filename) | |||||
bool CarlaBridgeClient::uiLibClose() | bool CarlaBridgeClient::uiLibClose() | ||||
{ | { | ||||
CARLA_ASSERT(fUI.lib != nullptr); | CARLA_ASSERT(fUI.lib != nullptr); | ||||
carla_debug("CarlaBridgeClient::uiLibClose()"); | |||||
if (fUI.lib == nullptr) | if (fUI.lib == nullptr) | ||||
return false; | return false; | ||||
@@ -294,6 +288,7 @@ bool CarlaBridgeClient::uiLibClose() | |||||
void* CarlaBridgeClient::uiLibSymbol(const char* const symbol) | void* CarlaBridgeClient::uiLibSymbol(const char* const symbol) | ||||
{ | { | ||||
CARLA_ASSERT(fUI.lib != nullptr); | CARLA_ASSERT(fUI.lib != nullptr); | ||||
carla_debug("CarlaBridgeClient::uiLibSymbol(\"%s\")", symbol); | |||||
if (fUI.lib == nullptr) | if (fUI.lib == nullptr) | ||||
return nullptr; | return nullptr; | ||||
@@ -303,6 +298,8 @@ void* CarlaBridgeClient::uiLibSymbol(const char* const symbol) | |||||
const char* CarlaBridgeClient::uiLibError() | const char* CarlaBridgeClient::uiLibError() | ||||
{ | { | ||||
carla_debug("CarlaBridgeClient::uiLibError()"); | |||||
return lib_error(fUI.filename); | return lib_error(fUI.filename); | ||||
} | } | ||||
#endif | #endif | ||||
@@ -19,7 +19,10 @@ | |||||
#define __CARLA_BRIDGE_CLIENT_HPP__ | #define __CARLA_BRIDGE_CLIENT_HPP__ | ||||
#include "CarlaBridgeOsc.hpp" | #include "CarlaBridgeOsc.hpp" | ||||
#include "CarlaBridgeToolkit.hpp" | |||||
#ifdef BUILD_BRIDGE_UI | |||||
# include "CarlaBridgeToolkit.hpp" | |||||
#endif | |||||
CARLA_BRIDGE_START_NAMESPACE | CARLA_BRIDGE_START_NAMESPACE | ||||
@@ -27,13 +30,6 @@ CARLA_BRIDGE_START_NAMESPACE | |||||
} // Fix editor indentation | } // Fix editor indentation | ||||
#endif | #endif | ||||
/*! | |||||
* @defgroup CarlaBridgeClient Carla Bridge Client | |||||
* | |||||
* The Carla Bridge Client. | |||||
* @{ | |||||
*/ | |||||
class CarlaBridgeClient | class CarlaBridgeClient | ||||
{ | { | ||||
public: | public: | ||||
@@ -53,6 +49,24 @@ public: | |||||
virtual void* getWidget() const = 0; | virtual void* getWidget() const = 0; | ||||
virtual bool isResizable() const = 0; | virtual bool isResizable() const = 0; | ||||
virtual bool needsReparent() const = 0; | virtual bool needsReparent() const = 0; | ||||
// --------------------------------------------------------------------- | |||||
// ui processing | |||||
virtual void setParameter(const int32_t rindex, const float value) = 0; | |||||
virtual void setProgram(const uint32_t index) = 0; | |||||
virtual void setMidiProgram(const uint32_t bank, const uint32_t program) = 0; | |||||
virtual void noteOn(const uint8_t channel, const uint8_t note, const uint8_t velo) = 0; | |||||
virtual void noteOff(const uint8_t channel, const uint8_t note) = 0; | |||||
// --------------------------------------------------------------------- | |||||
// ui toolkit | |||||
void toolkitShow(); | |||||
void toolkitHide(); | |||||
void toolkitResize(const int width, const int height); | |||||
void toolkitExec(const bool showGui); | |||||
void toolkitQuit(); | |||||
#endif | #endif | ||||
#ifdef BUILD_BRIDGE_PLUGIN | #ifdef BUILD_BRIDGE_PLUGIN | ||||
@@ -64,18 +78,6 @@ public: | |||||
virtual void setChunkData(const char* const filePath) = 0; | virtual void setChunkData(const char* const filePath) = 0; | ||||
#endif | #endif | ||||
// --------------------------------------------------------------------- | |||||
// processing | |||||
virtual void setParameter(const int32_t rindex, const float value) = 0; | |||||
#ifndef BUILD_BRIDGE_PLUGIN | |||||
virtual void setProgram(const uint32_t index) = 0; | |||||
virtual void setMidiProgram(const uint32_t bank, const uint32_t program) = 0; | |||||
virtual void noteOn(const uint8_t channel, const uint8_t note, const uint8_t velo) = 0; | |||||
virtual void noteOff(const uint8_t channel, const uint8_t note) = 0; | |||||
#endif | |||||
// --------------------------------------------------------------------- | // --------------------------------------------------------------------- | ||||
// osc stuff | // osc stuff | ||||
@@ -91,17 +93,6 @@ public: | |||||
void sendOscBridgeError(const char* const error); | void sendOscBridgeError(const char* const error); | ||||
#endif | #endif | ||||
#ifdef BUILD_BRIDGE_UI | |||||
// --------------------------------------------------------------------- | |||||
// toolkit | |||||
void toolkitShow(); | |||||
void toolkitHide(); | |||||
void toolkitResize(const int width, const int height); | |||||
void toolkitExec(const bool showGui); | |||||
void toolkitQuit(); | |||||
#endif | |||||
// --------------------------------------------------------------------- | // --------------------------------------------------------------------- | ||||
protected: | protected: | ||||
@@ -142,7 +133,10 @@ private: | |||||
UI(CarlaBridgeToolkit* const toolkit_) | UI(CarlaBridgeToolkit* const toolkit_) | ||||
: toolkit(toolkit_), | : toolkit(toolkit_), | ||||
lib(nullptr), | lib(nullptr), | ||||
quit(false) {} | |||||
quit(false) | |||||
{ | |||||
CARLA_ASSERT(toolkit != nullptr); | |||||
} | |||||
~UI() | ~UI() | ||||
{ | { | ||||
@@ -161,6 +155,12 @@ private: | |||||
toolkit->quit(); | toolkit->quit(); | ||||
} | } | ||||
# ifdef CARLA_PROPER_CPP11_SUPPORT | |||||
UI() = delete; | |||||
UI(UI&) = delete; | |||||
UI(const UI&) = delete; | |||||
# endif | |||||
} fUI; | } fUI; | ||||
#else | #else | ||||
friend class CarlaPluginClient; | friend class CarlaPluginClient; | ||||
@@ -171,8 +171,6 @@ private: | |||||
CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaBridgeClient) | CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaBridgeClient) | ||||
}; | }; | ||||
/**@}*/ | |||||
CARLA_BRIDGE_END_NAMESPACE | CARLA_BRIDGE_END_NAMESPACE | ||||
#endif // __CARLA_BRIDGE_CLIENT_HPP__ | #endif // __CARLA_BRIDGE_CLIENT_HPP__ |
@@ -15,10 +15,8 @@ | |||||
* For a full copy of the GNU General Public License see the GPL.txt file | * For a full copy of the GNU General Public License see the GPL.txt file | ||||
*/ | */ | ||||
#include "CarlaBridgeOsc.hpp" | |||||
#include "CarlaBridgeClient.hpp" | #include "CarlaBridgeClient.hpp" | ||||
#include "CarlaMIDI.h" | #include "CarlaMIDI.h" | ||||
#include "CarlaUtils.hpp" | |||||
CARLA_BRIDGE_START_NAMESPACE | CARLA_BRIDGE_START_NAMESPACE | ||||
@@ -41,6 +39,7 @@ CarlaBridgeOsc::~CarlaBridgeOsc() | |||||
CARLA_ASSERT(fName.isEmpty()); | CARLA_ASSERT(fName.isEmpty()); | ||||
CARLA_ASSERT(fServerPath.isEmpty()); | CARLA_ASSERT(fServerPath.isEmpty()); | ||||
CARLA_ASSERT(fServer == nullptr); | CARLA_ASSERT(fServer == nullptr); | ||||
CARLA_ASSERT(fControlData.source == nullptr); // must never be used | |||||
carla_debug("CarlaBridgeOsc::~CarlaBridgeOsc()"); | carla_debug("CarlaBridgeOsc::~CarlaBridgeOsc()"); | ||||
} | } | ||||
@@ -100,6 +99,7 @@ void CarlaBridgeOsc::close() | |||||
CARLA_ASSERT(fName.isNotEmpty()); | CARLA_ASSERT(fName.isNotEmpty()); | ||||
CARLA_ASSERT(fServerPath.isNotEmpty()); | CARLA_ASSERT(fServerPath.isNotEmpty()); | ||||
CARLA_ASSERT(fServer != nullptr); | CARLA_ASSERT(fServer != nullptr); | ||||
CARLA_ASSERT(fControlData.source == nullptr); // must never be used | |||||
carla_debug("CarlaBridgeOsc::close()"); | carla_debug("CarlaBridgeOsc::close()"); | ||||
fName.clear(); | fName.clear(); | ||||
@@ -151,8 +151,8 @@ int CarlaBridgeOsc::handleMessage(const char* const path, const int argc, const | |||||
} | } | ||||
// Get method from path | // Get method from path | ||||
char method[32] = { 0 }; | |||||
std::strncpy(method, path + (nameSize + 2), 31); | |||||
char method[32+1] = { '\0' }; | |||||
std::strncpy(method, path + (nameSize + 2), 32); | |||||
if (method[0] == '\0') | if (method[0] == '\0') | ||||
{ | { | ||||
@@ -160,19 +160,18 @@ int CarlaBridgeOsc::handleMessage(const char* const path, const int argc, const | |||||
return 1; | return 1; | ||||
} | } | ||||
// Common OSC methods | |||||
#ifdef BUILD_BRIDGE_UI | |||||
// Common UI methods | |||||
if (std::strcmp(method, "configure") == 0) | if (std::strcmp(method, "configure") == 0) | ||||
return handleMsgConfigure(argc, argv, types); | return handleMsgConfigure(argc, argv, types); | ||||
if (std::strcmp(method, "control") == 0) | if (std::strcmp(method, "control") == 0) | ||||
return handleMsgControl(argc, argv, types); | return handleMsgControl(argc, argv, types); | ||||
#ifndef BUILD_BRIDGE_PLUGIN | |||||
if (std::strcmp(method, "program") == 0) | if (std::strcmp(method, "program") == 0) | ||||
return handleMsgProgram(argc, argv, types); | return handleMsgProgram(argc, argv, types); | ||||
if (std::strcmp(method, "midi-program") == 0) | if (std::strcmp(method, "midi-program") == 0) | ||||
return handleMsgMidiProgram(argc, argv, types); | return handleMsgMidiProgram(argc, argv, types); | ||||
if (std::strcmp(method, "midi") == 0) | if (std::strcmp(method, "midi") == 0) | ||||
return handleMsgMidi(argc, argv, types); | return handleMsgMidi(argc, argv, types); | ||||
#endif | |||||
if (std::strcmp(method, "sample-rate") == 0) | if (std::strcmp(method, "sample-rate") == 0) | ||||
return 0; // unused | return 0; // unused | ||||
if (std::strcmp(method, "show") == 0) | if (std::strcmp(method, "show") == 0) | ||||
@@ -182,23 +181,23 @@ int CarlaBridgeOsc::handleMessage(const char* const path, const int argc, const | |||||
if (std::strcmp(method, "quit") == 0) | if (std::strcmp(method, "quit") == 0) | ||||
return handleMsgQuit(); | return handleMsgQuit(); | ||||
#ifdef BRIDGE_LV2 | |||||
# ifdef BRIDGE_LV2 | |||||
// LV2 UI methods | // LV2 UI methods | ||||
if (std::strcmp(method, "lv2_atom_transfer") == 0) | if (std::strcmp(method, "lv2_atom_transfer") == 0) | ||||
return handleMsgLv2AtomTransfer(argc, argv, types); | return handleMsgLv2AtomTransfer(argc, argv, types); | ||||
if (std::strcmp(method, "lv2_urid_map") == 0) | if (std::strcmp(method, "lv2_urid_map") == 0) | ||||
return handleMsgLv2UridMap(argc, argv, types); | return handleMsgLv2UridMap(argc, argv, types); | ||||
# endif | |||||
#endif | #endif | ||||
#ifdef BUILD_BRIDGE_PLUGIN | #ifdef BUILD_BRIDGE_PLUGIN | ||||
// Plugin methods | // Plugin methods | ||||
if (std::strcmp(method, "plugin_save_now") == 0) | if (std::strcmp(method, "plugin_save_now") == 0) | ||||
return handleMsgPluginSaveNow(); | return handleMsgPluginSaveNow(); | ||||
// TODO: | |||||
//if (std::strcmp(method, "plugin_set_parameter_midi_channel") == 0) | |||||
// return handleMsgPluginSetParameterMidiChannel(argv); | |||||
//if (std::strcmp(method, "plugin_set_parameter_midi_cc") == 0) | |||||
// return handleMsgPluginSetParameterMidiCC(argv); | |||||
if (std::strcmp(method, "plugin_set_parameter_midi_channel") == 0) | |||||
return handleMsgPluginSetParameterMidiChannel(argv); | |||||
if (std::strcmp(method, "plugin_set_parameter_midi_cc") == 0) | |||||
return handleMsgPluginSetParameterMidiCC(argv); | |||||
if (std::strcmp(method, "plugin_set_chunk") == 0) | if (std::strcmp(method, "plugin_set_chunk") == 0) | ||||
return handleMsgPluginSetChunk(argc, argv, types); | return handleMsgPluginSetChunk(argc, argv, types); | ||||
if (std::strcmp(method, "plugin_set_custom_data") == 0) | if (std::strcmp(method, "plugin_set_custom_data") == 0) | ||||
@@ -209,6 +208,7 @@ int CarlaBridgeOsc::handleMessage(const char* const path, const int argc, const | |||||
return 1; | return 1; | ||||
} | } | ||||
#ifdef BUILD_BRIDGE_UI | |||||
int CarlaBridgeOsc::handleMsgConfigure(CARLA_BRIDGE_OSC_HANDLE_ARGS) | int CarlaBridgeOsc::handleMsgConfigure(CARLA_BRIDGE_OSC_HANDLE_ARGS) | ||||
{ | { | ||||
CARLA_ASSERT(kClient != nullptr); | CARLA_ASSERT(kClient != nullptr); | ||||
@@ -247,7 +247,6 @@ int CarlaBridgeOsc::handleMsgControl(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
return 0; | return 0; | ||||
} | } | ||||
#ifndef BUILD_BRIDGE_PLUGIN | |||||
int CarlaBridgeOsc::handleMsgProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS) | int CarlaBridgeOsc::handleMsgProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS) | ||||
{ | { | ||||
CARLA_ASSERT(kClient != nullptr); | CARLA_ASSERT(kClient != nullptr); | ||||
@@ -340,9 +339,7 @@ int CarlaBridgeOsc::handleMsgMidi(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
return 0; | return 0; | ||||
} | } | ||||
#endif | |||||
#ifdef BUILD_BRIDGE_UI | |||||
int CarlaBridgeOsc::handleMsgShow() | int CarlaBridgeOsc::handleMsgShow() | ||||
{ | { | ||||
CARLA_ASSERT(kClient != nullptr); | CARLA_ASSERT(kClient != nullptr); | ||||
@@ -381,6 +378,6 @@ int CarlaBridgeOsc::handleMsgQuit() | |||||
return 0; | return 0; | ||||
} | } | ||||
#endif | |||||
#endif // BUILD_BRIDGE_UI | |||||
CARLA_BRIDGE_END_NAMESPACE | CARLA_BRIDGE_END_NAMESPACE |
@@ -19,7 +19,6 @@ | |||||
#define __CARLA_BRIDGE_OSC_HPP__ | #define __CARLA_BRIDGE_OSC_HPP__ | ||||
#include "CarlaBridge.hpp" | #include "CarlaBridge.hpp" | ||||
#include "CarlaJuceUtils.hpp" | |||||
#include "CarlaOscUtils.hpp" | #include "CarlaOscUtils.hpp" | ||||
#include "CarlaString.hpp" | #include "CarlaString.hpp" | ||||
@@ -97,24 +96,26 @@ private: | |||||
int handleMessage(const char* const path, const int argc, const lo_arg* const* const argv, const char* const types, const lo_message msg); | int handleMessage(const char* const path, const int argc, const lo_arg* const* const argv, const char* const types, const lo_message msg); | ||||
#ifdef BUILD_BRIDGE_UI | |||||
int handleMsgConfigure(CARLA_BRIDGE_OSC_HANDLE_ARGS); | int handleMsgConfigure(CARLA_BRIDGE_OSC_HANDLE_ARGS); | ||||
int handleMsgControl(CARLA_BRIDGE_OSC_HANDLE_ARGS); | int handleMsgControl(CARLA_BRIDGE_OSC_HANDLE_ARGS); | ||||
#ifndef BUILD_BRIDGE_PLUGIN | |||||
int handleMsgProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS); | int handleMsgProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS); | ||||
int handleMsgMidiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS); | int handleMsgMidiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS); | ||||
int handleMsgMidi(CARLA_BRIDGE_OSC_HANDLE_ARGS); | int handleMsgMidi(CARLA_BRIDGE_OSC_HANDLE_ARGS); | ||||
#endif | |||||
int handleMsgShow(); | int handleMsgShow(); | ||||
int handleMsgHide(); | int handleMsgHide(); | ||||
int handleMsgQuit(); | int handleMsgQuit(); | ||||
#ifdef BRIDGE_LV2 | |||||
# ifdef BRIDGE_LV2 | |||||
int handleMsgLv2AtomTransfer(CARLA_BRIDGE_OSC_HANDLE_ARGS); | int handleMsgLv2AtomTransfer(CARLA_BRIDGE_OSC_HANDLE_ARGS); | ||||
int handleMsgLv2UridMap(CARLA_BRIDGE_OSC_HANDLE_ARGS); | int handleMsgLv2UridMap(CARLA_BRIDGE_OSC_HANDLE_ARGS); | ||||
# endif | |||||
#endif | #endif | ||||
#ifdef BUILD_BRIDGE_PLUGIN | #ifdef BUILD_BRIDGE_PLUGIN | ||||
int handleMsgPluginSaveNow(); | int handleMsgPluginSaveNow(); | ||||
int handleMsgPluginSetParameterMidiChannel(CARLA_BRIDGE_OSC_HANDLE_ARGS); | |||||
int handleMsgPluginSetParameterMidiCC(CARLA_BRIDGE_OSC_HANDLE_ARGS); | |||||
int handleMsgPluginSetChunk(CARLA_BRIDGE_OSC_HANDLE_ARGS); | int handleMsgPluginSetChunk(CARLA_BRIDGE_OSC_HANDLE_ARGS); | ||||
int handleMsgPluginSetCustomData(CARLA_BRIDGE_OSC_HANDLE_ARGS); | int handleMsgPluginSetCustomData(CARLA_BRIDGE_OSC_HANDLE_ARGS); | ||||
#endif | #endif | ||||
@@ -16,7 +16,6 @@ | |||||
*/ | */ | ||||
#include "CarlaBridgeToolkit.hpp" | #include "CarlaBridgeToolkit.hpp" | ||||
#include "CarlaUtils.hpp" | |||||
CARLA_BRIDGE_START_NAMESPACE | CARLA_BRIDGE_START_NAMESPACE | ||||
@@ -27,13 +27,6 @@ CARLA_BRIDGE_START_NAMESPACE | |||||
} // Fix editor indentation | } // Fix editor indentation | ||||
#endif | #endif | ||||
/*! | |||||
* @defgroup CarlaBridgeToolkit Carla Bridge Toolkit | |||||
* | |||||
* The Carla Bridge Toolkit. | |||||
* @{ | |||||
*/ | |||||
class CarlaBridgeToolkit | class CarlaBridgeToolkit | ||||
{ | { | ||||
public: | public: | ||||
@@ -59,8 +52,6 @@ protected: | |||||
CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaBridgeToolkit) | CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaBridgeToolkit) | ||||
}; | }; | ||||
/**@}*/ | |||||
CARLA_BRIDGE_END_NAMESPACE | CARLA_BRIDGE_END_NAMESPACE | ||||
#endif // __CARLA_BRIDGE_TOOLKIT_HPP__ | #endif // __CARLA_BRIDGE_TOOLKIT_HPP__ |
@@ -38,7 +38,9 @@ static const char* const appName = "Carla-UIs"; | |||||
#endif | #endif | ||||
static int gargc = 0; | static int gargc = 0; | ||||
static char** gargv = {}; | |||||
static char** gargv = nullptr; | |||||
// QSettings settings("falkTX", appName); | |||||
// ------------------------------------------------------------------------- | // ------------------------------------------------------------------------- | ||||
@@ -46,8 +48,7 @@ class CarlaToolkitGtk : public CarlaBridgeToolkit | |||||
{ | { | ||||
public: | public: | ||||
CarlaToolkitGtk(CarlaBridgeClient* const client, const char* const uiTitle) | CarlaToolkitGtk(CarlaBridgeClient* const client, const char* const uiTitle) | ||||
: CarlaBridgeToolkit(client, uiTitle), | |||||
settings("falkTX", appName) | |||||
: CarlaBridgeToolkit(client, uiTitle) | |||||
{ | { | ||||
carla_debug("CarlaToolkitGtk::CarlaToolkitGtk(%p, \"%s\")", client, uiTitle); | carla_debug("CarlaToolkitGtk::CarlaToolkitGtk(%p, \"%s\")", client, uiTitle); | ||||
@@ -182,7 +183,6 @@ public: | |||||
protected: | protected: | ||||
GtkWidget* window; | GtkWidget* window; | ||||
QSettings settings; | |||||
gint lastX, lastY, lastWidth, lastHeight; | gint lastX, lastY, lastWidth, lastHeight; | ||||
@@ -17,7 +17,7 @@ | |||||
#include "CarlaBridgeClient.hpp" | #include "CarlaBridgeClient.hpp" | ||||
#include "CarlaBridgeToolkit.hpp" | #include "CarlaBridgeToolkit.hpp" | ||||
//#include "CarlaStyle.hpp" | |||||
#include "CarlaStyle.hpp" | |||||
#include <QtCore/QSettings> | #include <QtCore/QSettings> | ||||
#include <QtCore/QThread> | #include <QtCore/QThread> | ||||
@@ -69,56 +69,52 @@ static char* qargv[0] = {}; | |||||
// ------------------------------------------------------------------------- | // ------------------------------------------------------------------------- | ||||
class CarlaBridgeToolkitQt: public CarlaBridgeToolkit, | |||||
public QObject | |||||
class CarlaBridgeToolkitQt: public QObject, | |||||
public CarlaBridgeToolkit | |||||
{ | { | ||||
Q_OBJECT | |||||
public: | public: | ||||
CarlaBridgeToolkitQt(CarlaBridgeClient* const client, const char* const uiTitle) | CarlaBridgeToolkitQt(CarlaBridgeClient* const client, const char* const uiTitle) | ||||
: CarlaBridgeToolkit(client, uiTitle), | |||||
QObject(nullptr) | |||||
: QObject(nullptr), | |||||
CarlaBridgeToolkit(client, uiTitle), | |||||
fApp(nullptr), | |||||
fWindow(nullptr), | |||||
#ifdef BRIDGE_CONTAINER | |||||
fEmbedContainer(nullptr), | |||||
#endif | |||||
fMsgTimer(0) | |||||
{ | { | ||||
carla_debug("CarlaBridgeToolkitQt::CarlaBridgeToolkitQt(%p, \"%s\")", client, uiTitle); | carla_debug("CarlaBridgeToolkitQt::CarlaBridgeToolkitQt(%p, \"%s\")", client, uiTitle); | ||||
app = nullptr; | |||||
window = nullptr; | |||||
msgTimer = 0; | |||||
needsResize = false; | |||||
nextWidth = 0; | |||||
nextHeight = 0; | |||||
#ifdef BRIDGE_CONTAINER | |||||
embedContainer = nullptr; | |||||
#endif | |||||
connect(this, SIGNAL(setSizeSafeSignal(int,int)), SLOT(setSizeSafeSlot(int,int))); | |||||
} | } | ||||
~CarlaBridgeToolkitQt() override | ~CarlaBridgeToolkitQt() override | ||||
{ | { | ||||
CARLA_ASSERT(! app); | |||||
CARLA_ASSERT(! window); | |||||
CARLA_ASSERT(! msgTimer); | |||||
CARLA_ASSERT(fApp == nullptr); | |||||
CARLA_ASSERT(fWindow == nullptr); | |||||
CARLA_ASSERT(fMsgTimer == 0); | |||||
carla_debug("CarlaBridgeToolkitQt::~CarlaBridgeToolkitQt()"); | carla_debug("CarlaBridgeToolkitQt::~CarlaBridgeToolkitQt()"); | ||||
} | } | ||||
void init() override | void init() override | ||||
{ | { | ||||
CARLA_ASSERT(! app); | |||||
CARLA_ASSERT(! window); | |||||
CARLA_ASSERT(! msgTimer); | |||||
CARLA_ASSERT(fApp == nullptr); | |||||
CARLA_ASSERT(fWindow == nullptr); | |||||
CARLA_ASSERT(fMsgTimer == 0); | |||||
carla_debug("CarlaBridgeToolkitQt::init()"); | carla_debug("CarlaBridgeToolkitQt::init()"); | ||||
app = new QApplication(qargc, qargv); | |||||
fApp = new QApplication(qargc, qargv); | |||||
#if 0 | |||||
{ | { | ||||
QSettings settings("falkTX", "Carla"); | QSettings settings("falkTX", "Carla"); | ||||
if (settings.value("Main/UseProTheme", true).toBool()) | if (settings.value("Main/UseProTheme", true).toBool()) | ||||
{ | { | ||||
CarlaStyle* const style(new CarlaStyle()); | CarlaStyle* const style(new CarlaStyle()); | ||||
app->setStyle(style); | |||||
style->ready(app); | |||||
fApp->setStyle(style); | |||||
style->ready(fApp); | |||||
QString color(settings.value("Main/ProThemeColor", "Black").toString()); | QString color(settings.value("Main/ProThemeColor", "Black").toString()); | ||||
@@ -128,229 +124,238 @@ public: | |||||
style->setColorScheme(CarlaStyle::COLOR_BLACK); | style->setColorScheme(CarlaStyle::COLOR_BLACK); | ||||
} | } | ||||
} | } | ||||
#endif | |||||
window = new QMainWindow(nullptr); | |||||
window->resize(30, 30); | |||||
window->hide(); | |||||
fWindow = new QMainWindow(nullptr); | |||||
fWindow->resize(30, 30); | |||||
fWindow->hide(); | |||||
} | } | ||||
void exec(const bool showGui) override | void exec(const bool showGui) override | ||||
{ | { | ||||
CARLA_ASSERT(app); | |||||
CARLA_ASSERT(window); | |||||
CARLA_ASSERT(kClient); | |||||
CARLA_ASSERT(kClient != nullptr); | |||||
CARLA_ASSERT(fApp != nullptr); | |||||
CARLA_ASSERT(fWindow != nullptr); | |||||
carla_debug("CarlaBridgeToolkitQt::exec(%s)", bool2str(showGui)); | carla_debug("CarlaBridgeToolkitQt::exec(%s)", bool2str(showGui)); | ||||
#if defined(BRIDGE_QT4) || defined(BRIDGE_QT5) | #if defined(BRIDGE_QT4) || defined(BRIDGE_QT5) | ||||
QWidget* const widget = (QWidget*)kClient->getWidget(); | |||||
QWidget* const widget((QWidget*)kClient->getWidget()); | |||||
window->setCentralWidget(widget); | |||||
window->adjustSize(); | |||||
fWindow->setCentralWidget(widget); | |||||
fWindow->adjustSize(); | |||||
widget->setParent(window); | |||||
widget->setParent(fWindow); | |||||
widget->show(); | widget->show(); | ||||
#endif | #endif | ||||
if (! kClient->isResizable()) | if (! kClient->isResizable()) | ||||
{ | { | ||||
window->setFixedSize(window->width(), window->height()); | |||||
fWindow->setFixedSize(fWindow->width(), fWindow->height()); | |||||
#ifdef Q_OS_WIN | #ifdef Q_OS_WIN | ||||
window->setWindowFlags(window->windowFlags() | Qt::MSWindowsFixedSizeDialogHint); | |||||
fWindow->setWindowFlags(fWindow->windowFlags() | Qt::MSWindowsFixedSizeDialogHint); | |||||
#endif | #endif | ||||
} | } | ||||
window->setWindowTitle(kUiTitle); | |||||
{ | { | ||||
QSettings settings("falkTX", appName); | QSettings settings("falkTX", appName); | ||||
if (settings.contains(QString("%1/pos_x").arg(kUiTitle))) | if (settings.contains(QString("%1/pos_x").arg(kUiTitle))) | ||||
{ | { | ||||
bool hasX, hasY; | bool hasX, hasY; | ||||
int posX = settings.value(QString("%1/pos_x").arg(kUiTitle), window->x()).toInt(&hasX); | |||||
int posY = settings.value(QString("%1/pos_y").arg(kUiTitle), window->y()).toInt(&hasY); | |||||
const int posX(settings.value(QString("%1/pos_x").arg(kUiTitle), fWindow->x()).toInt(&hasX)); | |||||
const int posY(settings.value(QString("%1/pos_y").arg(kUiTitle), fWindow->y()).toInt(&hasY)); | |||||
if (hasX && hasY) | if (hasX && hasY) | ||||
window->move(posX, posY); | |||||
fWindow->move(posX, posY); | |||||
if (kClient->isResizable()) | if (kClient->isResizable()) | ||||
{ | { | ||||
bool hasWidth, hasHeight; | bool hasWidth, hasHeight; | ||||
int width = settings.value(QString("%1/width").arg(kUiTitle), window->width()).toInt(&hasWidth); | |||||
int height = settings.value(QString("%1/height").arg(kUiTitle), window->height()).toInt(&hasHeight); | |||||
const int width(settings.value(QString("%1/width").arg(kUiTitle), fWindow->width()).toInt(&hasWidth)); | |||||
const int height(settings.value(QString("%1/height").arg(kUiTitle), fWindow->height()).toInt(&hasHeight)); | |||||
if (hasWidth && hasHeight) | if (hasWidth && hasHeight) | ||||
window->resize(width, height); | |||||
fWindow->resize(width, height); | |||||
} | } | ||||
} | } | ||||
if (settings.value("Engine/UIsAlwaysOnTop", true).toBool()) | |||||
fWindow->setWindowFlags(fWindow->windowFlags() | Qt::WindowStaysOnTopHint); | |||||
} | } | ||||
fWindow->setWindowTitle(kUiTitle); | |||||
if (showGui) | if (showGui) | ||||
show(); | show(); | ||||
else | else | ||||
kClient->sendOscUpdate(); | kClient->sendOscUpdate(); | ||||
// Timer | |||||
msgTimer = startTimer(50); | |||||
fMsgTimer = startTimer(50); | |||||
// First idle | // First idle | ||||
handleTimeout(); | handleTimeout(); | ||||
// Main loop | // Main loop | ||||
app->exec(); | |||||
fApp->exec(); | |||||
} | } | ||||
void quit() override | void quit() override | ||||
{ | { | ||||
CARLA_ASSERT(app); | |||||
CARLA_ASSERT(kClient != nullptr); | |||||
CARLA_ASSERT(fApp != nullptr); | |||||
CARLA_ASSERT(fWindow != nullptr); | |||||
carla_debug("CarlaBridgeToolkitQt::quit()"); | carla_debug("CarlaBridgeToolkitQt::quit()"); | ||||
if (msgTimer != 0) | |||||
if (fMsgTimer != 0) | |||||
{ | { | ||||
killTimer(msgTimer); | |||||
msgTimer = 0; | |||||
killTimer(fMsgTimer); | |||||
fMsgTimer = 0; | |||||
} | } | ||||
if (window != nullptr) | |||||
if (fWindow != nullptr) | |||||
{ | { | ||||
QSettings settings("falkTX", appName); | QSettings settings("falkTX", appName); | ||||
settings.setValue(QString("%1/pos_x").arg(kUiTitle), window->x()); | |||||
settings.setValue(QString("%1/pos_y").arg(kUiTitle), window->y()); | |||||
settings.setValue(QString("%1/width").arg(kUiTitle), window->width()); | |||||
settings.setValue(QString("%1/height").arg(kUiTitle), window->height()); | |||||
settings.setValue(QString("%1/pos_x").arg(kUiTitle), fWindow->x()); | |||||
settings.setValue(QString("%1/pos_y").arg(kUiTitle), fWindow->y()); | |||||
settings.setValue(QString("%1/width").arg(kUiTitle), fWindow->width()); | |||||
settings.setValue(QString("%1/height").arg(kUiTitle), fWindow->height()); | |||||
settings.sync(); | settings.sync(); | ||||
window->close(); | |||||
} | |||||
fWindow->close(); | |||||
#ifdef BRIDGE_CONTAINER | #ifdef BRIDGE_CONTAINER | ||||
if (embedContainer != nullptr) | |||||
{ | |||||
embedContainer->close(); | |||||
if (fEmbedContainer != nullptr) | |||||
{ | |||||
fEmbedContainer->close(); | |||||
delete embedContainer; | |||||
embedContainer = nullptr; | |||||
} | |||||
delete fEmbedContainer; | |||||
fEmbedContainer = nullptr; | |||||
} | |||||
#endif | #endif | ||||
if (window != nullptr) | |||||
{ | |||||
delete window; | |||||
window = nullptr; | |||||
delete fWindow; | |||||
fWindow = nullptr; | |||||
} | } | ||||
if (app) | |||||
if (fApp != nullptr) | |||||
{ | { | ||||
if (! app->closingDown()) | |||||
app->quit(); | |||||
if (! fApp->closingDown()) | |||||
fApp->quit(); | |||||
delete app; | |||||
app = nullptr; | |||||
delete fApp; | |||||
fApp = nullptr; | |||||
} | } | ||||
} | } | ||||
void show() override | void show() override | ||||
{ | { | ||||
CARLA_ASSERT(window); | |||||
CARLA_ASSERT(fWindow != nullptr); | |||||
carla_debug("CarlaBridgeToolkitQt::show()"); | carla_debug("CarlaBridgeToolkitQt::show()"); | ||||
if (window) | |||||
window->show(); | |||||
if (fWindow != nullptr) | |||||
fWindow->show(); | |||||
} | } | ||||
void hide() override | void hide() override | ||||
{ | { | ||||
CARLA_ASSERT(window); | |||||
CARLA_ASSERT(fWindow != nullptr); | |||||
carla_debug("CarlaBridgeToolkitQt::hide()"); | carla_debug("CarlaBridgeToolkitQt::hide()"); | ||||
if (window) | |||||
window->hide(); | |||||
if (fWindow != nullptr) | |||||
fWindow->hide(); | |||||
} | } | ||||
void resize(const int width, const int height) override | void resize(const int width, const int height) override | ||||
{ | { | ||||
CARLA_ASSERT(window); | |||||
CARLA_ASSERT_INT(width > 0, width); | |||||
CARLA_ASSERT_INT(height > 0, height); | |||||
carla_debug("CarlaBridgeToolkitQt::resize(%i, %i)", width, height); | carla_debug("CarlaBridgeToolkitQt::resize(%i, %i)", width, height); | ||||
if (app->thread() != QThread::currentThread()) | |||||
{ | |||||
nextWidth = width; | |||||
nextHeight = height; | |||||
needsResize = true; | |||||
if (width <= 0) | |||||
return; | |||||
if (height <= 0) | |||||
return; | return; | ||||
} | |||||
if (window) | |||||
window->setFixedSize(width, height); | |||||
#ifdef BRIDGE_CONTAINER | |||||
if (embedContainer) | |||||
embedContainer->setFixedSize(width, height); | |||||
#endif | |||||
emit setSizeSafeSignal(width, height); | |||||
} | } | ||||
#ifdef BRIDGE_CONTAINER | #ifdef BRIDGE_CONTAINER | ||||
void* getContainerId() | void* getContainerId() | ||||
{ | { | ||||
CARLA_ASSERT(window != nullptr); | |||||
CARLA_ASSERT(fWindow != nullptr); | |||||
carla_debug("CarlaBridgeToolkitQt::getContainerId()"); | carla_debug("CarlaBridgeToolkitQt::getContainerId()"); | ||||
if (embedContainer == nullptr) | |||||
if (fEmbedContainer == nullptr) | |||||
{ | { | ||||
embedContainer = new QEmbedContainer(window); | |||||
fEmbedContainer = new QEmbedContainer(fWindow); | |||||
window->setCentralWidget(embedContainer); | |||||
window->adjustSize(); | |||||
fWindow->setCentralWidget(fEmbedContainer); | |||||
fWindow->adjustSize(); | |||||
embedContainer->setParent(window); | |||||
embedContainer->show(); | |||||
fEmbedContainer->setParent(fWindow); | |||||
fEmbedContainer->show(); | |||||
} | } | ||||
return (void*)embedContainer->winId(); | |||||
return (void*)fEmbedContainer->winId(); | |||||
} | } | ||||
#endif | #endif | ||||
protected: | protected: | ||||
QApplication* app; | |||||
QMainWindow* window; | |||||
int msgTimer; | |||||
bool needsResize; | |||||
int nextWidth, nextHeight; | |||||
QApplication* fApp; | |||||
QMainWindow* fWindow; | |||||
#ifdef BRIDGE_CONTAINER | #ifdef BRIDGE_CONTAINER | ||||
QEmbedContainer* embedContainer; | |||||
QEmbedContainer* fEmbedContainer; | |||||
#endif | #endif | ||||
int fMsgTimer; | |||||
void handleTimeout() | void handleTimeout() | ||||
{ | { | ||||
if (! kClient) | |||||
if (kClient == nullptr) | |||||
return; | return; | ||||
if (needsResize) | |||||
{ | |||||
kClient->toolkitResize(nextWidth, nextHeight); | |||||
needsResize = false; | |||||
} | |||||
if (kClient->isOscControlRegistered() && ! kClient->oscIdle()) | if (kClient->isOscControlRegistered() && ! kClient->oscIdle()) | ||||
{ | { | ||||
killTimer(msgTimer); | |||||
msgTimer = 0; | |||||
killTimer(fMsgTimer); | |||||
fMsgTimer = 0; | |||||
} | } | ||||
} | } | ||||
private: | private: | ||||
void timerEvent(QTimerEvent* const event) | void timerEvent(QTimerEvent* const event) | ||||
{ | { | ||||
if (event->timerId() == msgTimer) | |||||
if (event->timerId() == fMsgTimer) | |||||
handleTimeout(); | handleTimeout(); | ||||
QObject::timerEvent(event); | QObject::timerEvent(event); | ||||
} | } | ||||
signals: | |||||
void setSizeSafeSignal(int, int); | |||||
private slots: | |||||
void setSizeSafeSlot(int width, int height) | |||||
{ | |||||
CARLA_ASSERT(kClient != nullptr && kClient->isResizable()); | |||||
CARLA_ASSERT(fWindow != nullptr); | |||||
if (kClient == nullptr || fWindow == nullptr) | |||||
return; | |||||
if (kClient->isResizable()) | |||||
fWindow->resize(width, height); | |||||
else | |||||
fWindow->setFixedSize(width, height); | |||||
#ifdef BRIDGE_CONTAINER | |||||
if (fEmbedContainer != nullptr) | |||||
fEmbedContainer->setFixedSize(width, height); | |||||
#endif | |||||
} | |||||
}; | }; | ||||
#include "CarlaBridgeToolkitQt.moc" | |||||
// ------------------------------------------------------------------------- | // ------------------------------------------------------------------------- | ||||
CarlaBridgeToolkit* CarlaBridgeToolkit::createNew(CarlaBridgeClient* const client, const char* const uiTitle) | CarlaBridgeToolkit* CarlaBridgeToolkit::createNew(CarlaBridgeClient* const client, const char* const uiTitle) | ||||
@@ -20,9 +20,6 @@ | |||||
#include "CarlaMIDI.h" | #include "CarlaMIDI.h" | ||||
#include "RtList.hpp" | #include "RtList.hpp" | ||||
// TODO - remove | |||||
#include <vector> | |||||
#include <QtCore/QDir> | #include <QtCore/QDir> | ||||
extern "C" { | extern "C" { | ||||
@@ -34,11 +31,14 @@ extern "C" { | |||||
Lv2WorldClass gLv2World; | Lv2WorldClass gLv2World; | ||||
// ----------------------------------------------------- | |||||
CARLA_BRIDGE_START_NAMESPACE | CARLA_BRIDGE_START_NAMESPACE | ||||
// ------------------------------------------------------------------------- | |||||
#if 0 | |||||
} | |||||
#endif | |||||
// fake values | |||||
static uint32_t gBufferSize = 1024; | static uint32_t gBufferSize = 1024; | ||||
static double gSampleRate = 44100.0; | static double gSampleRate = 44100.0; | ||||
@@ -8,20 +8,18 @@ include ../Makefile.mk | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
QT_UI_FLAGS = -I../theme | |||||
ifeq ($(HAVE_QT4),true) | ifeq ($(HAVE_QT4),true) | ||||
QT_UI_FLAGS += $(shell pkg-config --cflags QtGui) | |||||
QT_UI_LIBS = $(shell pkg-config --libs QtGui) | |||||
QT_UI_FLAGS = $(shell pkg-config --cflags QtGui) | |||||
QT_UI_LIBS = $(shell pkg-config --libs QtGui) | |||||
else | else | ||||
QT_UI_FLAGS += $(shell pkg-config --cflags Qt5Gui Qt5Widgets) | |||||
QT_UI_LIBS = $(shell pkg-config --libs Qt5Gui Qt5Widgets) | |||||
QT_UI_FLAGS = $(shell pkg-config --cflags Qt5Gui Qt5Widgets) | |||||
QT_UI_LIBS = $(shell pkg-config --libs Qt5Gui Qt5Widgets) | |||||
endif | endif | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
BUILD_CXX_FLAGS += -DBUILD_BRIDGE | BUILD_CXX_FLAGS += -DBUILD_BRIDGE | ||||
BUILD_CXX_FLAGS += -I. -I../backend -I../includes -I../utils | |||||
BUILD_CXX_FLAGS += -I. -I../backend -I../includes -I../utils -I../theme | |||||
BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo) | BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo) | ||||
LINK_FLAGS += $(shell pkg-config --libs liblo) | LINK_FLAGS += $(shell pkg-config --libs liblo) | ||||
@@ -37,7 +35,7 @@ endif | |||||
# Plugin bridges | # Plugin bridges | ||||
BUILD_PLUGIN_FLAGS = $(BUILD_CXX_FLAGS) -DBUILD_BRIDGE_PLUGIN | BUILD_PLUGIN_FLAGS = $(BUILD_CXX_FLAGS) -DBUILD_BRIDGE_PLUGIN | ||||
BUILD_PLUGIN_FLAGS += -I../backend/engine -I../backend/plugin -I../libs -I../theme | |||||
BUILD_PLUGIN_FLAGS += -I../backend/engine -I../backend/plugin -I../libs | |||||
LINK_PLUGIN_FLAGS = $(LINK_FLAGS) -lpthread | LINK_PLUGIN_FLAGS = $(LINK_FLAGS) -lpthread | ||||
ifeq ($(CARLA_PLUGIN_SUPPORT),true) | ifeq ($(CARLA_PLUGIN_SUPPORT),true) | ||||
@@ -58,22 +56,22 @@ endif | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Plugin bridges (POSIX) | # Plugin bridges (POSIX) | ||||
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) -ldl | |||||
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) -ldl | |||||
ifneq ($(MACOS),true) | ifneq ($(MACOS),true) | ||||
POSIX_LINK_FLAGS += -lrt | |||||
POSIX_LINK_FLAGS += -lrt | |||||
endif | endif | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Plugin bridges (Windows) | # Plugin bridges (Windows) | ||||
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 -lwinspool -lole32 -luuid -limm32 -lshell32 -lws2_32 -L../libs | |||||
WIN_BUILD_FLAGS = $(BUILD_PLUGIN_FLAGS) -DJACKBRIDGE_EXPORT | |||||
WIN_32BIT_FLAGS = $(32BIT_FLAGS) | |||||
WIN_64BIT_FLAGS = $(64BIT_FLAGS) | |||||
WIN_LINK_FLAGS = $(LINK_PLUGIN_FLAGS) -mwindows -lwinspool -lole32 -luuid -limm32 -lshell32 -lws2_32 -L../libs | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Plugin bridges (Native) | # Plugin bridges (Native) | ||||
@@ -85,9 +83,8 @@ DGL_LIBS = -lX11 | |||||
endif | endif | ||||
NATIVE_BUILD_FLAGS = $(POSIX_BUILD_FLAGS) | NATIVE_BUILD_FLAGS = $(POSIX_BUILD_FLAGS) | ||||
NATIVE_LINK_FLAGS = $(POSIX_LINK_FLAGS) | |||||
NATIVE_BUILD_FLAGS += -DWANT_NATIVE | NATIVE_BUILD_FLAGS += -DWANT_NATIVE | ||||
NATIVE_LINK_FLAGS = $(POSIX_LINK_FLAGS) | |||||
ifeq ($(HAVE_FLUIDSYNTH),true) | ifeq ($(HAVE_FLUIDSYNTH),true) | ||||
NATIVE_BUILD_FLAGS += -DWANT_FLUIDSYNTH | NATIVE_BUILD_FLAGS += -DWANT_FLUIDSYNTH | ||||
@@ -134,8 +131,12 @@ endif | |||||
BUILD_UI_FLAGS = $(BUILD_CXX_FLAGS) -DBUILD_BRIDGE_UI | BUILD_UI_FLAGS = $(BUILD_CXX_FLAGS) -DBUILD_BRIDGE_UI | ||||
LINK_UI_FLAGS = $(LINK_FLAGS) -ldl | LINK_UI_FLAGS = $(LINK_FLAGS) -ldl | ||||
BUILD_UI_LV2_FLAGS = $(BUILD_UI_FLAGS) -DBRIDGE_LV2 | |||||
BUILD_UI_VST_FLAGS = $(BUILD_UI_FLAGS) -DBRIDGE_VST | |||||
BUILD_UI_LV2_FLAGS = $(BUILD_UI_FLAGS) -DBRIDGE_LV2 | |||||
BUILD_UI_VST_FLAGS = $(BUILD_UI_FLAGS) -DBRIDGE_VST | |||||
ifeq ($(CARLA_VESTIGE_HEADER),true) | |||||
BUILD_UI_VST_FLAGS += -DVESTIGE_HEADER | |||||
endif | |||||
BUILD_UI_LV2_GTK2_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_GTK2 -DBRIDGE_LV2_GTK2 $(shell pkg-config --cflags gtk+-2.0) | BUILD_UI_LV2_GTK2_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_GTK2 -DBRIDGE_LV2_GTK2 $(shell pkg-config --cflags gtk+-2.0) | ||||
LINK_UI_LV2_GTK2_FLAGS = $(LINK_UI_FLAGS) $(shell pkg-config --libs gtk+-2.0) | LINK_UI_LV2_GTK2_FLAGS = $(LINK_UI_FLAGS) $(shell pkg-config --libs gtk+-2.0) | ||||
@@ -150,7 +151,7 @@ BUILD_UI_LV2_QT5_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_QT5 -DBRIDGE_LV2_QT5 $ | |||||
LINK_UI_LV2_QT5_FLAGS = $(LINK_UI_FLAGS) $(shell pkg-config --libs Qt5Gui Qt5Widgets) | LINK_UI_LV2_QT5_FLAGS = $(LINK_UI_FLAGS) $(shell pkg-config --libs Qt5Gui Qt5Widgets) | ||||
BUILD_UI_LV2_COCOA_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_COCOA -DBRIDGE_LV2_COCOA $(QT_UI_FLAGS) | BUILD_UI_LV2_COCOA_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_COCOA -DBRIDGE_LV2_COCOA $(QT_UI_FLAGS) | ||||
LINK_UI_LV2_COCOA_FLAGS = $(LINK_FLAGS) $(QT_UI_LIBS) | |||||
LINK_UI_LV2_COCOA_FLAGS = $(LINK_UI_FLAGS) $(QT_UI_LIBS) | |||||
BUILD_UI_LV2_HWND_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_HWND -DBRIDGE_LV2_HWND $(QT_UI_FLAGS) | BUILD_UI_LV2_HWND_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_HWND -DBRIDGE_LV2_HWND $(QT_UI_FLAGS) | ||||
LINK_UI_LV2_HWND_FLAGS = $(LINK_FLAGS) $(QT_UI_LIBS) -mwindows -static | LINK_UI_LV2_HWND_FLAGS = $(LINK_FLAGS) $(QT_UI_LIBS) -mwindows -static | ||||
@@ -159,7 +160,7 @@ BUILD_UI_LV2_X11_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_X11 -DBRIDGE_LV2_X11 $ | |||||
LINK_UI_LV2_X11_FLAGS = $(LINK_UI_FLAGS) $(QT_UI_LIBS) | LINK_UI_LV2_X11_FLAGS = $(LINK_UI_FLAGS) $(QT_UI_LIBS) | ||||
BUILD_UI_VST_COCOA_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_COCOA -DBRIDGE_VST_COCOA $(QT_UI_FLAGS) | BUILD_UI_VST_COCOA_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_COCOA -DBRIDGE_VST_COCOA $(QT_UI_FLAGS) | ||||
LINK_UI_VST_COCOA_FLAGS = $(LINK_FLAGS) $(QT_UI_LIBS) | |||||
LINK_UI_VST_COCOA_FLAGS = $(LINK_UI_FLAGS) $(QT_UI_LIBS) | |||||
BUILD_UI_VST_HWND_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_HWND -DBRIDGE_VST_HWND $(QT_UI_FLAGS) | BUILD_UI_VST_HWND_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_HWND -DBRIDGE_VST_HWND $(QT_UI_FLAGS) | ||||
LINK_UI_VST_HWND_FLAGS = $(LINK_FLAGS) $(QT_UI_LIBS) -mwindows -static | LINK_UI_VST_HWND_FLAGS = $(LINK_FLAGS) $(QT_UI_LIBS) -mwindows -static | ||||
@@ -167,23 +168,9 @@ LINK_UI_VST_HWND_FLAGS = $(LINK_FLAGS) $(QT_UI_LIBS) -mwindows -static | |||||
BUILD_UI_VST_X11_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_X11 -DBRIDGE_VST_X11 $(QT_UI_FLAGS) | BUILD_UI_VST_X11_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_X11 -DBRIDGE_VST_X11 $(QT_UI_FLAGS) | ||||
LINK_UI_VST_X11_FLAGS = $(LINK_UI_FLAGS) $(QT_UI_LIBS) | LINK_UI_VST_X11_FLAGS = $(LINK_UI_FLAGS) $(QT_UI_LIBS) | ||||
ifeq ($(HAVE_QT4),true) | |||||
BUILD_UI_LV2_QT4_FLAGS += -I../theme | |||||
LINK_UI_LV2_QT4_FLAGS += ../libs/theme.a | |||||
else | |||||
BUILD_UI_LV2_QT5_FLAGS += -I../theme | |||||
LINK_UI_LV2_QT5_FLAGS += ../libs/theme.a | |||||
endif | |||||
ifeq ($(CARLA_VESTIGE_HEADER),true) | |||||
BUILD_UI_VST_COCOA_FLAGS += -DVESTIGE_HEADER | |||||
BUILD_UI_VST_HWND_FLAGS += -DVESTIGE_HEADER | |||||
BUILD_UI_VST_X11_FLAGS += -DVESTIGE_HEADER | |||||
endif | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
TARGETS = native | |||||
TARGETS = native | |||||
ifeq ($(CARLA_PLUGIN_SUPPORT),true) | ifeq ($(CARLA_PLUGIN_SUPPORT),true) | ||||
ifeq ($(HAVE_GTK2),true) | ifeq ($(HAVE_GTK2),true) | ||||
@@ -194,10 +181,11 @@ TARGETS += ui_lv2-gtk3 | |||||
endif | endif | ||||
ifeq ($(HAVE_QT4),true) | ifeq ($(HAVE_QT4),true) | ||||
TARGETS += ui_lv2-qt4 | TARGETS += ui_lv2-qt4 | ||||
endif | |||||
else | |||||
ifeq ($(HAVE_QT5),true) | ifeq ($(HAVE_QT5),true) | ||||
TARGETS += ui_lv2-qt5 | TARGETS += ui_lv2-qt5 | ||||
endif | endif | ||||
endif | |||||
TARGETS += ui_lv2-x11 | TARGETS += ui_lv2-x11 | ||||
TARGETS += ui_vst-x11 | TARGETS += ui_vst-x11 | ||||
endif | endif | ||||
@@ -236,6 +224,9 @@ win64: carla-bridge-win64.exe | |||||
%__vst.o: %.cpp | %__vst.o: %.cpp | ||||
$(CXX) $< $(BUILD_UI_VST_FLAGS) -c -o $@ | $(CXX) $< $(BUILD_UI_VST_FLAGS) -c -o $@ | ||||
CarlaBridgeToolkitQt.moc: CarlaBridgeToolkitQt.cpp | |||||
$(MOC) $< -DMOC_PARSING -o $@ | |||||
OBJS_UI_LV2_LIBS = \ | OBJS_UI_LV2_LIBS = \ | ||||
../libs/lilv.a \ | ../libs/lilv.a \ | ||||
../libs/rtmempool.a | ../libs/rtmempool.a | ||||
@@ -273,10 +264,10 @@ OBJS_UI_LV2_QT4 = CarlaBridgeUI-LV2__lv2-qt4.o \ | |||||
CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ | CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ | ||||
CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-qt4.o | CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-qt4.o | ||||
carla-bridge-lv2-qt4: $(OBJS_UI_LV2_QT4) $(OBJS_UI_LV2_LIBS) | |||||
carla-bridge-lv2-qt4: $(OBJS_UI_LV2_QT4) $(OBJS_UI_LV2_LIBS) ../libs/theme.a | |||||
$(CXX) $^ $(LINK_UI_LV2_QT4_FLAGS) -o $@ $(CMD_STRIP) $@ | $(CXX) $^ $(LINK_UI_LV2_QT4_FLAGS) -o $@ $(CMD_STRIP) $@ | ||||
%__lv2-qt4.o: %.cpp | |||||
%__lv2-qt4.o: %.cpp CarlaBridgeToolkitQt.moc | |||||
$(CXX) $< $(BUILD_UI_LV2_QT4_FLAGS) -c -o $@ | $(CXX) $< $(BUILD_UI_LV2_QT4_FLAGS) -c -o $@ | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
@@ -286,12 +277,38 @@ OBJS_UI_LV2_QT5 = CarlaBridgeUI-LV2__lv2-qt5.o \ | |||||
CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ | CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ | ||||
CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-qt5.o | CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-qt5.o | ||||
carla-bridge-lv2-qt5: $(OBJS_UI_LV2_QT5) $(OBJS_UI_LV2_LIBS) | |||||
carla-bridge-lv2-qt5: $(OBJS_UI_LV2_QT5) $(OBJS_UI_LV2_LIBS) ../libs/theme.a | |||||
$(CXX) $^ $(LINK_UI_LV2_QT5_FLAGS) -o $@ $(CMD_STRIP) $@ | $(CXX) $^ $(LINK_UI_LV2_QT5_FLAGS) -o $@ $(CMD_STRIP) $@ | ||||
%__lv2-qt5.o: %.cpp | |||||
%__lv2-qt5.o: %.cpp CarlaBridgeToolkitQt.moc | |||||
$(CXX) $< $(BUILD_UI_LV2_QT5_FLAGS) -c -o $@ | $(CXX) $< $(BUILD_UI_LV2_QT5_FLAGS) -c -o $@ | ||||
# -------------------------------------------------------------- | |||||
# ui_lv2-cocoa | |||||
OBJS_UI_LV2_COCOA = CarlaBridgeUI-LV2__lv2-cocoa.o \ | |||||
CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ | |||||
CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-cocoa.o | |||||
carla-bridge-lv2-cocoa: $(OBJS_UI_LV2_COCOA) $(OBJS_UI_LV2_LIBS) ../libs/theme.a | |||||
$(CXX) $^ $(LINK_UI_LV2_COCOA_FLAGS) -o $@ $(CMD_STRIP) $@ | |||||
%__lv2-cocoa.o: %.cpp CarlaBridgeToolkitQt.moc | |||||
$(CXX) $< $(BUILD_UI_LV2_COCOA_FLAGS) -c -o $@ | |||||
# -------------------------------------------------------------- | |||||
# ui_lv2-hwnd | |||||
OBJS_UI_LV2_HWND = CarlaBridgeUI-LV2__lv2-hwnd.o \ | |||||
CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ | |||||
CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-hwnd.o | |||||
carla-bridge-lv2-hwnd.exe: $(OBJS_UI_LV2_HWND) $(OBJS_UI_LV2_LIBS) ../libs/theme.a | |||||
$(CXX) $^ $(LINK_UI_LV2_HWND_FLAGS) -o $@ $(CMD_STRIP) $@ | |||||
%__lv2-hwnd.o: %.cpp CarlaBridgeToolkitQt.moc | |||||
$(CXX) $< $(BUILD_UI_LV2_HWND_FLAGS) -c -o $@ | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# ui_lv2-x11 | # ui_lv2-x11 | ||||
@@ -302,9 +319,22 @@ OBJS_UI_LV2_X11 = CarlaBridgeUI-LV2__lv2-x11.o \ | |||||
carla-bridge-lv2-x11: $(OBJS_UI_LV2_X11) $(OBJS_UI_LV2_LIBS) ../libs/theme.a | carla-bridge-lv2-x11: $(OBJS_UI_LV2_X11) $(OBJS_UI_LV2_LIBS) ../libs/theme.a | ||||
$(CXX) $^ $(LINK_UI_LV2_X11_FLAGS) -o $@ $(CMD_STRIP) $@ | $(CXX) $^ $(LINK_UI_LV2_X11_FLAGS) -o $@ $(CMD_STRIP) $@ | ||||
%__lv2-x11.o: %.cpp | |||||
%__lv2-x11.o: %.cpp CarlaBridgeToolkitQt.moc | |||||
$(CXX) $< $(BUILD_UI_LV2_X11_FLAGS) -c -o $@ | $(CXX) $< $(BUILD_UI_LV2_X11_FLAGS) -c -o $@ | ||||
# -------------------------------------------------------------- | |||||
# ui_vst-cocoa | |||||
OBJS_UI_VST_COCOA = CarlaBridgeUI-VST__vst-cocoa.o \ | |||||
CarlaBridgeClient__vst.o CarlaBridgeOsc__vst.o \ | |||||
CarlaBridgeToolkit__vst.o CarlaBridgeToolkitQt__vst-cocoa.o | |||||
carla-bridge-vst-cocoa: $(OBJS_UI_VST_COCOA) ../libs/theme.a | |||||
$(CXX) $^ $(LINK_UI_VST_COCOA_FLAGS) -o $@ $(CMD_STRIP) $@ | |||||
%__vst-cocoa.o: %.cpp CarlaBridgeToolkitQt.moc | |||||
$(CXX) $< $(BUILD_UI_VST_COCOA_FLAGS) -c -o $@ | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# ui_vst-hwnd | # ui_vst-hwnd | ||||
@@ -315,7 +345,7 @@ OBJS_UI_VST_HWND = CarlaBridgeUI-VST__vst-hwnd.o \ | |||||
carla-bridge-vst-hwnd.exe: $(OBJS_UI_VST_HWND) ../libs/theme.a | carla-bridge-vst-hwnd.exe: $(OBJS_UI_VST_HWND) ../libs/theme.a | ||||
$(CXX) $^ $(LINK_UI_VST_HWND_FLAGS) -o $@ $(CMD_STRIP) $@ | $(CXX) $^ $(LINK_UI_VST_HWND_FLAGS) -o $@ $(CMD_STRIP) $@ | ||||
%__vst-hwnd.o: %.cpp | |||||
%__vst-hwnd.o: %.cpp CarlaBridgeToolkitQt.moc | |||||
$(CXX) $< $(BUILD_UI_VST_HWND_FLAGS) -c -o $@ | $(CXX) $< $(BUILD_UI_VST_HWND_FLAGS) -c -o $@ | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
@@ -328,7 +358,7 @@ OBJS_UI_VST_X11 = CarlaBridgeUI-VST__vst-x11.o \ | |||||
carla-bridge-vst-x11: $(OBJS_UI_VST_X11) ../libs/theme.a | carla-bridge-vst-x11: $(OBJS_UI_VST_X11) ../libs/theme.a | ||||
$(CXX) $^ $(LINK_UI_VST_X11_FLAGS) -o $@ $(CMD_STRIP) $@ | $(CXX) $^ $(LINK_UI_VST_X11_FLAGS) -o $@ $(CMD_STRIP) $@ | ||||
%__vst-x11.o: %.cpp | |||||
%__vst-x11.o: %.cpp CarlaBridgeToolkitQt.moc | |||||
$(CXX) $< $(BUILD_UI_VST_X11_FLAGS) -c -o $@ | $(CXX) $< $(BUILD_UI_VST_X11_FLAGS) -c -o $@ | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
@@ -583,14 +613,14 @@ doxygen: carla_bridge.doxygen | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
clean: | clean: | ||||
rm -f *.o *.dll *.so *.exe | |||||
rm -f *.moc *.o *.dll *.dylib *.so *.exe | |||||
rm -f $(OBJS_NATIVE) | rm -f $(OBJS_NATIVE) | ||||
rm -f $(OBJS_POSIX32) | rm -f $(OBJS_POSIX32) | ||||
rm -f $(OBJS_POSIX64) | rm -f $(OBJS_POSIX64) | ||||
rm -f $(OBJS_WIN32) | rm -f $(OBJS_WIN32) | ||||
rm -f $(OBJS_WIN64) | rm -f $(OBJS_WIN64) | ||||
rm -f carla-bridge-lv2-gtk2 carla-bridge-lv2-gtk3 carla-bridge-lv2-qt4 carla-bridge-lv2-qt5 carla-bridge-lv2-x11 | |||||
rm -f carla-bridge-vst-x11 | |||||
rm -f carla-bridge-lv2-gtk2 carla-bridge-lv2-gtk3 carla-bridge-lv2-qt4 carla-bridge-lv2-qt5 carla-bridge-lv2-cocoa carla-bridge-lv2-x11 | |||||
rm -f carla-bridge-vst-cocoa carla-bridge-vst-x11 | |||||
rm -f carla-bridge-native carla-bridge-posix32 carla-bridge-posix64 | rm -f carla-bridge-native carla-bridge-posix32 carla-bridge-posix64 | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||