3 ####################################################################################
4 # File : PYHELLO_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-2007 CEA
11 # This script is the part of the SALOME installation procedure.
13 ####################################################################################
18 if [ -n "${PYHELLO_ROOT_DIR}" ]; then
19 if [ -f ${PYHELLO_ROOT_DIR}/bin/salome/VERSION ]; then
20 ver=`cat ${PYHELLO_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' `
21 if [ "$ver" = "${VERSION}" ]; then
25 elif [ -n "${PYHELLO_SRC_DIR}" ]; then
26 check_salome_src_version PYHELLO_SRC_DIR $VERSION
27 if [ $? -eq 0 ] ; then return 0 ; fi
34 if test `uname -m` = "x86_64" ; then
39 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
40 #$DELIM ${PRODUCT_TYPE} $DELIM
41 export PYHELLO_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
42 if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
43 if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
44 export PATH=\${PYHELLO_ROOT_DIR}/bin/salome:\${PATH}
45 export PYTHONPATH=\${PYHELLO_ROOT_DIR}/bin/salome:\${PYHELLO_ROOT_DIR}/lib${LIB_PREFIX}/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
50 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
51 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
55 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
56 #$DELIM ${PRODUCT_TYPE}_src $DELIM
57 export PYHELLO_SRC_DIR=\${INSTALL_ROOT}/${PRODUCT_SRC}
61 (test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
62 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
66 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
67 try_existing ${PRODUCT_SRC_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
73 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
74 source ${INSTALL_WORK}/$SHRC
76 check_jb tar xfz ${SOURCE_DIR}/PYHELLOsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
78 # to generate environment scripts
82 install_source_and_build()
88 mkdir -p ${PRODUCT_DIR}
90 if [ -e ./build.sh ] ; then
91 cp -f ./build.sh ${INSTALL_ROOT}
96 check_jb build.sh -o -b -d -v 0 -p $INSTALL_ROOT PYHELLO
100 # remove sources and temporary files after building
101 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
102 test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
103 test -d ${INSTALL_ROOT}/"PYHELLO_BUILD" && rm -fr ${INSTALL_ROOT}/"PYHELLO_BUILD"
106 # to generate environment scripts
112 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
113 source ${INSTALL_WORK}/$SHRC
115 check_jb tar xfz ${SOURCE_DIR}/PYHELLObinariesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
116 check_jb tar xfz ${SRC_DIR}/PYHELLOsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
118 # modify all *.la files
119 export PYHELLO_ROOT_DIR=${PRODUCT_DIR}
120 modif_la_files ${PRODUCT_DIR}
122 cd ${PRODUCT_DIR}/bin/salome
123 sed -e "s%export KERNEL_ROOT_DIR=.*%export KERNEL_ROOT_DIR=${KERNEL_ROOT_DIR}%g" runAppli > _runAppli
124 sed -e "s%export PYHELLO_ROOT_DIR=.*%export PYHELLO_ROOT_DIR=${PYHELLO_ROOT_DIR}%g" _runAppli > runAppli
127 # to generate environment scripts
132 export INSTALL_WORK=$2;
133 export SOURCE_DIR=$3;
134 export INSTALL_ROOT=$4;
135 export PRODUCT_SEQUENCE=$5;
136 export PRODUCT_TYPE=$6;
137 export INSTALL_PRODUCTS=$7;
141 export PRODUCT="PYHELLO_${VERSION}"
142 export PRODUCT_SRC="PYHELLO_SRC_${VERSION}"
143 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
144 export PRODUCT_SRC_DIR=${INSTALL_ROOT}/${PRODUCT_SRC}