Browse Source

Fix LV2 discovery on Windows

tags/1.9.5
falkTX 11 years ago
parent
commit
51bbeca095
2 changed files with 9 additions and 5 deletions
  1. +6
    -5
      source/discovery/carla-discovery.cpp
  2. +3
    -0
      source/modules/lilv/lilv-0.20.0/lilv/lilvmm.hpp

+ 6
- 5
source/discovery/carla-discovery.cpp View File

@@ -940,12 +940,13 @@ static void do_lv2_check(const char* const bundle, const bool doInit)
{
Lv2WorldClass& lv2World(Lv2WorldClass::getInstance());

// Convert bundle filename to URI
CarlaString sBundle("file://");
sBundle += bundle;
Lilv::Node bundleNode(lv2World.new_file_uri(nullptr, bundle));
CARLA_SAFE_ASSERT_RETURN(bundleNode.is_uri(),);

if (! sBundle.endsWith(CARLA_OS_SEP))
sBundle += CARLA_OS_SEP_STR;
CarlaString sBundle(bundleNode.as_uri());

if (! sBundle.endsWith("/"))
sBundle += "/";

// Load bundle
lv2World.load_bundle(sBundle);


+ 3
- 0
source/modules/lilv/lilv-0.20.0/lilv/lilvmm.hpp View File

@@ -322,6 +322,9 @@ struct World {
inline LilvNode* new_uri(const char* uri) const {
return lilv_new_uri(me, uri);
}
inline LilvNode* new_file_uri(const char* host, const char* path) const {
return lilv_new_file_uri(me, host, path);
}
inline LilvNode* new_string(const char* str) const {
return lilv_new_string(me, str);
}


Loading…
Cancel
Save