3 ####################################################################################
4 # File : CALCULATOR_BIN.sh
5 # Created : Thu Dec 18 12:01:00 2002
6 # Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
8 # Module : Installation Wizard
9 # Copyright : 2002-2006 CEA
11 # This script is the part of the SALOME installation procedure.
13 ####################################################################################
16 if [ -n "${CALCULATOR_ROOT_DIR}" ]; then
17 check_lib_version VERSION ${CALCULATOR_ROOT_DIR}/bin/salome
18 if [ "$?" -eq "0" ]; then
19 ver=`cat ${CALCULATOR_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
20 if [ "$ver" = "3.2.3" ]; then
30 if test `uname -m` = "x86_64" ; then
36 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
37 #$DELIM ${PRODUCT_TYPE} $DELIM
38 export CALCULATOR_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
39 if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
40 if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
41 export PATH=\${CALCULATOR_ROOT_DIR}/bin/salome:\${PATH}
42 export LD_LIBRARY_PATH=\${CALCULATOR_ROOT_DIR}/lib${LIB_PREFIX}/salome:\${LD_LIBRARY_PATH}
43 export PYTHONPATH=\${CALCULATOR_ROOT_DIR}/bin/salome:\${CALCULATOR_ROOT_DIR}/lib${LIB_PREFIX}/salome:\${CALCULATOR_ROOT_DIR}/lib${LIB_PREFIX}/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
48 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
49 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
52 # looks for the native product and collects it's environment (used by make_env())
55 if test `uname -m` = "x86_64" ; then
60 if [ $? -eq 0 ] ; then
61 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
62 #$DELIM ${PRODUCT_TYPE} $DELIM
63 export CALCULATOR_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
64 if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
65 if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
66 export PATH=\${CALCULATOR_ROOT_DIR}/bin/salome:\${PATH}
67 export LD_LIBRARY_PATH=\${CALCULATOR_ROOT_DIR}/lib${LIB_PREFIX}/salome:\${LD_LIBRARY_PATH}
68 export PYTHONPATH=\${CALCULATOR_ROOT_DIR}/bin/salome:\${CALCULATOR_ROOT_DIR}/lib${LIB_PREFIX}/salome:\${CALCULATOR_ROOT_DIR}/lib${LIB_PREFIX}/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
73 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
80 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
91 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
92 source ${INSTALL_WORK}/$SHRC
94 check_jb tar xfz ${SOURCE_DIR}/CALCULATORbinariesV3.2.3.tar.gz -C ${INSTALL_ROOT}
96 # modify all *.la files
97 export CALCULATOR_ROOT_DIR=${PRODUCT_DIR}
98 modif_la_files ${PRODUCT_DIR}
100 cd ${PRODUCT_DIR}/bin/salome
101 sed -e "s%export KERNEL_ROOT_DIR=.*%export KERNEL_ROOT_DIR=${KERNEL_ROOT_DIR}%g" runAppli > _runAppli
102 sed -e "s%export CALCULATOR_ROOT_DIR=.*%export CALCULATOR_ROOT_DIR=${CALCULATOR_ROOT_DIR}%g" _runAppli > runAppli
110 export INSTALL_WORK=$2;
111 export SOURCE_DIR=$3;
112 export INSTALL_ROOT=$4;
113 export PRODUCT_SEQUENCE=$5;
114 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="CalculatorBin" ; fi
115 export PRODUCT="CALCULATOR_3.2.3"
116 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
117 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}