]> SALOME platform Git repositories - tools/install.git/blob - config_files/ghs3d-4.0.sh
Salome HOME
efdea55d4e81233de50a30ae6e3a45bcbc88975e
[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}/${PRODUCT}/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_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
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_DIR}_SRC ${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 check_jb tar xfz ${BIN_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
64
65 # to generate environment scripts
66 try_preinstalled
67 }
68
69 export PROCEDURE=$1;
70 export INSTALL_WORK=$2;
71 export SOURCE_DIR=$3;
72 export INSTALL_ROOT=$4;
73 export PRODUCT_SEQUENCE=$5;
74 export PRODUCT_TYPE=$6;
75 export INSTALL_PRODUCTS=$7;
76 SRC_DIR=$8;
77 shift
78 REMOVE_SRC_TMP=$8;
79 shift
80 BIN_DIR=$8;
81 export PRODUCT="ghs3d-4.0"
82 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
83 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
84 source ./common.sh
85 $PROCEDURE