summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/world.c11
-rw-r--r--wscript8
2 files changed, 13 insertions, 6 deletions
diff --git a/src/world.c b/src/world.c
index 0a8ab36..dc2ead7 100644
--- a/src/world.c
+++ b/src/world.c
@@ -316,9 +316,6 @@ slv2_world_load_bundle(SLV2World world, SLV2Value bundle_uri)
SLV2Node plugin_node = slv2_match_subject(plug_results);
SLV2Value plugin_uri = slv2_value_new_from_node(world, plugin_node);
- //fprintf(stderr, "Add <%s> in %s\n", sord_node_get_string(plugin_node),
- // sord_node_get_string(bundle_uri->val.uri_val));
-
SLV2Plugin existing = slv2_plugins_get_by_uri(world->plugins, plugin_uri);
if (existing) {
SLV2_ERRORF("Duplicate plugin <%s>\n", slv2_value_as_uri(plugin_uri));
@@ -430,7 +427,10 @@ slv2_world_load_directory(SLV2World world, const char* dir_path)
if (!strcmp(pfile->d_name, ".") || !strcmp(pfile->d_name, ".."))
continue;
- char* uri = slv2_strjoin("file://", path, "/", pfile->d_name, "/", NULL);
+ char* uri = slv2_strjoin("file://",
+ path, SLV2_DIR_SEP,
+ pfile->d_name, SLV2_DIR_SEP,
+ NULL);
DIR* const bundle_dir = opendir(uri + 7);
if (bundle_dir) {
@@ -451,9 +451,8 @@ void
slv2_world_load_path(SLV2World world,
const char* lv2_path)
{
- static const char SLV2_PATH_SEP = ':';
while (lv2_path[0] != '\0') {
- const char* const sep = strchr(lv2_path, SLV2_PATH_SEP);
+ const char* const sep = strchr(lv2_path, SLV2_PATH_SEP[0]);
if (sep) {
const size_t dir_len = sep - lv2_path;
char* const dir = malloc(dir_len + 1);
diff --git a/wscript b/wscript
index 9adf0aa..da63ebb 100644
--- a/wscript
+++ b/wscript
@@ -1,5 +1,6 @@
#!/usr/bin/env python
import autowaf
+import sys
import Options
# Version of this package (even if built as a child)
@@ -87,6 +88,13 @@ def configure(conf):
conf.env['BASH_COMPLETION'] = Options.options.bash_completion
autowaf.define(conf, 'SLV2_DEFAULT_LV2_PATH', Options.options.default_lv2_path)
+ if sys.platform == 'win32':
+ autowaf.define(conf, 'SLV2_PATH_SEP', ';')
+ autowaf.define(conf, 'SLV2_DIR_SEP', '\\')
+ else:
+ autowaf.define(conf, 'SLV2_PATH_SEP', ':')
+ autowaf.define(conf, 'SLV2_DIR_SEP', '/')
+
if conf.env['USE_JACK']:
autowaf.check_header(conf, 'lv2/lv2plug.in/ns/ext/event/event.h', 'HAVE_LV2_EVENT')
autowaf.check_header(conf, 'lv2/lv2plug.in/ns/ext/uri-map/uri-map.h', 'HAVE_LV2_URI_MAP')