3 # Copyright (C) 2013-2015 CEA/DEN, EDF R&D, OPEN CASCADE
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 trap 'exec 2>&4 1>&3' 0 1 2 3
24 exec 1>${HOME}/siman_salome_log.out 2>&1
26 echo "the script execution is logged to the log file ${HOME}/siman_salome_log.out" >&3
28 echo "parameters 1: $1 $2 $3"
29 echo "number of parameters = $#"
31 if [ "$#" -ne 3 ] ; then
33 `basename $0` --siman-study=<studyID> --siman-scenario=<scenarioID> --siman-user=<userID>" >&3
35 `basename $0` --siman-study=1162 --siman-scenario=1163 --siman-user=1158" >&3
39 if [ -z "${SALOME_ROOT_DIR}" ]; then
40 echo "You need to set the environment variable SALOME_ROOT_DIR" >&3
45 echo "SALOME_ROOT_DIR = " ${SALOME_ROOT_DIR}
47 env_script=${SALOME_ROOT_DIR}/env_products.sh
48 echo script = $env_script
50 if [ -e $env_script ] ; then
52 echo ">>> Setting SALOME environment"
53 echo ">>> Environment script = " $env_script
57 echo '!!! Warning !!! SALOME Environment is not set.'
58 echo 'No environment file (env_products.sh) is found.'
59 echo 'Proceed with the current environment.'
62 castem_env_script=${SALOME_ROOT_DIR}/castem_env_products.sh
64 if [ -e $castem_env_script ] ; then
66 echo ">>> Setting CASTEM environment"
67 echo ">>> Environment script = " $castem_env_script
71 echo '!!! Warning !!! CASTEM Environment is not set.'
72 echo 'No environment file (castem_env_products.sh) is found.'
73 echo 'Proceed with the current environment.'
76 echo "CASTEM_ROOT_DIR = " $CASTEM_ROOT_DIR
79 eficas_aster_env_script=${SALOME_ROOT_DIR}/eficas_aster_env_products.sh
81 if [ -e $eficas_aster_env_script ] ; then
83 echo ">>> Setting EFICAS & ASTER environment"
84 echo ">>> Environment script = " $eficas_aster_env_script
85 . $eficas_aster_env_script
88 echo '!!! Warning !!! EFICAS & ASTER Environment is not set.'
89 echo 'No environment file (eficas_aster_env_products.sh) is found.'
90 echo 'Proceed with the current environment.'
93 echo "EFICAS_ROOT_DIR = " $EFICAS_ROOT_DIR
94 echo "ASTER_ROOT_DIR = " $ASTER_ROOT_DIR
98 syrthes_env_script=${SALOME_ROOT_DIR}/syrthes_env_products.sh
100 if [ -e $syrthes_env_script ] ; then
102 echo ">>> Setting SYRTHES environment"
103 echo ">>> Environment script = " $syrthes_env_script
104 . $syrthes_env_script
107 echo '!!! Warning !!! SYRTHES Environment is not set.'
108 echo 'No environment file (syrthes_env_products.sh) is found.'
109 echo 'Proceed with the current environment.'
112 echo "SYRTHES_ROOT_DIR = " $SYRTHES_ROOT_DIR
115 echo ">>> Setting SALOME-SIMAN environment"
117 export WSFCPP_HOME=${SALOME_ROOT_DIR}/wso2-wsf-cpp-2.1.0
118 export LD_LIBRARY_PATH=${WSFCPP_HOME}/lib:${LD_LIBRARY_PATH}
119 echo "WSFCPP_HOME = " ${WSFCPP_HOME}
120 rm -f ${WSFCPP_HOME}/logs/SimanSalomeService.log
122 export SIMANIO_ROOT_DIR=${SALOME_ROOT_DIR}/SIMANIO
123 #export PATH=${SIMANIO_ROOT_DIR}/lib:${PATH}
124 export LD_LIBRARY_PATH=${SIMANIO_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
126 export SIMAN_WS_HOST="172.22.0.100:8080"
127 echo "SIMAN_WS_HOST = ${SIMAN_WS_HOST}"
129 export SimanSalome_DIR="/tmp/SimanSalome/${1##*=}/${2##*=}/${3##*=}/"
131 mkdir -p ${SimanSalome_DIR}
132 chmod -Rf g+w /tmp/SimanSalome
135 echo "SimanSalome_DIR = ${SimanSalome_DIR}"
137 cd ${SimanSalome_DIR}
141 echo "display = " ${DISPLAY}
144 echo ">>> SALOME-SIMAN running"
146 #modules="KERNEL,GEOM,MED,SMESH,PARAVIS,YACS,CASTEM"
147 modules="KERNEL,GEOM,MED,SMESH,PARAVIS,YACS,YACSGEN,EFICAS,ASTER,SYRTHES"
149 export NOT_INTERCEPT_SIGNALS=1
151 #runSalome --siman $1 $2 $3 -k
152 runSalome --siman $1 $2 $3 --modules=$modules
155 if [[ $rc != 0 ]] ; then
156 echo "SALOME-SIMAN running problem. Please check the script parameters".
160 cd ${SALOME_ROOT_DIR}
161 rm -rf "/tmp/SimanSalome/${1##*=}/${2##*=}"