#!/bin/sh
check_version(){
-#we don't know anything about version
-return 0
+if [ -n "${PYHELLO_ROOT_DIR}" ]; then
+ if [ -f ${PYHELLO_ROOT_DIR}/bin/salome/VERSION ]; then
+ ver=`cat ${PYHELLO_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' `
+ if [ "$ver" = "2.2.6" ]; then
+ return 0
+ fi
+ fi
+fi
+return 1
}
print_env(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
#$DELIM ${PRODUCT_TYPE} $DELIM
export PYHELLO_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+ if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+ export PATH=\${PYHELLO_ROOT_DIR}/bin/salome:\${PATH}
+ export PYTHONPATH=\${PYHELLO_ROOT_DIR}/bin/salome:\${PYHELLO_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+ fi
+fi
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
#$DELIM ${PRODUCT_TYPE} $DELIM
export PYHELLO_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+ if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+ export PATH=\${PYHELLO_ROOT_DIR}/bin/salome:\${PATH}
+ export PYTHONPATH=\${PYHELLO_ROOT_DIR}/bin/salome:\${PYHELLO_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+ fi
+fi
##
EOF
make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
source ${INSTALL_WORK}/$SHRC
-check_jb tar xfz ${SOURCE_DIR}/PYHELLObinariesV2.2.3.tar.gz -C ${INSTALL_ROOT}
+check_jb tar xfz ${SOURCE_DIR}/PYHELLObinariesV2.2.6.tar.gz -C ${INSTALL_ROOT}
+
+# remove all *.la files
+rm -rf ${PRODUCT_DIR}/lib/salome/*.la
print_env
}
export INSTALL_ROOT=$4;
export PRODUCT_SEQUENCE=$5;
if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="PyHelloBin" ; fi
-export PRODUCT="PYHELLO_2.2.3"
+export PRODUCT="PYHELLO_2.2.6"
export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
source ./common.sh