]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Minor correction to the previous integration: take into account current value of...
authorvsr <vsr@opencascade.com>
Thu, 14 Jun 2012 15:46:41 +0000 (15:46 +0000)
committervsr <vsr@opencascade.com>
Thu, 14 Jun 2012 15:46:41 +0000 (15:46 +0000)
bin/gui_setenv.py

index ee96fbcdbfce50b1c8861e083f17c3626e4baf78..4cadb294e2f73e92033291719329b017a997aea4 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-import os
+import os, re
 
 # -----------------------------------------------------------------------------
 
 def set_env( args ):
     """Add environment required for GUI module"""
-    os.environ[ 'VTK_AUTOLOAD_PATH' ] = os.path.join( os.getenv("GUI_ROOT_DIR"), "lib", "paraview" )
+    vtk_overloads_dir = os.path.join( os.getenv( "GUI_ROOT_DIR" ), "lib", "paraview" )
+    dirs = re.split( ":|;", os.getenv( 'VTK_AUTOLOAD_PATH', vtk_overloads_dir ) )
+    if vtk_overloads_dir not in dirs: dirs[0:0] = [vtk_overloads_dir]
+    os.environ['VTK_AUTOLOAD_PATH'] = os.pathsep.join(dirs)
     return