Salome HOME
updated copyright message
[modules/gui.git] / bin / gui_setenv.py
index d5a4ef872764d7959373f239eb0fb9648d34ff0f..c8922d66c97d1133dbdec2ddf44020b78560f411 100644 (file)
@@ -1,6 +1,5 @@
-#! /usr/bin/env python
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -25,10 +24,9 @@ import os, re
 
 def set_env( args ):
     """Add environment required for GUI module"""
-    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)
+    qt_plugin_dir = os.path.join( os.getenv( "QTDIR" ), "plugins" )
+    dirs = re.split( ":|;", os.getenv( 'QT_PLUGIN_PATH', qt_plugin_dir ) )
+    if qt_plugin_dir not in dirs: dirs[0:0] = [qt_plugin_dir]
+    dirs2 = list(set(dirs))
+    os.environ['QT_PLUGIN_PATH'] = os.pathsep.join(dirs2)
     return
-
-