3 ####################################################################################
4 # File : GHS3DPLUGIN_SRC.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 "${GHS3DPLUGIN_SRC_DIR}" ]; then
19 if [ -f ${GHS3DPLUGIN_SRC_DIR}/configure.in.base ]; then
20 ver=`grep -E "^VERSION=" ${GHS3DPLUGIN_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' `
21 if [ "$ver" = "${VERSION}" ]; then
30 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
31 #$DELIM ${PRODUCT_TYPE} $DELIM
32 export GHS3DPLUGIN_SRC_DIR=\${INSTALL_ROOT}/${PRODUCT}
36 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
37 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
40 # looks for the native product and collects it's environment (used by make_env())
43 if [ $? -eq 0 ] ; then
44 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
45 #$DELIM ${PRODUCT_TYPE} $DELIM
46 export GHS3DPLUGIN_SRC_DIR=${GHS3DPLUGIN_SRC_DIR}
49 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
56 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
62 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
63 source ${INSTALL_WORK}/$SHRC
65 check_jb tar xfz ${SOURCE_DIR}/GHS3DPLUGINsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
70 install_source_and_build()
76 prod_bin=`echo $PRODUCT_TYPE | sed "s%src%bin%g"`
77 mkdir -p ${INSTALL_ROOT}/GHS3DPLUGIN_${VERSION}
79 if [ -e ./build.sh ] ; then
80 cp -f ./build.sh ${INSTALL_ROOT}
85 check_jb build.sh -o -b -d -v 0 -p $INSTALL_ROOT GHS3DPLUGIN
87 # create environment for the built binaries
89 ./GHS3DPLUGIN_BIN.sh print_env $INSTALL_WORK $SOURCE_DIR $INSTALL_ROOT $PRODUCT_SEQUENCE $prod_bin
98 export INSTALL_WORK=$2;
100 export INSTALL_ROOT=$4;
101 export PRODUCT_SEQUENCE=$5;
102 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="GHS3DPLUGINsrc" ; fi
103 export PRODUCT="GHS3DPLUGIN_SRC_${VERSION}"
104 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
105 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}