]> SALOME platform Git repositories - tools/install.git/blob - config_files/HELLO_BIN.sh
Salome HOME
Update for version 2.2.5
[tools/install.git] / config_files / HELLO_BIN.sh
1 #!/bin/sh
2
3 check_version(){
4 #we don't know anything about version
5 return 0
6 }
7
8 print_env(){
9 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
10 #$DELIM ${PRODUCT_TYPE} $DELIM
11 export HELLO_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
12 if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
13   if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
14     export PATH=\${HELLO_ROOT_DIR}/bin/salome:\${PATH}
15     export LD_LIBRARY_PATH=\${HELLO_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
16     export PYTHONPATH=\${HELLO_ROOT_DIR}/bin/salome:\${HELLO_ROOT_DIR}/lib/salome:\${HELLO_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
17   fi
18 fi
19 ##
20 EOF
21 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
22 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
23 }
24
25 # looks for the native product and collects it's environment (used by make_env())
26 try_native(){
27 check_version
28 if [ $? -eq 0 ] ; then
29     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
30 #$DELIM ${PRODUCT_TYPE} $DELIM
31 export HELLO_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
32 if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
33   if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
34     export PATH=\${HELLO_ROOT_DIR}/bin/salome:\${PATH}
35     export LD_LIBRARY_PATH=\${HELLO_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
36     export PYTHONPATH=\${HELLO_ROOT_DIR}/bin/salome:\${HELLO_ROOT_DIR}/lib/salome:\${HELLO_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
37   fi
38 fi
39 ##
40 EOF
41     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
42     return 0
43 fi
44 return 1;
45 }
46
47 try_preinstalled(){
48 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
49 return $?
50 }
51
52 install_source()
53 {
54 return 1
55 }
56
57 install_binary()
58 {
59 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
60 source ${INSTALL_WORK}/$SHRC
61
62 check_jb tar xfz ${SOURCE_DIR}/HELLObinariesV2.2.5.tar.gz -C ${INSTALL_ROOT}
63
64 print_env
65 }
66
67 export PROCEDURE=$1;
68 export INSTALL_WORK=$2;
69 export SOURCE_DIR=$3;
70 export INSTALL_ROOT=$4;
71 export PRODUCT_SEQUENCE=$5;
72 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="HelloBin" ; fi
73 export PRODUCT="HELLO_2.2.5"
74 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
75 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
76 source ./common.sh
77 $PROCEDURE