From 3433ad241b069037d780c528ff462b3ce7c2c3be Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 9 May 2007 01:34:35 +0000 Subject: Ontology install path fixes. 0.0.1 versioning stuff. Removed GNU 'standard' files I don't maintain anyway and make automake shutup about it. git-svn-id: http://svn.drobilla.net/lad/slv2@521 a436a847-0d15-0410-975c-d299462d15a1 --- src/world.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/world.c') diff --git a/src/world.c b/src/world.c index ff91ead..913a3ff 100644 --- a/src/world.c +++ b/src/world.c @@ -294,11 +294,20 @@ slv2_world_load_all(SLV2World world) char* lv2_path = getenv("LV2_PATH"); /* 1. Read LV2 ontology into model */ - librdf_uri* ontology_uri = librdf_new_uri(world->world, - (const unsigned char*)"file://" LV2_TTL_PATH); - librdf_parser_parse_into_model(world->parser, ontology_uri, NULL, world->model); - librdf_free_uri(ontology_uri); + 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 */ -- cgit v1.2.1