3 ####################################################################################
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 "${YACS_ROOT_DIR}" ]; then
19 if [ -f ${YACS_ROOT_DIR}/bin/salome/VERSION ]; then
20 ver=`cat ${YACS_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' `
21 if [ "$ver" = "${VERSION}" ]; then
25 elif [ -n "${YACS_SRC_DIR}" ]; then
26 check_salome_src_version YACS_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 YACS_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
42 if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
43 if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
44 export PATH=\${YACS_ROOT_DIR}/bin/salome:\${PATH}
45 export PYTHONPATH=\${YACS_ROOT_DIR}/bin/salome:\${YACS_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 YACS_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}/YACSsourcesV${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 YACS
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}/"YACS_BUILD" && rm -fr ${INSTALL_ROOT}/"YACS_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}/YACSbinariesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
116 check_jb tar xfz ${SRC_DIR}/YACSsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
118 # modify all *.la files
119 export YACS_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="YACS_${VERSION}"
137 export PRODUCT_SRC="YACS_SRC_${VERSION}"
138 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
139 export PRODUCT_SRC_DIR=${INSTALL_ROOT}/${PRODUCT_SRC}