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 if [ -f ${RANDOMIZER_SRC_DIR}/configure.in.base ]; then
27 ver=`grep -E "^VERSION=" ${RANDOMIZER_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' `
28 if [ "$ver" = "${VERSION}" ]; then
37 if test `uname -m` = "x86_64" ; then
42 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
43 #$DELIM ${PRODUCT_TYPE} $DELIM
44 export RANDOMIZER_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
45 if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
46 if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
47 export PATH=\${RANDOMIZER_ROOT_DIR}/bin/salome:\${PATH}
48 export PYTHONPATH=\${RANDOMIZER_ROOT_DIR}/bin/salome:\${RANDOMIZER_ROOT_DIR}/lib${LIB_PREFIX}/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
53 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
54 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
58 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
59 #$DELIM ${PRODUCT_TYPE}_src $DELIM
60 export RANDOMIZER_SRC_DIR=\${INSTALL_ROOT}/${PRODUCT_SRC}
64 (test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
65 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
69 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
70 try_existing ${PRODUCT_SRC_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
76 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
77 source ${INSTALL_WORK}/$SHRC
79 check_jb tar xfz ${SOURCE_DIR}/RANDOMIZERsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
81 # to generate environment scripts
85 install_source_and_build()
91 mkdir -p ${PRODUCT_DIR}
93 if [ -e ./build.sh ] ; then
94 cp -f ./build.sh ${INSTALL_ROOT}
99 check_jb build.sh -o -b -d -v 0 -p $INSTALL_ROOT RANDOMIZER
103 # remove sources and temporary files after building
104 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
105 test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
106 test -d ${INSTALL_ROOT}/"RANDOMIZER_BUILD" && rm -fr ${INSTALL_ROOT}/"RANDOMIZER_BUILD"
109 # to generate environment scripts
115 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
116 source ${INSTALL_WORK}/$SHRC
118 check_jb tar xfz ${SOURCE_DIR}/RANDOMIZERbinariesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
119 check_jb tar xfz ${SRC_DIR}/RANDOMIZERsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
121 # modify all *.la files
122 export RANDOMIZER_ROOT_DIR=${PRODUCT_DIR}
123 modif_la_files ${PRODUCT_DIR}
125 # to generate environment scripts
130 export INSTALL_WORK=$2;
131 export SOURCE_DIR=$3;
132 export INSTALL_ROOT=$4;
133 export PRODUCT_SEQUENCE=$5;
134 export PRODUCT_TYPE=$6;
135 export INSTALL_PRODUCTS=$7;
139 export PRODUCT="RANDOMIZER_${VERSION}"
140 export PRODUCT_SRC="RANDOMIZER_SRC_${VERSION}"
141 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
142 export PRODUCT_SRC_DIR=${INSTALL_ROOT}/${PRODUCT_SRC}