summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-01-16 02:03:32 +0000
committerDavid Robillard <d@drobilla.net>2008-01-16 02:03:32 +0000
commit2aca277bdc433255cd39b55dc0a1ba562910a2ee (patch)
tree6fff21b4ed403bf0ffdb6e4099ec665e606ff023
parent072105a853f756383fea2ae295f0d97fcc2fac53 (diff)
downloadlilv-2aca277bdc433255cd39b55dc0a1ba562910a2ee.tar.gz
lilv-2aca277bdc433255cd39b55dc0a1ba562910a2ee.tar.bz2
lilv-2aca277bdc433255cd39b55dc0a1ba562910a2ee.zip
Use OSX native plugin search path if __APPLE__ is defined.
git-svn-id: http://svn.drobilla.net/lad/slv2@1061 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/world.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/src/world.c b/src/world.c
index 2faf3c5..3eb1834 100644
--- a/src/world.c
+++ b/src/world.c
@@ -451,33 +451,26 @@ slv2_world_load_all(SLV2World world)
{
char* lv2_path = getenv("LV2_PATH");
- /* 1. Read LV2 ontology into model */
- const char* ontology_path = "/usr/local/share/slv2/lv2.ttl";
- FILE* ontology = fopen(ontology_path, "r");
- if (ontology == NULL) {
- ontology_path = "/usr/share/slv2/lv2.ttl";
- ontology = fopen(ontology_path, "r");
- }
-
- if (ontology) {
- fclose(ontology);
- librdf_uri* ontology_uri = librdf_new_uri_from_filename(world->world,
- ontology_path);
- librdf_parser_parse_into_model(world->parser, ontology_uri, NULL, world->model);
- librdf_free_uri(ontology_uri);
- }
-
- /* 2. Read all manifest files into model */
+ /* 1. Read all manifest files into model */
if (lv2_path) {
slv2_world_load_path(world, lv2_path);
} else {
const char* const home = getenv("HOME");
if (home) {
+#ifdef __APPLE__
+ const char* const suffix = "/Library/Audio/Plug-Ins/LV2:/Library/Audio/Plug-Ins/LV2"
+ ":/usr/local/lib/lv2:/usr/lib/lv2";
+#else
const char* const suffix = "/.lv2:/usr/local/lib/lv2:/usr/lib/lv2";
+#endif
lv2_path = slv2_strjoin(home, suffix, NULL);
} else {
+#ifdef __APPLE__
+ lv2_path = strdup("/Library/Audio/Plug-Ins/LV2:/usr/local/lib/lv2:/usr/lib/lv2");
+#else
lv2_path = strdup("/usr/local/lib/lv2:/usr/lib/lv2");
+#endif
}
slv2_world_load_path(world, lv2_path);
@@ -486,7 +479,7 @@ slv2_world_load_all(SLV2World world)
}
- /* 3. Query out things to cache */
+ /* 2. Query out things to cache */
slv2_world_load_specifications(world);