From: akl Date: Fri, 27 Jul 2007 13:35:31 +0000 (+0000) Subject: Common scripts instead of separate BIN and SRC scripts for SALOME modules. X-Git-Tag: IMP_BR_4~56 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5d4b10933b2fcbdcce7d19f299d87e55cc45640a;p=tools%2Finstall.git Common scripts instead of separate BIN and SRC scripts for SALOME modules. --- diff --git a/config_files/CALCULATOR.sh b/config_files/CALCULATOR.sh new file mode 100755 index 0000000..6c8ba17 --- /dev/null +++ b/config_files/CALCULATOR.sh @@ -0,0 +1,156 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : CALCULATOR_BIN.sh +# Created : Thu Dec 18 12:01:00 2002 +# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) +# Project : SALOME +# Module : Installation Wizard +# Copyright : 2002-2007 CEA +# +# This script is the part of the SALOME installation procedure. +# +#################################################################################### + +VERSION="3.2.6" + +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" = "${VERSION}" ]; then + return 0 + fi + fi +elif [ -n "${CALCULATOR_SRC_DIR}" ]; then + if [ -f ${CALCULATOR_SRC_DIR}/configure.in.base ]; then + ver=`grep -E "^VERSION=" ${CALCULATOR_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' ` + if [ "$ver" = "${VERSION}" ]; then + return 0 + fi + fi +fi +return 1 +} + +print_env_bin(){ + +if test `uname -m` = "x86_64" ; then +export LIB_PREFIX=64 +else +export LIB_PREFIX="" +fi + +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < _runAppli +sed -e "s%export CALCULATOR_ROOT_DIR=.*%export CALCULATOR_ROOT_DIR=${CALCULATOR_ROOT_DIR}%g" _runAppli > runAppli +rm -f _runAppli +chmod a+x runAppli + +# to generate environment scripts +try_preinstalled +} + +export PROCEDURE=$1; +export INSTALL_WORK=$2; +export SOURCE_DIR=$3; +export INSTALL_ROOT=$4; +export PRODUCT_SEQUENCE=$5; +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +SRC_DIR=$8; +shift +REMOVE_SRC_TMP=$8; +export PRODUCT="CALCULATOR_${VERSION}" +export PRODUCT_SRC="CALCULATOR_SRC_${VERSION}" +export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} +export PRODUCT_SRC_DIR=${INSTALL_ROOT}/${PRODUCT_SRC} +source ./common.sh +$PROCEDURE diff --git a/config_files/COMPONENT.sh b/config_files/COMPONENT.sh new file mode 100755 index 0000000..c1751d4 --- /dev/null +++ b/config_files/COMPONENT.sh @@ -0,0 +1,150 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : COMPONENT_BIN.sh +# Created : Thu Dec 18 12:01:00 2002 +# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) +# Project : SALOME +# Module : Installation Wizard +# Copyright : 2002-2007 CEA +# +# This script is the part of the SALOME installation procedure. +# +#################################################################################### + +VERSION="3.2.6" + +check_version(){ +if [ -n "${COMPONENT_ROOT_DIR}" ]; then + check_lib_version VERSION ${COMPONENT_ROOT_DIR}/bin/salome + if [ "$?" -eq "0" ]; then + ver=`cat ${COMPONENT_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` + if [ "$ver" = "${VERSION}" ]; then + return 0 + fi + fi +elif [ -n "${COMPONENT_SRC_DIR}" ]; then + if [ -f ${COMPONENT_SRC_DIR}/configure.in.base ]; then + ver=`grep -E "^VERSION=" ${COMPONENT_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' ` + if [ "$ver" = "${VERSION}" ]; then + return 0 + fi + fi +fi +return 1 +} + +print_env_bin(){ + +if test `uname -m` = "x86_64" ; then +export LIB_PREFIX=64 +else +export LIB_PREFIX="" +fi + +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < _runAppli +sed -e "s%export HELLO_ROOT_DIR=.*%export HELLO_ROOT_DIR=${HELLO_ROOT_DIR}%g" _runAppli > runAppli +rm -f _runAppli +chmod a+x runAppli + +# to generate environment scripts +try_preinstalled +} + +export PROCEDURE=$1; +export INSTALL_WORK=$2; +export SOURCE_DIR=$3; +export INSTALL_ROOT=$4; +export PRODUCT_SEQUENCE=$5; +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +SRC_DIR=$8; +shift +REMOVE_SRC_TMP=$8; +export PRODUCT="HELLO_${VERSION}" +export PRODUCT_SRC="HELLO_SRC_${VERSION}" +export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} +export PRODUCT_SRC_DIR=${INSTALL_ROOT}/${PRODUCT_SRC} +source ./common.sh +$PROCEDURE diff --git a/config_files/KERNEL.sh b/config_files/KERNEL.sh new file mode 100755 index 0000000..8165429 --- /dev/null +++ b/config_files/KERNEL.sh @@ -0,0 +1,176 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : KERNEL_BIN.sh +# Created : Thu Dec 18 12:01:00 2002 +# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) +# Project : SALOME +# Module : Installation Wizard +# Copyright : 2002-2007 CEA +# +# This script is the part of the SALOME installation procedure. +# +#################################################################################### + +VERSION="3.2.6" + +check_version(){ +if [ -n "${KERNEL_ROOT_DIR}" ]; then + check_lib_version VERSION ${KERNEL_ROOT_DIR}/bin/salome + if [ "$?" -eq "0" ]; then + ver=`cat ${KERNEL_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` + if [ "$ver" = "${VERSION}" ]; then + return 0 + fi + fi +elif [ -n "${KERNEL_SRC_DIR}" ]; then + if [ -f ${KERNEL_SRC_DIR}/configure.ac ]; then + ver=`grep -E "^VERSION=" ${KERNEL_SRC_DIR}/configure.ac | awk -F= '{print $NF}' | tr -d '[:space:]' ` + if [ "$ver" = "${VERSION}" ]; then + return 0 + fi + fi +fi +return 1 +} + +print_env_bin(){ +if test `uname -m` = "x86_64" ; then +export LIB_PREFIX=64 +else +export LIB_PREFIX="" +fi +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < _runAppli +sed -e "s%export PYHELLO_ROOT_DIR=.*%export PYHELLO_ROOT_DIR=${PYHELLO_ROOT_DIR}%g" _runAppli > runAppli +chmod a+x runAppli + +# to generate environment scripts +try_preinstalled +} + +export PROCEDURE=$1; +export INSTALL_WORK=$2; +export SOURCE_DIR=$3; +export INSTALL_ROOT=$4; +export PRODUCT_SEQUENCE=$5; +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +SRC_DIR=$8; +shift +REMOVE_SRC_TMP=$8; +export PRODUCT="PYHELLO_${VERSION}" +export PRODUCT_SRC="PYHELLO_SRC_${VERSION}" +export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} +export PRODUCT_SRC_DIR=${INSTALL_ROOT}/${PRODUCT_SRC} +source ./common.sh +$PROCEDURE diff --git a/config_files/SMESH.sh b/config_files/SMESH.sh new file mode 100755 index 0000000..603e3d5 --- /dev/null +++ b/config_files/SMESH.sh @@ -0,0 +1,148 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : SMESH_BIN.sh +# Created : Thu Dec 18 12:01:00 2002 +# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) +# Project : SALOME +# Module : Installation Wizard +# Copyright : 2002-2007 CEA +# +# This script is the part of the SALOME installation procedure. +# +#################################################################################### + +VERSION="3.2.6" + +check_version(){ +if [ -n "${SMESH_ROOT_DIR}" ]; then + check_lib_version VERSION ${SMESH_ROOT_DIR}/bin/salome + if [ "$?" -eq "0" ]; then + ver=`cat ${SMESH_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` + if [ "$ver" = "${VERSION}" ]; then + return 0 + fi + fi +elif [ -n "${SMESH_SRC_DIR}" ]; then + if [ -f ${SMESH_SRC_DIR}/configure.in.base ]; then + ver=`grep -E "^VERSION=" ${SMESH_SRC_DIR}/configure.in.base | awk -F= '{print $NF}' | tr -d '[:space:]' ` + if [ "$ver" = "${VERSION}" ]; then + return 0 + fi + fi +fi +return 1 +} + +print_env_bin(){ +if test `uname -m` = "x86_64" ; then +export LIB_PREFIX=64 +else +export LIB_PREFIX="" +fi +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <