From 8573fdcacd3e1fc4ac2afa3aaf76b45903ad957a Mon Sep 17 00:00:00 2001 From: salome <> Date: Wed, 21 Sep 2005 13:06:00 +0000 Subject: [PATCH] Portage V3 --- adm_local/unix/config_files/check_msg2qm.m4 | 59 +++++++++++++++++++++ adm_local/unix/make_commence.in | 5 +- configure.in.base | 10 +++- src/EFICASGUI/EFICASGUI.py | 11 ++-- 4 files changed, 79 insertions(+), 6 deletions(-) create mode 100755 adm_local/unix/config_files/check_msg2qm.m4 diff --git a/adm_local/unix/config_files/check_msg2qm.m4 b/adm_local/unix/config_files/check_msg2qm.m4 new file mode 100755 index 00000000..30e63765 --- /dev/null +++ b/adm_local/unix/config_files/check_msg2qm.m4 @@ -0,0 +1,59 @@ +# Check availability of Qt's msg2qm tool binary distribution +# +# Author : Jerome Roy (CEA, 2003) +# + +AC_DEFUN([CHECK_MSG2QM],[ +AC_CHECKING(for msg2qm) + +msg2qm_ok=no + +AC_ARG_WITH(msg2qm, + [ --with-msg2qm=root_directory_path_of_MSG2QM_installation], + MSG2QM_DIR="$withval",MSG2QM_DIR="") + +if test "x$MSG2QM_DIR" == "x" ; then + # no --with-MSG2QM-dir option used + if test "x$MSG2QM_ROOT" != "x" ; then + # MSG2QM_ROOT environment variable defined + MSG2QM_DIR=$MSG2QM_ROOT + else + # search MSG2QM binaries in PATH variable + AC_PATH_PROG(TEMP, msg2qm) + if test "x$TEMP" != "x" ; then + MSG2QM_DIR=`dirname $TEMP` + fi + fi +fi + +# look for msg2qm in ${MSG2QM_DIR} directory +if test -f ${MSG2QM_DIR}/msg2qm ; then + msg2qm_ok=yes + MSG2QM="${MSG2QM_DIR}/msg2qm" + AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR}) +else + # if not found, look for msg2qm in ${MSG2QM_DIR}/bin directory + if test -f ${MSG2QM_DIR}/bin/msg2qm ; then + msg2qm_ok=yes + MSG2QM="${MSG2QM_DIR}/bin/msg2qm" + AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR}/bin) + fi +fi + +if test "$msg2qm_ok" == "no"; then + # At last, let's have a look in SALOME (until V2.2.X) + SALOME_MSG2QM=${KERNEL_ROOT_DIR}/bin/salome/msg2qm + if test -f $SALOME_MSG2QM ; then + msg2qm_ok=yes + MSG2QM=${SALOME_MSG2QM} + AC_MSG_RESULT(Using MSG2QM executable provided with SALOME KERNEL) + else + AC_MSG_WARN("Cannot find MSG2QM executable in SALOME") + fi +fi + +AC_SUBST(MSG2QM) +AC_MSG_RESULT(for MSG2QM: $msg2qm_ok) + +])dnl + diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in index f6d5ea9c..fd01839b 100644 --- a/adm_local/unix/make_commence.in +++ b/adm_local/unix/make_commence.in @@ -61,6 +61,8 @@ QT_MT_LIBS = @QT_MT_LIBS@ MOC = @MOC@ UIC = @UIC@ +# msg2qm +MSG2QM = @MSG2QM@ #QWT @@ -242,8 +244,7 @@ ac_cxx_mutable.m4 check_mico.m4 libtool.m4 \ ac_cxx_namespaces.m4 check_omniorb.m4 pyembed.m4 \ ac_cxx_partial_specialization.m4 check_opengl.m4 python.m4 \ ac_cxx_typename.m4 check_pthreads.m4 check_cas.m4 \ -ac_cc_warnings.m4 check_qt.m4 check_med2.m4 \ -check_swig.m4 +ac_cc_warnings.m4 check_qt.m4 check_swig.m4 $(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) cd $(top_srcdir) ; aclocal --acdir=adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files diff --git a/configure.in.base b/configure.in.base index 5c3c20c9..fbe274f8 100644 --- a/configure.in.base +++ b/configure.in.base @@ -273,6 +273,14 @@ echo CHECK_KERNEL +echo +echo --------------------------------------------- +echo testing msg2qm +echo --------------------------------------------- +echo + +CHECK_MSG2QM + echo echo --------------------------------------------- echo Testing Visu @@ -296,7 +304,7 @@ echo --------------------------------------------- echo echo Configure -variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok" +variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok msg2qm_ok" for var in $variables do diff --git a/src/EFICASGUI/EFICASGUI.py b/src/EFICASGUI/EFICASGUI.py index aa607ebe..a4d8df4f 100644 --- a/src/EFICASGUI/EFICASGUI.py +++ b/src/EFICASGUI/EFICASGUI.py @@ -9,6 +9,7 @@ import SalomePyQt WORKSPACE=None currentStudyId=None +desktop=None # ----------------------------------------------------------------------------- @@ -28,7 +29,7 @@ qt.QObject.connect(qt.qApp,qt.SIGNAL("lastWindowClosed()"),g) import salome -sg=salome.SalomeGUI() +sg=salome.sg sgPyQt=SalomePyQt.SalomePyQt() import salomedsgui aGuiDS=salomedsgui.guiDS() @@ -43,7 +44,7 @@ def setWorkSpace(workSpace): WORKSPACE=workSpace print "WORKSPACE: ",WORKSPACE # le desktop - d=sgPyQt.getDesktop() + desktop=sgPyQt.getDesktop() # creation d'une message box #qt.QMessageBox.information(d,"titre","message") @@ -69,6 +70,8 @@ def setSettings(): Cette méthode permet les initialisations. On définit en particulier l'identifiant de l'étude courante. """ + # le desktop + desktop=sgPyQt.getDesktop() global currentStudyId currentStudyId = sgPyQt.getStudyId() print "setSettings: currentStudyId = " + str(currentStudyId) @@ -79,6 +82,8 @@ def setSettings(): # ----------------------------------------------------------------------------- def activeStudyChanged(ID): + # le desktop + desktop=sgPyQt.getDesktop() global currentStudyId # ne marche pas car sg est supposé résider dans une etude # studyId=sg.getActiveStudyId() @@ -146,6 +151,6 @@ dict_command={ 946:runEficaspourHomard, 4041:runEficas, 4046:runEficaspourHomard, - 9042:runEficasFichier, + 9042:runEficasFichier, } -- 2.39.2