aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2016-05-01 10:44:46 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2016-05-01 10:44:46 +0200
commitdb59ae8e29398640319e6e4572c2f1107a6c435e (patch)
tree8ba663bc258b558d53086a9c37ec31c47e16f181
parent763fa6e8445aa004ac727779e60115a6f1c0092a (diff)
downloadsherlock.lv2-db59ae8e29398640319e6e4572c2f1107a6c435e.tar.xz
add support for embedded ui bundle dirs.
-rw-r--r--sandbox_slave.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sandbox_slave.c b/sandbox_slave.c
index cbfe9a7..0d6fa0c 100644
--- a/sandbox_slave.c
+++ b/sandbox_slave.c
@@ -473,12 +473,23 @@ sandbox_slave_instantiate(sandbox_slave_t *sb, const LV2_Feature *parent_feature
NULL
};
+ const LilvNode *ui_bundle_uri = lilv_ui_get_bundle_uri(sb->ui);
+#if defined(LILV_0_22)
+ char *ui_bundle_path = lilv_file_uri_parse(lilv_node_as_string(ui_bundle_uri), NULL);
+#else
+ const char *ui_bundle_path = lilv_uri_to_path(lilv_node_as_string(ui_bundle_uri));
+#endif
+
if(sb->desc && sb->desc->instantiate)
{
sb->handle = sb->desc->instantiate(sb->desc, sb->plugin_uri,
- sb->bundle_path, _write_function, sb, widget, features);
+ ui_bundle_path, _write_function, sb, widget, features);
}
+#if defined(LILV_0_22)
+ lilv_free(ui_bundle_path);
+#endif
+
if(sb->handle)
return sb->handle; // success