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 "${LIGHT_ROOT_DIR}" ]; then
19 if [ -f ${LIGHT_ROOT_DIR}/bin/salome/VERSION ]; then
20 ver=`cat ${LIGHT_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' `
21 if [ "$ver" = "${VERSION}" ]; then
25 elif [ -n "${LIGHT_SRC_DIR}" ]; then
26 check_salome_src_version LIGHT_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 LIGHT_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
42 if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
43 if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
44 export LD_LIBRARY_PATH=\${LIGHT_ROOT_DIR}/lib${LIB_PREFIX}/salome:\${LD_LIBRARY_PATH}
49 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
50 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
54 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
55 #$DELIM ${PRODUCT_TYPE}_src $DELIM
56 export LIGHT_SRC_DIR=\${INSTALL_ROOT}/${PRODUCT_SRC}
60 (test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
61 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
65 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
66 try_existing ${PRODUCT_SRC_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
72 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
73 source ${INSTALL_WORK}/$SHRC
75 check_jb tar xfz ${SOURCE_DIR}/LIGHTsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
77 # to generate environment scripts
81 install_source_and_build()
87 mkdir -p ${PRODUCT_DIR}
89 if [ -e ./build.sh ] ; then
90 cp -f ./build.sh ${INSTALL_ROOT}
95 check_jb build.sh -o -b -d -v 0 -p $INSTALL_ROOT LIGHT
99 # remove sources and temporary files after building
100 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
101 test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
102 test -d ${INSTALL_ROOT}/"LIGHT_BUILD" && rm -fr ${INSTALL_ROOT}/"LIGHT_BUILD"
105 # to generate environment scripts
111 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
112 source ${INSTALL_WORK}/$SHRC
114 check_jb tar xfz ${SOURCE_DIR}/LIGHTbinariesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
115 check_jb tar xfz ${SRC_DIR}/LIGHTsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
117 # modify all *.la files
118 export LIGHT_ROOT_DIR=${PRODUCT_DIR}
119 modif_la_files ${PRODUCT_DIR}
121 # to generate environment scripts
126 export INSTALL_WORK=$2;
127 export SOURCE_DIR=$3;
128 export INSTALL_ROOT=$4;
129 export PRODUCT_SEQUENCE=$5;
130 export PRODUCT_TYPE=$6;
131 export INSTALL_PRODUCTS=$7;
135 export PRODUCT="LIGHT_${VERSION}"
136 export PRODUCT_SRC="LIGHT_SRC_${VERSION}"
137 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
138 export PRODUCT_SRC_DIR=${INSTALL_ROOT}/${PRODUCT_SRC}