From: vsr Date: Thu, 7 Jun 2012 12:16:54 +0000 (+0000) Subject: Automatically set VTK_AUTOLOAD_PATH variable in runtime, to override the crash when... X-Git-Tag: B4WheelZoom~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=37293e99251105465645a745456ebd5fdfe27a90;p=modules%2Fgui.git Automatically set VTK_AUTOLOAD_PATH variable in runtime, to override the crash when compiling PARAVIS module --- diff --git a/bin/Makefile.am b/bin/Makefile.am index cb7e596c1..3d62fcb8a 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -34,3 +34,7 @@ nodist_salomescript_DATA = VERSION dist_salomescript_SCRIPTS = \ runLightSalome.csh \ runLightSalome.sh + +# python files +dist_salomescript_PYTHON = \ + gui_setenv.py diff --git a/bin/gui_setenv.py b/bin/gui_setenv.py new file mode 100644 index 000000000..ee96fbcdb --- /dev/null +++ b/bin/gui_setenv.py @@ -0,0 +1,31 @@ +#! /usr/bin/env python +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +import os + +# ----------------------------------------------------------------------------- + +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" ) + return + +