]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Add Component and PyCalculator modules
authorvsr <vsr@opencascade.com>
Wed, 24 Mar 2004 15:23:14 +0000 (15:23 +0000)
committervsr <vsr@opencascade.com>
Wed, 24 Mar 2004 15:23:14 +0000 (15:23 +0000)
config_files/COMPONENT_BIN_1.4.1.sh [new file with mode: 0755]
config_files/COMPONENT_SRC_1.4.1.sh [new file with mode: 0755]
config_files/PYCALCULATOR_BIN_1.4.1.sh [new file with mode: 0755]
config_files/PYCALCULATOR_SRC_1.4.1.sh [new file with mode: 0755]

diff --git a/config_files/COMPONENT_BIN_1.4.1.sh b/config_files/COMPONENT_BIN_1.4.1.sh
new file mode 100755 (executable)
index 0000000..4e00571
--- /dev/null
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+check_version(){
+if [ -n "${COMPONENT_ROOT_DIR}" ]; then
+    check_lib_version VERSION ${COMPONENT_ROOT_DIR}/bin
+    if [ "$?" -eq "0" ]; then
+       ver=`cat ${COMPONENT_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` 
+       if [ "$ver" = "1.4.1" ]; then
+           return 0
+       fi
+    fi
+fi
+return 1
+}
+
+print_env(){
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export COMPONENT_ROOT_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 COMPONENT_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+##
+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}/COMPONENTbinariesV1.4.1.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="ComponentBin" ; fi
+export PRODUCT="COMPONENT_1.4.1"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE 
diff --git a/config_files/COMPONENT_SRC_1.4.1.sh b/config_files/COMPONENT_SRC_1.4.1.sh
new file mode 100755 (executable)
index 0000000..991ebf8
--- /dev/null
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+check_version(){
+if [ -n "${COMPONENT_SRC_DIR}" ]; then
+    check_lib_version VERSION ${COMPONENT_SRC_DIR}/bin
+    if [ "$?" -eq "0" ]; then
+       ver=`cat ${COMPONENT_SRC_DIR}/bin/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` 
+       if [ "$ver" = "1.4.1" ]; then
+           return 0
+       fi
+    fi
+fi
+return 1
+}
+
+print_env(){
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export COMPONENT_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 COMPONENT_SRC_DIR=${COMPONENT_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}/COMPONENTsourcesV1.4.1.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="ComponentSrc" ; fi
+export PRODUCT="COMPONENT_SRC_1.4.1"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE 
diff --git a/config_files/PYCALCULATOR_BIN_1.4.1.sh b/config_files/PYCALCULATOR_BIN_1.4.1.sh
new file mode 100755 (executable)
index 0000000..15902f8
--- /dev/null
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+check_version(){
+if [ -n "${PYCALCULATOR_ROOT_DIR}" ]; then
+    check_lib_version VERSION ${PYCALCULATOR_ROOT_DIR}/bin
+    if [ "$?" -eq "0" ]; then
+       ver=`cat ${PYCALCULATOR_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` 
+       if [ "$ver" = "1.4.1" ]; then
+           return 0
+       fi
+    fi
+fi
+return 1
+}
+
+print_env(){
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export PYCALCULATOR_ROOT_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 PYCALCULATOR_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+##
+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}/PYCALCULATORbinariesV1.4.1.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="PyCalculatorBin" ; fi
+export PRODUCT="PYCALCULATOR_1.4.1"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE 
diff --git a/config_files/PYCALCULATOR_SRC_1.4.1.sh b/config_files/PYCALCULATOR_SRC_1.4.1.sh
new file mode 100755 (executable)
index 0000000..0ada0b2
--- /dev/null
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+check_version(){
+if [ -n "${PYCALCULATOR_SRC_DIR}" ]; then
+    check_lib_version VERSION ${PYCALCULATOR_SRC_DIR}/bin
+    if [ "$?" -eq "0" ]; then
+       ver=`cat ${PYCALCULATOR_SRC_DIR}/bin/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` 
+       if [ "$ver" = "1.4.1" ]; then
+           return 0
+       fi
+    fi
+fi
+return 1
+}
+
+print_env(){
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export PYCALCULATOR_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 PYCALCULATOR_SRC_DIR=${PYCALCULATOR_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}/PYCALCULATORsourcesV1.4.1.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="PyCalculatorSrc" ; fi
+export PRODUCT="PYCALCULATOR_SRC_1.4.1"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE