]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
This commit was generated by cvs2git to create branch 'SALOME_3'.
authoradmin <salome-admin@opencascade.com>
Thu, 20 Oct 2005 12:01:46 +0000 (12:01 +0000)
committeradmin <salome-admin@opencascade.com>
Thu, 20 Oct 2005 12:01:46 +0000 (12:01 +0000)
Cherrypick from master 2005-10-20 12:01:45 UTC vsr <vsr@opencascade.com> 'Update for version 2.2.5':
    config_files/CALCULATOR_BIN.sh
    config_files/CALCULATOR_SRC.sh

config_files/CALCULATOR_BIN.sh [new file with mode: 0755]
config_files/CALCULATOR_SRC.sh [new file with mode: 0755]

diff --git a/config_files/CALCULATOR_BIN.sh b/config_files/CALCULATOR_BIN.sh
new file mode 100755 (executable)
index 0000000..ec090cd
--- /dev/null
@@ -0,0 +1,83 @@
+#!/bin/sh
+
+check_version(){
+if [ -n "${CALCULATOR_ROOT_DIR}" ]; then
+    check_lib_version VERSION ${CALCULATOR_ROOT_DIR}/bin/salome
+    if [ "$?" -eq "0" ]; then
+       ver=`cat ${CALCULATOR_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` 
+       if [ "$ver" = "2.2.5" ]; then
+           return 0
+       fi
+    fi
+fi
+return 1
+}
+
+print_env(){
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export CALCULATOR_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${CALCULATOR_ROOT_DIR}/bin/salome:\${PATH}
+    export PYTHONPATH=\${CALCULATOR_ROOT_DIR}/bin/salome:\${CALCULATOR_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})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+}
+
+# looks for the native product and collects it's environment (used by make_env())
+try_native(){
+check_version
+if [ $? -eq 0 ] ; then
+    cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export CALCULATOR_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${CALCULATOR_ROOT_DIR}/bin/salome:\${PATH}
+    export PYTHONPATH=\${CALCULATOR_ROOT_DIR}/bin/salome:\${CALCULATOR_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
+##
+EOF
+    make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+    return 0
+fi
+return 1;
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+return $?
+}
+
+install_source()
+{
+return 1
+}
+
+install_binary()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/CALCULATORbinariesV2.2.5.tar.gz -C ${INSTALL_ROOT}
+
+print_env
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INSTALL_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="CALCULATORBin" ; fi
+export PRODUCT="CALCULATOR_2.2.5"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE 
diff --git a/config_files/CALCULATOR_SRC.sh b/config_files/CALCULATOR_SRC.sh
new file mode 100755 (executable)
index 0000000..16cb84e
--- /dev/null
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+check_version(){
+if [ -n "${CALCULATOR_SRC_DIR}" ]; then
+    check_lib_version VERSION ${CALCULATOR_SRC_DIR}/bin
+    if [ "$?" -eq "0" ]; then
+       ver=`cat ${CALCULATOR_SRC_DIR}/bin/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` 
+       if [ "$ver" = "2.2.5" ]; then
+           return 0
+       fi
+    fi
+fi
+return 1
+}
+
+print_env(){
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export CALCULATOR_SRC_DIR=\${INSTALL_ROOT}/${PRODUCT}
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+}
+
+# looks for the native product and collects it's environment (used by make_env())
+try_native(){
+check_version
+if [ $? -eq 0 ] ; then
+    cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export CALCULATOR_SRC_DIR=${CALCULATOR_SRC_DIR}
+##
+EOF
+    make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+    return 0
+fi
+return 1;
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+return $?
+}
+
+install_source()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/CALCULATORsourcesV2.2.5.tar.gz -C ${INSTALL_ROOT}
+
+print_env
+}
+
+install_binary()
+{
+return 1
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INSTALL_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="CALCULATORSrc" ; fi
+export PRODUCT="CALCULATOR_SRC_2.2.5"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE