3 ####################################################################################
4 # File : GHS3DPLUGIN_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 "${GHS3DPLUGIN_ROOT_DIR}" ]; then
19 check_lib_version VERSION ${GHS3DPLUGIN_ROOT_DIR}/bin/salome
20 if [ "$?" -eq "0" ]; then
21 ver=`cat ${GHS3DPLUGIN_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
22 if [ "$ver" = "${VERSION}" ]; then
27 elif [ -n "${GHS3DPLUGIN_SRC_DIR}" ]; then
28 if [ -f ${GHS3DPLUGIN_SRC_DIR}/configure.in.base ]; then
29 ver=`grep -E "^VERSION=" ${GHS3DPLUGIN_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' `
30 if [ "$ver" = "${VERSION}" ]; then
40 if test `uname -m` = "x86_64" ; then
46 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
47 #$DELIM ${PRODUCT_TYPE} $DELIM
48 export GHS3DPLUGIN_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
49 if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
50 if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
51 export LD_LIBRARY_PATH=\${GHS3DPLUGIN_ROOT_DIR}/lib${LIB_PREFIX}/salome:\${LD_LIBRARY_PATH}
52 export PYTHONPATH=\${GHS3DPLUGIN_ROOT_DIR}/lib${LIB_PREFIX}/salome:\${GHS3DPLUGIN_ROOT_DIR}/lib${LIB_PREFIX}/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
57 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
58 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
62 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
63 #$DELIM ${PRODUCT_TYPE}_src $DELIM
64 export GHS3DPLUGIN_SRC_DIR=\${INSTALL_ROOT}/${PRODUCT_SRC}
68 (test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
69 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
73 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
74 try_existing ${PRODUCT_SRC_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
80 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
81 source ${INSTALL_WORK}/$SHRC
83 check_jb tar xfz ${SOURCE_DIR}/GHS3DPLUGINsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
85 # to generate environment scripts
89 install_source_and_build()
95 mkdir -p ${PRODUCT_DIR}
97 if [ -e ./build.sh ] ; then
98 cp -f ./build.sh ${INSTALL_ROOT}
103 check_jb build.sh -o -b -d -v 0 -p $INSTALL_ROOT GHS3DPLUGIN
107 # remove sources and temporary files after building
108 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
109 test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
110 test -d ${INSTALL_ROOT}/"GHS3DPLUGIN_BUILD" && rm -fr ${INSTALL_ROOT}/"GHS3DPLUGIN_BUILD"
113 # to generate environment scripts
119 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
120 source ${INSTALL_WORK}/$SHRC
122 check_jb tar xfz ${SOURCE_DIR}/GHS3DPLUGINbinariesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
123 check_jb tar xfz ${SRC_DIR}/GHS3DPLUGINsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
125 # modify all *.la files
126 export GHS3DPLUGIN_ROOT_DIR=${PRODUCT_DIR}
127 modif_la_files ${PRODUCT_DIR}
129 # to generate environment scripts
134 export INSTALL_WORK=$2;
135 export SOURCE_DIR=$3;
136 export INSTALL_ROOT=$4;
137 export PRODUCT_SEQUENCE=$5;
138 export PRODUCT_TYPE=$6;
139 export INSTALL_PRODUCTS=$7;
143 export PRODUCT="GHS3DPLUGIN_${VERSION}"
144 export PRODUCT_SRC="GHS3DPLUGIN_SRC_${VERSION}"
145 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
146 export PRODUCT_SRC_DIR=${INSTALL_ROOT}/${PRODUCT_SRC}