changeset 585:1f5dd6fc196f

Permit looking up the plugin path (for RDF purposes) even if we can't load the jVamp native library
author Chris Cannam
date Tue, 24 Jun 2014 15:32:06 +0100
parents aeaf60fad179
children 14e3e3d5f906
files src/may/vamp/vamprdf.yeti
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/may/vamp/vamprdf.yeti	Mon Jun 23 16:14:19 2014 +0100
+++ b/src/may/vamp/vamprdf.yeti	Tue Jun 24 15:32:06 2014 +0100
@@ -16,7 +16,20 @@
 
 getPluginPath () =
    (try map string PluginLoader#getInstance()#getPluginPath();
-    catch UnsatisfiedLinkError e: [];
+    catch UnsatisfiedLinkError e: 
+        eprintln "WARNING: getPluginPath: Failed to load jVamp library: \(e#getMessage())";
+        eprintln "(Looking up VAMP_PATH environment variable directly instead)";
+        try
+            path = System#getenv("VAMP_PATH");
+            if nullptr? path then []
+            else
+                sep = System#getProperty("path.separator");
+                list (strSplit sep path);
+            fi
+        catch Exception e:
+            eprintln "(Caught exception: \(e#getMessage())";
+            [];
+        yrt;
     yrt);
 
 systemVampRdfFiles () =