@@ -172,8 +172,9 @@ void CarlaPluginThread::run() | |||||
case PLUGIN_THREAD_LV2_GUI: | case PLUGIN_THREAD_LV2_GUI: | ||||
/* osc-url */ arguments.add(String(fEngine->getOscServerPathUDP()) + String("/") + String(fPlugin->getId())); | /* osc-url */ arguments.add(String(fEngine->getOscServerPathUDP()) + String("/") + String(fPlugin->getId())); | ||||
/* URI */ arguments.add(fLabel.buffer()); | |||||
/* ui-URI */ arguments.add(fExtra1.buffer()); | |||||
/* URI */ arguments.add(fLabel.buffer()); // Plugin URI | |||||
/* ui-URI */ arguments.add(fExtra1.buffer()); // UI URI | |||||
/* ui-URI */ arguments.add(fExtra2.buffer()); // bundle | |||||
/* ui-title */ arguments.add(name + String(" (GUI)")); | /* ui-title */ arguments.add(name + String(" (GUI)")); | ||||
break; | break; | ||||
@@ -5009,7 +5009,7 @@ public: | |||||
{ | { | ||||
carla_stdout("Will use OSC-Bridge UI, binary: \"%s\"", bridgeBinary); | carla_stdout("Will use OSC-Bridge UI, binary: \"%s\"", bridgeBinary); | ||||
fUI.type = UI::TYPE_OSC; | fUI.type = UI::TYPE_OSC; | ||||
pData->osc.thread.setOscData(bridgeBinary, fDescriptor->URI, fUI.rdfDescriptor->URI); | |||||
pData->osc.thread.setOscData(bridgeBinary, fRdfDescriptor->URI, fUI.rdfDescriptor->URI, fUI.rdfDescriptor->Bundle); | |||||
delete[] bridgeBinary; | delete[] bridgeBinary; | ||||
return; | return; | ||||
} | } | ||||
@@ -39,7 +39,7 @@ CarlaBridgeClient::~CarlaBridgeClient() | |||||
// --------------------------------------------------------------------- | // --------------------------------------------------------------------- | ||||
// ui initialization | // ui initialization | ||||
bool CarlaBridgeClient::uiInit(const char* const, const char* const) | |||||
bool CarlaBridgeClient::uiInit(const char*, const char* const, const char* const) | |||||
{ | { | ||||
carla_debug("CarlaBridgeClient::uiInit()"); | carla_debug("CarlaBridgeClient::uiInit()"); | ||||
@@ -34,7 +34,7 @@ public: | |||||
// --------------------------------------------------------------------- | // --------------------------------------------------------------------- | ||||
// ui initialization | // ui initialization | ||||
virtual bool uiInit(const char* const, const char* const); | |||||
virtual bool uiInit(const char*, const char* const, const char* const); | |||||
virtual void uiIdle() {} | virtual void uiIdle() {} | ||||
virtual void uiClose(); | virtual void uiClose(); | ||||
@@ -350,12 +350,27 @@ public: | |||||
// --------------------------------------------------------------------- | // --------------------------------------------------------------------- | ||||
// ui initialization | // ui initialization | ||||
bool uiInit(const char* pluginURI, const char* uiURI) override | |||||
bool uiInit(const char* pluginURI, const char* uiURI, const char* uiBundle) override | |||||
{ | { | ||||
// ----------------------------------------------------------------- | |||||
// load bundle | |||||
Lv2WorldClass& lv2World(Lv2WorldClass::getInstance()); | |||||
Lilv::Node bundleNode(lv2World.new_file_uri(nullptr, uiBundle)); | |||||
CARLA_SAFE_ASSERT_RETURN(bundleNode.is_uri(), false); | |||||
CarlaString sBundle(bundleNode.as_uri()); | |||||
if (! sBundle.endsWith("/")) | |||||
sBundle += "/"; | |||||
lv2World.load_bundle(sBundle); | |||||
// ----------------------------------------------------------------- | // ----------------------------------------------------------------- | ||||
// init | // init | ||||
CarlaBridgeClient::uiInit(pluginURI, uiURI); | |||||
CarlaBridgeClient::uiInit(pluginURI, uiURI, uiBundle); | |||||
// ----------------------------------------------------------------- | // ----------------------------------------------------------------- | ||||
// get plugin from lv2_rdf (lilv) | // get plugin from lv2_rdf (lilv) | ||||
@@ -1212,16 +1227,17 @@ int main(int argc, char* argv[]) | |||||
{ | { | ||||
CARLA_BRIDGE_USE_NAMESPACE | CARLA_BRIDGE_USE_NAMESPACE | ||||
if (argc != 5) | |||||
if (argc != 6) | |||||
{ | { | ||||
carla_stderr("usage: %s <osc-url|\"null\"> <plugin-uri> <ui-uri> <ui-title>", argv[0]); | |||||
carla_stderr("usage: %s <osc-url|\"null\"> <plugin-bundle> <plugin-uri> <ui-uri> <ui-title>", argv[0]); | |||||
return 1; | return 1; | ||||
} | } | ||||
const char* oscUrl = argv[1]; | const char* oscUrl = argv[1]; | ||||
const char* pluginURI = argv[2]; | const char* pluginURI = argv[2]; | ||||
const char* uiURI = argv[3]; | const char* uiURI = argv[3]; | ||||
const char* uiTitle = argv[4]; | |||||
const char* uiBundle = argv[4]; | |||||
const char* uiTitle = argv[5]; | |||||
const bool useOsc(std::strcmp(oscUrl, "null") != 0); | const bool useOsc(std::strcmp(oscUrl, "null") != 0); | ||||
@@ -1242,7 +1258,7 @@ int main(int argc, char* argv[]) | |||||
// Load UI | // Load UI | ||||
int ret; | int ret; | ||||
if (client.uiInit(pluginURI, uiURI)) | |||||
if (client.uiInit(pluginURI, uiURI, uiBundle)) | |||||
{ | { | ||||
client.toolkitExec(!useOsc); | client.toolkitExec(!useOsc); | ||||
ret = 0; | ret = 0; | ||||
@@ -51,12 +51,12 @@ public: | |||||
// --------------------------------------------------------------------- | // --------------------------------------------------------------------- | ||||
// ui initialization | // ui initialization | ||||
bool uiInit(const char* binary, const char*) override | |||||
bool uiInit(const char* binary, const char*, const char*) override | |||||
{ | { | ||||
// ----------------------------------------------------------------- | // ----------------------------------------------------------------- | ||||
// init | // init | ||||
CarlaBridgeClient::uiInit(binary, nullptr); | |||||
CarlaBridgeClient::uiInit(binary, nullptr, nullptr); | |||||
// ----------------------------------------------------------------- | // ----------------------------------------------------------------- | ||||
// open DLL | // open DLL | ||||
@@ -541,7 +541,7 @@ int main(int argc, char* argv[]) | |||||
// Load UI | // Load UI | ||||
int ret; | int ret; | ||||
if (client.uiInit(binary, nullptr)) | |||||
if (client.uiInit(binary, nullptr, nullptr)) | |||||
{ | { | ||||
client.toolkitExec(!useOsc); | client.toolkitExec(!useOsc); | ||||
ret = 0; | ret = 0; | ||||