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