3 ####################################################################################
4 # File : RANDOMIZER_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 "${RANDOMIZER_ROOT_DIR}" ]; then
19 if [ -f ${RANDOMIZER_ROOT_DIR}/bin/salome/VERSION ]; then
20 ver=`cat ${RANDOMIZER_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' `
21 if [ "$ver" = "${VERSION}" ]; then
25 elif [ -n "${RANDOMIZER_SRC_DIR}" ]; then
26 check_salome_src_version RANDOMIZER_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 RANDOMIZER_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
42 if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
43 if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
44 export PATH=\${RANDOMIZER_ROOT_DIR}/bin/salome:\${PATH}
45 export PYTHONPATH=\${RANDOMIZER_ROOT_DIR}/bin/salome:\${RANDOMIZER_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 RANDOMIZER_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}/RANDOMIZERsourcesV${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 RANDOMIZER
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}/"RANDOMIZER_BUILD" && rm -fr ${INSTALL_ROOT}/"RANDOMIZER_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}/RANDOMIZERbinariesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
116 check_jb tar xfz ${SRC_DIR}/RANDOMIZERsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
118 # modify all *.la files
119 export RANDOMIZER_ROOT_DIR=${PRODUCT_DIR}
120 modif_la_files ${PRODUCT_DIR}
122 # to generate environment scripts
127 export INSTALL_WORK=$2;
128 export SOURCE_DIR=$3;
129 export INSTALL_ROOT=$4;
130 export PRODUCT_SEQUENCE=$5;
131 export PRODUCT_TYPE=$6;
132 export INSTALL_PRODUCTS=$7;
136 export PRODUCT="RANDOMIZER_${VERSION}"
137 export PRODUCT_SRC="RANDOMIZER_SRC_${VERSION}"
138 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
139 export PRODUCT_SRC_DIR=${INSTALL_ROOT}/${PRODUCT_SRC}