changeset 1482:c014839f49c7 plugin-path-config

Record path associated with first helper found for a plugin, not last (so native helper in preference to 32-bit helper). Also more debug output
author Chris Cannam
date Mon, 11 Jun 2018 11:34:11 +0100
parents 75fe1c1e003f
children 7459f4c4d7c3
files plugin/PiperVampPluginFactory.cpp plugin/PluginPathSetter.cpp
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugin/PiperVampPluginFactory.cpp	Fri Jun 08 14:30:33 2018 +0100
+++ b/plugin/PiperVampPluginFactory.cpp	Mon Jun 11 11:34:11 2018 +0100
@@ -217,7 +217,10 @@
             string soname = QFileInfo(c.libraryPath).baseName().toStdString();
             SVDEBUG << "INFO: For tag \"" << tag << "\" giving library " << soname << endl;
             from.push_back(soname);
-            m_libraries[QString::fromStdString(soname)] = c.libraryPath;
+            QString qsoname = QString::fromStdString(soname);
+            if (m_libraries.find(qsoname) == m_libraries.end()) {
+                m_libraries[qsoname] = c.libraryPath;
+            }
         }
     }
 
--- a/plugin/PluginPathSetter.cpp	Fri Jun 08 14:30:33 2018 +0100
+++ b/plugin/PluginPathSetter.cpp	Mon Jun 11 11:34:11 2018 +0100
@@ -252,6 +252,10 @@
         m_originalEnvValues[envVariable] = QString::fromStdString(currentValue);
         if (currentValue != "" && p.second.useEnvVariable) {
             // don't override
+            SVDEBUG << "PluginPathSetter: for environment variable "
+                    << envVariable << ", useEnvVariable setting is false; "
+                    << "leaving current value alone: it is \""
+                    << currentValue << "\"" << endl;
             continue;
         }
         QString separator =
@@ -262,6 +266,12 @@
 #endif
             ;
         QString proposedValue = p.second.directories.join(separator);
+        SVDEBUG << "PluginPathSetter: for environment variable "
+                << envVariable << ", useEnvVariable setting is true or "
+                << "variable is currently unset; "
+                << "changing value from \"" << currentValue
+                << "\" to setting preference of \"" << proposedValue
+                << "\"" << endl;
         putEnvUtf8(envVarStr, proposedValue.toStdString());
     }
 }