3 ####################################################################################
4 # File : NETGENPLUGIN_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 "${NETGENPLUGIN_ROOT_DIR}" ]; then
19 check_lib_version VERSION ${NETGENPLUGIN_ROOT_DIR}/bin/salome
20 if [ "$?" -eq "0" ]; then
21 ver=`cat ${NETGENPLUGIN_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
22 if [ "$ver" = "${VERSION}" ]; then
27 elif [ -n "${NETGENPLUGIN_SRC_DIR}" ]; then
28 check_salome_src_version NETGENPLUGIN_SRC_DIR $VERSION
29 if [ $? -eq 0 ] ; then return 0 ; fi
36 if test `uname -m` = "x86_64" ; then
41 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
42 #$DELIM ${PRODUCT_TYPE} $DELIM
43 export NETGENPLUGIN_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
44 if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
45 if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
46 export LD_LIBRARY_PATH=\${NETGENPLUGIN_ROOT_DIR}/lib${LIB_PREFIX}/salome:\${LD_LIBRARY_PATH}
47 export PYTHONPATH=\${NETGENPLUGIN_ROOT_DIR}/lib${LIB_PREFIX}/salome:\${NETGENPLUGIN_ROOT_DIR}/lib${LIB_PREFIX}/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
52 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
53 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
57 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
58 #$DELIM ${PRODUCT_TYPE}_src $DELIM
59 export NETGENPLUGIN_SRC_DIR=\${INSTALL_ROOT}/${PRODUCT_SRC}
63 (test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
64 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
68 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
69 try_existing ${PRODUCT_SRC_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
75 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
76 source ${INSTALL_WORK}/$SHRC
78 check_jb tar xfz ${SOURCE_DIR}/NETGENPLUGINsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
80 # to generate environment scripts
84 install_source_and_build()
90 mkdir -p ${PRODUCT_DIR}
92 if [ -e ./build.sh ] ; then
93 cp -f ./build.sh ${INSTALL_ROOT}
98 check_jb build.sh -o -b -d -v 0 -p $INSTALL_ROOT NETGENPLUGIN
102 # remove sources and temporary files after building
103 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
104 test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
105 test -d ${INSTALL_ROOT}/"NETGENPLUGIN_BUILD" && rm -fr ${INSTALL_ROOT}/"NETGENPLUGIN_BUILD"
108 # to generate environment scripts
114 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
115 source ${INSTALL_WORK}/$SHRC
117 check_jb tar xfz ${SOURCE_DIR}/NETGENPLUGINbinariesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
118 check_jb tar xfz ${SRC_DIR}/NETGENPLUGINsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
120 # modify all *.la files
121 export NETGENPLUGIN_ROOT_DIR=${PRODUCT_DIR}
122 modif_la_files ${PRODUCT_DIR}
124 # to generate environment scripts
129 export INSTALL_WORK=$2;
130 export SOURCE_DIR=$3;
131 export INSTALL_ROOT=$4;
132 export PRODUCT_SEQUENCE=$5;
133 export PRODUCT_TYPE=$6;
134 export INSTALL_PRODUCTS=$7;
138 export PRODUCT="NETGENPLUGIN_${VERSION}"
139 export PRODUCT_SRC="NETGENPLUGIN_SRC_${VERSION}"
140 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
141 export PRODUCT_SRC_DIR=${INSTALL_ROOT}/${PRODUCT_SRC}