]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Additional patch for ParaView 4.1: support native separators in PV_PLUGIN_PATH
authorvsr <vsr@opencascade.com>
Mon, 12 May 2014 13:57:41 +0000 (17:57 +0400)
committervsr <vsr@opencascade.com>
Mon, 12 May 2014 13:57:41 +0000 (17:57 +0400)
config_files/patches/ParaView-4.1.0.patch

index bd52a604dc642d75b3db730149946b1b7fe66d0c..87da8a525ea65921e3ea2d53579ff6b946599751 100644 (file)
@@ -367,3 +367,47 @@ diff -Naur --exclude=CVS ParaView-4.1.0_SRC-orig/Wrapping/Python/paraview/server
          self.__arrays = []
          for i in range(0, nElems, 2):
              if self.GetElement(i+1) != '0':
+diff -Naur ParaView-4.1.0_SRC-orig/ParaViewCore/ClientServerCore/Core/vtkPVPluginLoader.cxx ParaView-4.1.0_SRC-new/ParaViewCore/ClientServerCore/Core/vtkPVPluginLoader.cxx
+--- ParaView-4.1.0_SRC-orig/ParaViewCore/ClientServerCore/Core/vtkPVPluginLoader.cxx   2014-01-11 17:59:57.000000000 +0400
++++ ParaView-4.1.0_SRC-new/ParaViewCore/ClientServerCore/Core/vtkPVPluginLoader.cxx    2014-05-08 11:16:16.000000000 +0400
+@@ -42,6 +42,13 @@
+ #define vtkPVPluginLoaderErrorMacro(x)\
+   if (!no_errors) {vtkErrorMacro(<< x);} this->SetErrorString(x);
++
++#if defined(_WIN32) && !defined(__CYGWIN__)
++const char ENV_PATH_SEP=';';
++#else
++const char ENV_PATH_SEP=':';
++#endif
++
+ namespace
+ {
+   // This is an helper class used for plugins constructed from XMLs.
+@@ -195,7 +202,7 @@
+       appDir += "/plugins";
+       if(paths.size())
+         {
+-        paths += ";";
++        paths += ENV_PATH_SEP/*";"*/;
+         }
+       paths += appDir;
+       }
+@@ -227,10 +234,15 @@
+     << this->SearchPaths);
+   std::vector<std::string> paths;
+-  vtksys::SystemTools::Split(this->SearchPaths, paths, ';');
++  vtksys::SystemTools::Split(this->SearchPaths, paths, ENV_PATH_SEP/*';'*/);
+   for (size_t cc=0; cc < paths.size(); cc++)
+     {
+-    this->LoadPluginsFromPath(paths[cc].c_str());
++    std::vector<std::string> subpaths;
++    vtksys::SystemTools::Split(paths[cc].c_str(), subpaths, ';');
++    for (size_t scc=0; scc < subpaths.size(); scc++)
++      {
++      this->LoadPluginsFromPath(subpaths[scc].c_str());
++      }
+     }
+ #else
+   vtkPVPluginLoaderDebugMacro(