3 ####################################################################################
4 # File : PYCALCULATOR_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 "${PYCALCULATOR_ROOT_DIR}" ]; then
19 check_lib_version VERSION ${PYCALCULATOR_ROOT_DIR}/bin/salome
20 if [ "$?" -eq "0" ]; then
21 ver=`cat ${PYCALCULATOR_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
22 if [ "$ver" = "${VERSION}" ]; then
26 elif [ -n "${PYCALCULATOR_SRC_DIR}" ]; then
27 check_salome_src_version PYCALCULATOR_SRC_DIR $VERSION
28 if [ $? -eq 0 ] ; then return 0 ; fi
35 if test `uname -m` = "x86_64" ; then
40 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
41 #$DELIM ${PRODUCT_TYPE} $DELIM
42 export PYCALCULATOR_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
43 if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
44 if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
45 export PATH=\${PYCALCULATOR_ROOT_DIR}/bin/salome:\${PATH}
46 export PYTHONPATH=\${PYCALCULATOR_ROOT_DIR}/bin/salome:\${PYCALCULATOR_ROOT_DIR}/lib${LIB_PREFIX}/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
51 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
52 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
56 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
57 #$DELIM ${PRODUCT_TYPE}_src $DELIM
58 export PYCALCULATOR_SRC_DIR=\${INSTALL_ROOT}/${PRODUCT_SRC}
62 (test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
63 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
67 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
68 try_existing ${PRODUCT_SRC_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
74 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
75 source ${INSTALL_WORK}/$SHRC
77 check_jb tar xfz ${SOURCE_DIR}/PYCALCULATORsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
79 # to generate environment scripts
83 install_source_and_build()
89 mkdir -p ${PRODUCT_DIR}
91 if [ -e ./build.sh ] ; then
92 cp -f ./build.sh ${INSTALL_ROOT}
97 check_jb build.sh -o -b -d -v 0 -p $INSTALL_ROOT PYCALCULATOR
101 # remove sources and temporary files after building
102 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
103 test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
104 test -d ${INSTALL_ROOT}/"PYCALCULATOR_BUILD" && rm -fr ${INSTALL_ROOT}/"PYCALCULATOR_BUILD"
107 # to generate environment scripts
113 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
114 source ${INSTALL_WORK}/$SHRC
116 check_jb tar xfz ${SOURCE_DIR}/PYCALCULATORbinariesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
117 check_jb tar xfz ${SRC_DIR}/PYCALCULATORsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
119 # modify all *.la files
120 export PYCALCULATOR_ROOT_DIR=${PRODUCT_DIR}
121 modif_la_files ${PRODUCT_DIR}
123 # to generate environment scripts
128 export INSTALL_WORK=$2;
129 export SOURCE_DIR=$3;
130 export INSTALL_ROOT=$4;
131 export PRODUCT_SEQUENCE=$5;
132 export PRODUCT_TYPE=$6;
133 export INSTALL_PRODUCTS=$7;
137 export PRODUCT="PYCALCULATOR_${VERSION}"
138 export PRODUCT_SRC="PYCALCULATOR_SRC_${VERSION}"
139 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
140 export PRODUCT_SRC_DIR=${INSTALL_ROOT}/${PRODUCT_SRC}