From: Paul RASCLE Date: Mon, 12 Jun 2017 14:23:04 +0000 (+0200) Subject: check if QT_PLUGIN_PATH environment variable is not a valid directory or non existent... X-Git-Tag: Salome_8_3_Hydro_1_1rc1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=90b877330e64b44ab45e369747efabca003fba0b;p=modules%2Fgui.git check if QT_PLUGIN_PATH environment variable is not a valid directory or non existent before setting it empty --- diff --git a/bin/gui_setenv.py b/bin/gui_setenv.py index 5a4a44be3..ec98f1bc8 100644 --- a/bin/gui_setenv.py +++ b/bin/gui_setenv.py @@ -29,7 +29,12 @@ def set_env( args ): 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) - os.environ['QT_PLUGIN_PATH'] = '' + #print 'QT_PLUGIN_PATH: ', os.environ['QT_PLUGIN_PATH'] + 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) + #print 'QT_PLUGIN_PATH: ', os.environ['QT_PLUGIN_PATH'] + #print 'QT_QPA_PLATFORM_PLUGIN_PATH: ', os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] return - -