Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/kernel.git] / bin / appli_install.sh
1 #!/bin/sh 
2
3 # Copyright (C) 2005  OPEN CASCADE, CEA, EDF R&D, LEG
4 #           PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either 
8 # version 2.1 of the License.
9
10 # This library is distributed in the hope that it will be useful 
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
13 # Lesser General Public License for more details.
14
15 # You should have received a copy of the GNU Lesser General Public  
16 # License along with this library; if not, write to the Free Software 
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18
19 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20
21
22 SALOME_ROOT=${HOME}/SALOME2
23 INSTALL_ROOT=${SALOME_ROOT}/Install
24
25 APPLI_ROOT=`pwd`
26
27 # --- clean appli
28 rm -rf bin lib share doc envd getAppliPath.py searchFreePort.sh runAppli runConsole runSession env.d
29
30 # --- install appli
31
32 mkdir -p env.d
33 ln -fs bin/salome/appliskel/envd .
34 ln -fs bin/salome/appliskel/getAppliPath.py .
35 ln -fs bin/salome/appliskel/searchFreePort.sh .
36 ln -fs bin/salome/appliskel/runRemote.sh .
37 ln -fs bin/salome/appliskel/runAppli .
38 ln -fs bin/salome/appliskel/runConsole .
39 ln -fs bin/salome/appliskel/runSession .
40 ln -fs bin/salome/appliskel/runTests .
41 ln -fs bin/salome/appliskel/.bashrc .
42
43 # --- prerequisites
44
45 if [ x${PREREQUISITE_SH} != x ]; then
46   cp ${PREREQUISITE_SH} env.d/envProducts.sh;
47 else
48   # --- unless PREREQUISITE_SH defines the prerequisite script, 
49   #     edit and uncomment the following line to set it, and comment the echo and exit lines
50   #ln -fs myPathForSalomePrerequisiteScriptToBeSourced env.d/envProducts.sh
51   echo "The file to source for SALOME prerequisite definition is not known:"
52   echo "--> Edit the corresponding line in " $0 ",Comment this message and the following exit command,"
53   exit 1;
54 fi
55
56 # --- symbolic links creation, from modules_root_dir
57
58 VERSION=V3_2_0
59
60 for module in KERNEL MED GUI GEOM SMESH VISU SUPERV LIGHT NETGENPLUGIN PYCALCULATOR; 
61 do 
62     echo " ========= " ${module};
63     python virtual_salome.py -v --prefix="." --module=$INSTALL_ROOT/${module}_${VERSION}
64     echo "export ${module}_ROOT_DIR=$APPLI_ROOT" >> env.d/configSalome.sh
65 done
66
67 # --- HELLO module
68
69 echo " =========  HELLO1";
70 python virtual_salome.py -v --prefix="." --module=$INSTALL_ROOT/HELLO1_${VERSION}
71 echo "export HELLO_ROOT_DIR=$APPLI_ROOT" >> env.d/configSalome.sh
72
73 # --- PYHELLO module
74
75 echo " ========= PYHELLO1";
76 python virtual_salome.py -v --prefix="." --module=$INSTALL_ROOT/PYHELLO1_${VERSION}
77 echo "export PYHELLO_ROOT_DIR=$APPLI_ROOT" >> env.d/configSalome.sh
78
79 # --- GUI config
80
81 echo "export config_var=$APPLI_ROOT:$APPLI_ROOT/share/salome/resources/gui" >> env.d/configGUI.sh
82
83 # --- SAMPLES directory
84
85 echo "export DATA_DIR=$INSTALL_ROOT/SAMPLES/${VERSION}/SAMPLES_SRC" >> env.d/configSalome.sh
86
87 # ---