]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
PR: missing merge
authorprascle <prascle>
Tue, 20 Sep 2005 14:30:54 +0000 (14:30 +0000)
committerprascle <prascle>
Tue, 20 Sep 2005 14:30:54 +0000 (14:30 +0000)
12 files changed:
bin/appliskel/CatalogResources.xml [new file with mode: 0644]
bin/appliskel/README [new file with mode: 0644]
bin/appliskel/SalomeApp.xml [new file with mode: 0644]
bin/appliskel/env.d/atFirst.sh [new file with mode: 0644]
bin/appliskel/env.d/envProducts.sh [new file with mode: 0644]
bin/appliskel/env.d/envSalome.sh [new file with mode: 0644]
bin/appliskel/envd [new file with mode: 0644]
bin/appliskel/runAppli [new file with mode: 0755]
bin/appliskel/runConsole [new file with mode: 0755]
bin/appliskel/runParam [new file with mode: 0755]
bin/appliskel/runRemote.sh [new file with mode: 0755]
bin/appliskel/runSession [new file with mode: 0755]

diff --git a/bin/appliskel/CatalogResources.xml b/bin/appliskel/CatalogResources.xml
new file mode 100644 (file)
index 0000000..8caed2b
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE ResourcesCatalog>
+<resources>
+  <machine 
+          protocol="ssh"
+          nbOfNodes="1"
+          mode="interactif"
+          OS="LINUX"
+          CPUFreqMHz="2800"
+          userName="prascle"
+          memInMB="1500"
+          nbOfProcPerNode="2"
+          alias="cli76cd"
+          hostname="cli76cd" >
+  </machine>
+
+  <machine
+          protocol="ssh"
+          nbOfNodes="1"
+          mode="interactif"
+          OS="LINUX"
+          CPUFreqMHz="2000"
+          userName="prascle"
+          memInMB="1000"
+          nbOfProcPerNode="1"
+          alias="cli76ce"
+          hostname="cli76ce" >
+  </machine>
+</resources>
diff --git a/bin/appliskel/README b/bin/appliskel/README
new file mode 100644 (file)
index 0000000..264b879
--- /dev/null
@@ -0,0 +1,42 @@
+Set of scripts for a SALOME application
+=======================================
+
+#     - A SALOME application distributed on several computers needs APPLI
+#       directories on the same path ($APPLI) relative to $HOME directory
+#       of the user, on each computer.
+
+user scripts:
+-------------
+
+runAppli   : SALOME launch (idem runSalome but different name to avoid
+             confusion with ${KERNEL_ROOT_DIR}/bin/salome/runSalome
+
+runConsole : a python console in the current SALOME session environment
+
+runSession : a shell in SALOME environment, either interactive (without args)
+             or used to run a program (defined by given args)
+
+internal application scripts:
+-----------------------------
+
+runRemote.sh : called from remote computer, via ssh, rsh...
+               used for instance to create container
+
+envd         : sets SALOME application environment
+               sourced by other scripts
+
+The following files must be adapted to your environment and SALOME Application:
+-------------------------------------------------------------------------------
+
+SalomeApp.xml        - list of modules, options on server launch and resources...
+CatalogResources.xml - configuration of machines used in SALOME application
+                       (no need of modules list and path here)
+
+env.d directory must contain the necessary files to source, to define 
+the SALOME Application environment :
+  (  envd script source these files in alphanumeric order )
+
+For instance,
+ atFirst.sh     - general presets
+ envProducts.sh - prerequisite SALOME environment
+ envSalome.sh   - list of MODULE_ROOT_DIR
diff --git a/bin/appliskel/SalomeApp.xml b/bin/appliskel/SalomeApp.xml
new file mode 100644 (file)
index 0000000..6897b71
--- /dev/null
@@ -0,0 +1,100 @@
+<document>
+  <section name="desktop" >
+    <parameter name="state"  value="max"/>
+    <parameter name="pos_x"  value="100"/>
+    <parameter name="pos_y"  value="050"/>
+    <parameter name="width"  value="640"/>
+    <parameter name="height" value="480"/>
+  </section>
+  <section name="launch">
+    <parameter name="gui"        value="yes"/>
+    <parameter name="splash"     value="yes"/>
+    <parameter name="file"       value="no"/>
+    <parameter name="key"        value="no"/>
+    <parameter name="interp"     value="no"/>
+    <parameter name="logger"     value="no"/>
+    <parameter name="xterm"      value="no"/>
+    <parameter name="portkill"   value="no"/>
+    <parameter name="killall"    value="no"/>
+    <parameter name="modules"    value="GUI,GEOM,SMESH,VISU,SUPERV,MED,COMPONENT,LIGHT,PYHELLO,PYCALCULATOR"/>
+    <parameter name="pyModules"  value=""/>
+    <parameter name="embedded"   value="SalomeAppEngine,cppContainer,registry,moduleCatalog,study"/>
+    <parameter name="standalone" value="pyContainer"/>
+  </section>
+  <section name="language">
+    <parameter name="language"    value="en"/>
+    <parameter name="translators" value="%P_msg_%L.qm|%P_icons.qm|%P_images.qm"/>
+  </section>
+  <section name="resources">
+    <parameter name="SUIT"         value="${SUITRoot}/resources"/>
+    <parameter name="STD"          value="${SUITRoot}/resources"/>
+    <parameter name="Plot2d"       value="${SUITRoot}/resources"/>
+    <parameter name="SPlot2d"      value="${SUITRoot}/resources"/>
+    <parameter name="GLViewer"     value="${SUITRoot}/resources"/>
+    <parameter name="OCCViewer"    value="${SUITRoot}/resources"/>
+    <parameter name="VTKViewer"    value="${SUITRoot}/resources"/>
+    <parameter name="SalomeApp"    value="${SUITRoot}/resources"/>
+    <parameter name="OB"           value="${SUITRoot}/resources"/>
+    <parameter name="CAM"          value="${SUITRoot}/resources"/>
+    <parameter name="GEOM"         value="${GEOM_ROOT_DIR}/share/salome/resources"/>
+    <parameter name="SMESH"        value="${SMESH_ROOT_DIR}/share/salome/resources"/>
+    <parameter name="VISU"         value="${VISU_ROOT_DIR}/share/salome/resources"/>
+    <parameter name="SUPERV"       value="${SUPERV_ROOT_DIR}/share/salome/resources"/>
+    <parameter name="MED"          value="${MED_ROOT_DIR}/share/salome/resources"/>
+    <parameter name="StdMeshers"   value="${SMESH_ROOT_DIR}/share/salome/resources"/>
+    <parameter name="NETGENPlugin" value="${NETGENPLUGIN_ROOT_DIR}/share/salome/resources"/>
+    <parameter name="GHS3DPlugin"  value="${GHS3DPLUGIN_ROOT_DIR}/share/salome/resources"/>
+    <parameter name="COMPONENT"    value="${COMPONENT_ROOT_DIR}/share/salome/resources"/>
+    <parameter name="PYHELLO"      value="${PYHELLO_ROOT_DIR}/share/salome/resources"/>
+    <parameter name="PYCALCULATOR" value="${PYCALCULATOR_ROOT_DIR}/share/salome/resources"/>
+    <parameter name="LIGHT"        value="${LIGHT_ROOT_DIR}/share/salome/resources"/>
+
+  </section>
+  <section name="GEOM">
+    <parameter name="name"       value="Geometry"/>
+    <parameter name="icon"       value="ModuleGeom.png"/>
+  </section>
+  <section name="SMESH">
+    <parameter name="name"       value="Mesh"/>
+    <parameter name="icon"       value="ModuleMesh.png"/>
+  </section>
+  <section name="VISU">
+    <parameter name="name"       value="Post-Pro"/>
+    <parameter name="icon"       value="ModuleVisu.png"/>
+  </section>
+  <section name="SUPERV">
+    <parameter name="name"       value="Supervisor"/>
+    <parameter name="icon"       value="ModuleSupervision.png"/>
+  </section>
+  <section name="MED">
+    <parameter name="name"       value="Med"/>
+    <parameter name="icon"       value="ModuleMed.png"/>
+  </section>
+  <section name="PYHELLO">
+    <parameter name="name"       value="PyHello"/>
+    <parameter name="icon"       value="PYHELLO.png"/>
+    <parameter name="library"    value="libSalomePyQtGUI.so"/>
+  </section>
+  <section name="LIGHT">
+    <parameter name="name"       value="Light"/>
+    <parameter name="icon"       value="LIGHT.png"/>
+  </section>
+
+<!-- values below this line are just an example, they are not used  -->
+  <section name="application">
+    <parameter name="QuickDirList" value=""/>
+    <!-- Here go other common user preferences -->
+  </section>
+  <section name="Geometry" >
+    <parameter value="255, 255, 0" name="shading_color" />
+  </section>
+  <section name="SMESH">
+    <parameter name="plugins" value="NETGENPlugin,GHS3DPlugin"/>
+    <!-- Here go SMESH module user preferences -->
+  </section>
+  <!-- Here go optional sections for other modules -->
+  <section name="resources">
+    <parameter name="salome" value="${KERNEL_ROOT_DIR}/share/salome/res"/>
+    <!-- Here go resource directories for other modules -->
+  </section>
+</document>
diff --git a/bin/appliskel/env.d/atFirst.sh b/bin/appliskel/env.d/atFirst.sh
new file mode 100644 (file)
index 0000000..0c6715f
--- /dev/null
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+#------------------------------------------------
+# to be sourced first, used in following scripts
+#------------------------------------------------
+
+export LD_LIBRARY_PATH="."
+export PATH="/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/prascle/bin:."
+export PYTHONPATH=""
+
+export RAC=${HOME}
+export PAKSAL=/opt
+export PUB=${RAC}/public
+export TARP=${RAC}/tarpublic
+export PYPACKAGES=${PUB}/site_packages
+
+# ------------------------------------------------
+# ---- gdb 5.3
+
+export PATH=${PAKSAL}/gdb53/bin:${PATH}
+export LD_LIBRARY_PATH=${PAKSAL}/gdb53/lib:${LD_LIBRARY_PATH}
+
+# ------------------------------------------------
+# ---- ddd 3.3.7
+
+export PATH=${PAKSAL}/ddd337/bin:${PATH}
+export LD_LIBRARY_PATH=${PAKSAL}/ddd337/lib:${LD_LIBRARY_PATH}
+
+# ------------------------------------------------
+# --- Java 1.4
+
+export JDKHOME=${PUB}/j2sdk_nb/j2sdk1.4.2
+export JAVAHOME=${PUB}/j2sdk_nb/j2sdk1.4.2
+export PATH=${JAVAHOME}/bin:${PATH}
+export LD_LIBRARY_PATH=${JAVAHOME}/lib:${LD_LIBRARY_PATH}
+export LD_LIBRARY_PATH=${JAVAHOME}/jre/lib/i386:${LD_LIBRARY_PATH}
+export LD_LIBRARY_PATH=${JAVAHOME}/jre/lib/i386/client:${LD_LIBRARY_PATH}
+
+# ------------------------------------------------
+# --- gsl -1.4
+
+export GSLHOME=${PAKSAL}/gsl-1.4
+export PATH=${GSLHOME}/bin:${PATH}
+export LD_LIBRARY_PATH=${GSLHOME}/lib:${LD_LIBRARY_PATH}
+
+# ------------------------------------------------
+# --- fltk 1.1.4
+
+export FLTKHOME=${PAKSAL}/fltk114
+export PATH=${FLTKHOME}/bin:${PATH}
+export LD_LIBRARY_PATH=${FLTKHOME}/lib:${LD_LIBRARY_PATH}
+
+# ------------------------------------------------
+# --- gmsh 1.48
+
+export GMSHHOME=${PAKSAL}/gmsh148
+export PATH=${GMSHHOME}/bin:${PATH}
+
+# ------------------------------------------------
+# ---- tkcvs, tkdiffb, cvs
+
+export PATH=${PAKSAL}/tkcvs7.2/bin:${PAKSAL}/cvs1.11.14/bin:${PATH}
diff --git a/bin/appliskel/env.d/envProducts.sh b/bin/appliskel/env.d/envProducts.sh
new file mode 100644 (file)
index 0000000..aa05705
--- /dev/null
@@ -0,0 +1,120 @@
+#!/bin/sh
+
+# ------------------------------------------------
+# ---- openpbs
+
+export OPENPBS=/optroot/openpbs2316
+export PATH=${OPENPBS}/bin:${PATH}
+export LD_LIBRARY_PATH=${OPENPBS}/lib:${LD_LIBRARY_PATH}
+
+#------------------------------------------------------------------------------
+
+export INSTALL_ROOT=/home/prascle/PAL_SALOME141
+#------ gcc ------
+export GCC_ROOT=/usr
+export CXX=${GCC_ROOT}/bin/g++
+export CC=${GCC_ROOT}/bin/gcc
+##
+#------ boost ------ 
+export BOOSTDIR=${INSTALL_ROOT}/boost-1.30.2
+##
+
+#------ tcltk ------
+export TCLHOME=/usr
+
+#------ Python ------
+export PYTHONHOME=/usr
+export PYTHONPATH=${PYPACKAGES}:${PYTHONPATH}
+##
+#------ Qt ------
+#export QTDIR=/usr/lib/qt-3.0.5
+export QTDIR=/usr/lib/qt3-gcc3.2
+export PATH=${PATH}:${QTDIR}/bin
+export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${QTDIR}/lib
+##
+#------ Sip ------
+export SIPDIR=/usr
+export PYQTDIR=/usr
+##
+#------ PyQt ------
+export PYQT_SIPS=/usr/share/sip/qt
+export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/python2.2/site-packages
+##
+#------ Swig ------ 
+export SWIG_ROOT=${INSTALL_ROOT}/SWIG-1.3.17
+export PATH=${SWIG_ROOT}/bin:${PATH}
+export LD_LIBRARY_PATH=${SWIG_ROOT}/lib:${LD_LIBRARY_PATH}
+##
+#------ OpenCascade ------
+export CASROOT=/opt/CAS52patch
+export LD_LIBRARY_PATH=${CASROOT}/Linux/lib:${LD_LIBRARY_PATH}
+export PATH=${CASROOT}/Linux/bin:${PATH}
+# Variable for Foundation Classes : 
+export CSF_UnitsLexicon=${CASROOT}/src/UnitsAPI/Lexi_Expr.dat 
+export CSF_UnitsDefinition=${CASROOT}/src/UnitsAPI/Units.dat 
+# Variable for DataExchange : 
+export CSF_SHMessage=${CASROOT}/src/SHMessage
+export CSF_XSMessage=${CASROOT}/src/XSMessage 
+# Variable for Font : 
+export CSF_MDTVFontDirectory=${CASROOT}/src/FontMFT 
+export CSF_MDTVTexturesDirectory=${CASROOT}/src/Textures 
+##
+export CSF_LANGUAGE=us
+export MMGT_CLEAR=1
+export CSF_EXCEPTION_PROMPT=1
+export CSF_StandardDefaults=${CASROOT}/src/StdResource
+export CSF_PluginDefaults=${CASROOT}/src/StdResource
+export CSF_XCAFDefaults=${CASROOT}/src/StdResource
+export CSF_GraphicShr=${CASROOT}/Linux/lib/libTKOpenGl.so
+export CSF_IGESDefaults=${CASROOT}/src/XSTEPResource
+export CSF_STEPDefaults=${CASROOT}/src/XSTEPResource
+##
+#export TCLLIBPATH=$TCLHOME/lib
+##
+#------ Qwt ------
+export QWTHOME=${INSTALL_ROOT}/qwt-0.4.1
+export LD_LIBRARY_PATH=${QWTHOME}/lib:${LD_LIBRARY_PATH} 
+##
+#------ Hdf ------
+export HDF5HOME=${INSTALL_ROOT}/hdf5-1.4.4
+export PATH=${HDF5HOME}/bin:$PATH
+export LD_LIBRARY_PATH=${HDF5HOME}/lib:${LD_LIBRARY_PATH}
+##
+#------ Med ------
+export MED2HOME=/opt/med2.2.2
+export PATH=${MED2HOME}/bin:${PATH}
+export LD_LIBRARY_PATH=${MED2HOME}/lib:${LD_LIBRARY_PATH}
+##
+#------ Vtk ------
+export VTKHOME=${INSTALL_ROOT}/VTK-4.2.2
+export PATH=${VTKHOME}/bin:${PATH}
+export LD_LIBRARY_PATH=${VTKHOME}/lib/vtk:${LD_LIBRARY_PATH}
+export PYTHONPATH=${VTKHOME}/lib/vtk:${VTKHOME}/lib/python2.2/site-packages/vtk_python:${PYTHONPATH}
+##
+#------ netgen ------
+export NETGENROOT=${INSTALL_ROOT}/netgen4.3
+export NETGEN_HOME=${INSTALL_ROOT}/netgen4.3
+##
+#------ OmniORB ------
+export OMNIORBDIR=${INSTALL_ROOT}/omniORB-3.0.5
+export OMNIORB_CONFIG=${OMNIORBDIR}/.omniORB.cfg
+export PYTHONPATH=${OMNIORBDIR}/lib/python:${OMNIORBDIR}/lib/i586_linux_2.0_glibc2.1:${PYTHONPATH}
+export PATH=$OMNIORBDIR/bin/i586_linux_2.0_glibc2.1:$PATH
+export LD_LIBRARY_PATH=$OMNIORBDIR/lib/i586_linux_2.0_glibc2.1:$LD_LIBRARY_PATH 
+##
+#------ Numeric ------
+export PYTHONPATH=${INSTALL_ROOT}/Numeric-22.0/lib/python2.2/site-packages/Numeric:${PYTHONPATH}
+##
+#------ HappyDoc ------
+export PATH=${INSTALL_ROOT}/HappyDoc-r2_1/bin:${PATH}
+export PYTHONPATH=${INSTALL_ROOT}/HappyDoc-r2_1/lib/python2.2/site-packages:${PYTHONPATH}
+##
+#------ Doxygen ------
+export PATH=${INSTALL_ROOT}/doxygen-1.3-rc2/bin:${PATH}
+##
+#------ Graphviz ------
+export PATH=${INSTALL_ROOT}/graphviz-1.9/bin:${PATH}
+export LD_LIBRARY_PATH=${INSTALL_ROOT}/graphviz-1.9/lib/graphviz:${LD_LIBRARY_PATH}
+##
+
+#------------------------------------------------------------------------------
diff --git a/bin/appliskel/env.d/envSalome.sh b/bin/appliskel/env.d/envSalome.sh
new file mode 100644 (file)
index 0000000..9d765a0
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# --- example to adapt to your own configuration ---
+#
+# --- envSalome.sh gives a set of MODULE_ROOT_DIR, to source
+# --- you must at least define and export KERNEL_ROOT_DIR
+
+REPINST=/home/prascle/SALOME2/Install
+
+export KERNEL_ROOT_DIR=${REPINST}/KERNEL_V301
+
+export GUI_ROOT_DIR=${REPINST}/GUI_V301
+#export SalomeAppConfig=${GUI_ROOT_DIR}/share/salome/resources
+export SalomeAppConfig=${HOME}/${APPLI}
+export SUITRoot=${GUI_ROOT_DIR}/share/salome
+
+export GEOM_ROOT_DIR=${REPINST}/GEOM_V301
+export MED_ROOT_DIR=${REPINST}/MED_V301
+export SMESH_ROOT_DIR=${REPINST}/SMESH_V301
+export SUPERV_ROOT_DIR=${REPINST}/SUPERV_V301
+export VISU_ROOT_DIR=${REPINST}/VISU_V301
+export NETGENPLUGIN_ROOT_DIR=${REPINST}/NETGENPLUGIN_V301
+export COMPONENT_ROOT_DIR=${REPINST}/COMPONENT_V301
+export PYCALCULATOR_ROOT_DIR=${REPINST}/PYCALCULATOR_V301
+export PYHELLO_ROOT_DIR=${REPINST}/PYHELLO_V301
+export PYTIX_ROOT_DIR=${REPINST}/PYTIX_V301
+
diff --git a/bin/appliskel/envd b/bin/appliskel/envd
new file mode 100644 (file)
index 0000000..80261ad
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+for i in $1/env.d/*;do source ${i}; done
diff --git a/bin/appliskel/runAppli b/bin/appliskel/runAppli
new file mode 100755 (executable)
index 0000000..3e703bc
--- /dev/null
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+# --- retrieve APPLI path, relative to $HOME
+#     on sarge, "which" gives not allways the absolute path...
+     
+comName=`which $0`
+aa=${comName:0:1}
+if test x$aa == x\/; then
+  mycom=${comName}
+elif test x$aa == x\.; then
+  mycom=${PWD}/${comName:2}
+else
+  mycom=${PWD}/${comName}
+fi
+APPLI=`echo ${HOME} \`dirname $mycom\` | awk ' { print substr($2,length($1)+2) } '`
+#echo $APPLI
+export APPLI
+
+# --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...)
+
+. ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
+
+# --- define port for CORBA naming service
+
+searchFreePort() {
+    echo -n "Searching for a free port for naming service: "
+    export NSPORT=2810
+    local limit=$NSPORT
+    let limit=limit+100
+    while [ 1 ]
+    do
+        aRes=`netstat -ltn | grep -E :${NSPORT}`
+        if [ -z "$aRes" ]; then
+            echo ${NSPORT} - Ok
+           local myhost=`hostname`
+            export OMNIORB_CONFIG=${HOME}/$APPLI//.omniORB_${myhost}_${NSPORT}.cfg
+           export NSPORT
+            local initref="NameService=corbaname::"`hostname`":$NSPORT"
+            echo "ORBInitRef $initref" > $OMNIORB_CONFIG
+            break
+        fi
+        echo -n "${NSPORT} "
+        if [[ $NSPORT -eq $limit ]] ; then
+            echo
+            echo "Can't find a free port to launch omniNames"
+            echo "Try to kill the running servers and then launch SALOME again."
+            exit
+        fi
+        let NSPORT=NSPORT+1
+    done
+}
+
+# --- run SALOME
+#    (default arguments defined in local salome.launch could be completed
+#     by arguments to this command)
+
+searchFreePort
+
+if [ $# -ne 0 ] ; then
+    ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python -i ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py $*
+else
+    ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py 
+fi
diff --git a/bin/appliskel/runConsole b/bin/appliskel/runConsole
new file mode 100755 (executable)
index 0000000..e45f586
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# --- retrieve APPLI path, relative to $HOME
+#     on sarge, "which" gives not allways the absolute path...
+     
+comName=`which $0`
+aa=${comName:0:1}
+if test x$aa == x\/; then
+  mycom=${comName}
+elif test x$aa == x\.; then
+  mycom=${PWD}/${comName:2}
+else
+  mycom=${PWD}/${comName}
+fi
+APPLI=`echo ${HOME} \`dirname $mycom\` | awk ' { print substr($2,length($1)+2) } '`
+#echo $APPLI
+export APPLI
+
+# --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...)
+
+. ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
+
+# --- open a Python interpreter with SALOME environment
+
+${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python -i ${KERNEL_ROOT_DIR}/bin/salome/salomeConsole.py $*
diff --git a/bin/appliskel/runParam b/bin/appliskel/runParam
new file mode 100755 (executable)
index 0000000..17bbd61
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+./runAppli --killall  
+
+#./runSession killSalome.py
diff --git a/bin/appliskel/runRemote.sh b/bin/appliskel/runRemote.sh
new file mode 100755 (executable)
index 0000000..84a1257
--- /dev/null
@@ -0,0 +1,54 @@
+#!/bin/bash
+#
+# --- run command in SALOME environment from remote call, ssh or rsh
+#     - SALOME configuration is defined by :
+#        - list of MODULE_ROOT_DIR
+#        - prerequisite environment
+#        - specific configuration for a particular SALOME application
+#     - These elements of configuration are defined locally on each computer
+#       in the directory APPLI:
+#     - A SALOME application distributed on several computers needs APPLI
+#       directories on the same path ($APPLI) relative to $HOME directory
+#       of the user, on each computer.
+#
+# --- call example (from cli76cd to cli76ce):
+# ssh cli76ce ${APPLI}/runRemote.sh cli76cd 2810 SALOME_Container myContainerName
+#
+# --- local arguments
+#     $0 : ${APPLI}/runRemote.sh: from arg name, rebuild and export $APPLI variable
+#     $1 : computer name for CORBA name service (where SALOME was launched)
+#     $2 : port for CORBA name service
+#     $3 and following : local command to execute, with args
+#
+
+# --- retrieve APPLI path, relative to $HOME
+#     on sarge, "which" gives not allways the absolute path...
+     
+comName=`which $0`
+aa=${comName:0:1}
+if test x$aa == x\/; then
+  mycom=${comName}
+elif test x$aa == x\.; then
+  mycom=${PWD}/${comName:2}
+else
+  mycom=${PWD}/${comName}
+fi
+APPLI=`echo ${HOME} \`dirname $mycom\` | awk ' { print substr($2,length($1)+2) } '`
+#echo $APPLI
+export APPLI
+
+# --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...)
+
+. ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
+
+# --- set the OMNIORB_CONFIG file and environment relative to this run of SALOME
+
+export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_$1_$2.cfg
+initref="NameService=corbaname::"$1":$2"
+echo "ORBInitRef $initref" > $OMNIORB_CONFIG
+
+# --- execute the command in the SALOME environment
+
+shift 2
+
+${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile $HOME/$APPLI/.bashrc -c "$*"
diff --git a/bin/appliskel/runSession b/bin/appliskel/runSession
new file mode 100755 (executable)
index 0000000..d94bfff
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/bash
+#
+# Useful shell to run executable progs or shells under Salome env
+# Use it with args to run a program : runSession python -i myprog.py
+# Use it without args to run an interactive shell under Salome env
+#
+
+# --- retrieve APPLI path, relative to $HOME
+#     on sarge, "which" gives not allways the absolute path...
+     
+comName=`which $0`
+aa=${comName:0:1}
+if test x$aa == x\/; then
+  mycom=${comName}
+elif test x$aa == x\.; then
+  mycom=${PWD}/${comName:2}
+else
+  mycom=${PWD}/${comName}
+fi
+APPLI=`echo ${HOME} \`dirname $mycom\` | awk ' { print substr($2,length($1)+2) } '`
+#echo $APPLI
+export APPLI
+
+# --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...)
+
+. ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
+
+# --- invoque shell with or without args
+
+if [ $# -ne 0 ] ; then
+    ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc -c "$*"
+else
+    ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc
+fi