Fix LV2 UIs with spacey paths (e.g. Pianoteq).
This commit is contained in:
parent
3cc0f59d51
commit
5b3ff655f1
|
@ -282,7 +282,21 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title)
|
|||
_lv2->enable_ui_emission();
|
||||
}
|
||||
|
||||
const LilvUI* ui = (const LilvUI*)_lv2->c_ui();
|
||||
const LilvUI* ui = (const LilvUI*)_lv2->c_ui();
|
||||
const LilvNode* bundle = lilv_ui_get_bundle_uri(ui);
|
||||
const LilvNode* binary = lilv_ui_get_binary_uri(ui);
|
||||
#ifdef HAVE_LILV_0_21_1
|
||||
char* ui_bundle_path = lilv_file_uri_parse(lilv_node_as_uri(bundle), NULL);
|
||||
char* ui_binary_path = lilv_file_uri_parse(lilv_node_as_uri(binary), NULL);
|
||||
#else
|
||||
char* ui_bundle_path = strdup(lilv_uri_to_path(lilv_node_as_uri(bundle)));
|
||||
char* ui_binary_path = strdup(lilv_uri_to_path(lilv_node_as_uri(binary)));
|
||||
#endif
|
||||
if (!ui_bundle_path || !ui_binary_path) {
|
||||
error << _("failed to get path for UI bindle or binary") << endmsg;
|
||||
return;
|
||||
}
|
||||
|
||||
_inst = suil_instance_new(
|
||||
ui_host,
|
||||
this,
|
||||
|
@ -290,10 +304,12 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title)
|
|||
_lv2->uri(),
|
||||
lilv_node_as_uri(lilv_ui_get_uri(ui)),
|
||||
lilv_node_as_uri((const LilvNode*)_lv2->c_ui_type()),
|
||||
lilv_uri_to_path(lilv_node_as_uri(lilv_ui_get_bundle_uri(ui))),
|
||||
lilv_uri_to_path(lilv_node_as_uri(lilv_ui_get_binary_uri(ui))),
|
||||
ui_bundle_path,
|
||||
ui_binary_path,
|
||||
features);
|
||||
|
||||
free(ui_bundle_path);
|
||||
free(ui_binary_path);
|
||||
free(features);
|
||||
|
||||
#define GET_WIDGET(inst) suil_instance_get_widget((SuilInstance*)inst);
|
||||
|
|
|
@ -276,6 +276,8 @@ def configure(conf):
|
|||
atleast_version='0.16.0', mandatory=False)
|
||||
autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV_0_19_2',
|
||||
atleast_version='0.19.2', mandatory=False)
|
||||
autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV_0_21_1',
|
||||
atleast_version='0.21.1', mandatory=False)
|
||||
autowaf.check_pkg(conf, 'suil-0', uselib_store='SUIL',
|
||||
atleast_version='0.6.0', mandatory=False)
|
||||
conf.define ('LV2_SUPPORT', 1)
|
||||
|
|
Loading…
Reference in New Issue
Block a user