]> SALOME platform Git repositories - tools/install.git/blob - config_files/ghs3d-4.0.sh
Salome HOME
7796e951dc389b23932555313fc7f2a70c34fe10
[tools/install.git] / config_files / ghs3d-4.0.sh
1 #!/bin/bash -noprofile
2
3 ####################################################################################
4 #  File      : ghs3d-4.0.sh
5 #  Created   : Thu Dec 18 12:01:00 2002
6 #  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
7 #  Project   : SALOME
8 #  Module    : Installation Wizard
9 #  Copyright : 2002-2007 CEA
10 #
11 #  This script is the part of the SALOME installation procedure.
12 #
13 ####################################################################################
14
15 check_version(){
16 # No way to check version!
17 return 0
18 }
19
20 print_env_bin()
21 {
22 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
23 #$DELIM ${PRODUCT_TYPE} $DELIM 
24 export PATH=\${INSTALL_ROOT}/${SINGLE_DIR:-${PRODUCT}}/DISTENE/Tools/TetMesh-GHS3D4.0/bin:\$PATH
25 ##
26 EOF
27 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
28 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
29 }
30
31 print_env_src()
32 {
33 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
34 #$DELIM ${PRODUCT_TYPE}_src $DELIM
35 # nothing to do
36 ##
37 EOF
38 (test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
39 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
40 }
41
42 try_preinstalled(){
43 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
44 try_existing ${PRODUCT_SRC_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
45 return $?
46 }
47
48 install_source()
49 {
50 echo "It's impossible to install ${PRODUCT} from sources"
51 }
52
53 install_source_and_build()
54 {
55 install_binary
56 }
57
58 install_binary()
59 {
60 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
61 source ${INSTALL_WORK}/$SHRC
62
63 # create a product directory
64 test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
65
66 check_jb tar xfz ${BIN_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
67
68 # to generate environment scripts
69 try_preinstalled
70 }
71
72 export PROCEDURE=$1;
73 export INSTALL_WORK=$2;
74 export SOURCE_DIR=$3;
75 export INSTALL_ROOT=$4;
76 export PRODUCT_SEQUENCE=$5;
77 export PRODUCT_TYPE=$6;
78 export INSTALL_PRODUCTS=$7;
79 SRC_DIR=$8;
80 REMOVE_SRC_TMP=$9;
81 shift
82 BIN_DIR=$9;
83 test $# == 10 && shift && SINGLE_DIR=$9
84 export PRODUCT="ghs3d-4.0"
85 export PRODUCT_DIR=${INSTALL_ROOT}/${SINGLE_DIR:-${PRODUCT}}
86 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
87 export PRODUCT_SRC_DIR=${INSTALL_ROOT}/${PRODUCT}_SRC
88 source ./common.sh
89 $PROCEDURE