Salome HOME
ce7a819be5769a8208ec053d6c73ecf0926a31d7
[modules/kernel.git] / doc / salome / install.dox
1 /*!
2   \page INSTALL Installation instructions
3
4 <b>NOT UP TO DATE AND INCOMPLETE DOCUMENT BUT CAN BE HELPFUL</b>
5
6 You'll find here generic instructions for installing the SALOME platform.
7
8 \section Summary
9
10 -# \ref S1_install
11 -# \ref S2_install
12 -# \ref S3_install
13 -# \ref S4_install
14 -# \ref S5_install
15 -# \ref S6_install
16 -# \ref S7_install
17 -# \ref S8_install
18
19 \section S1_install Quick Overview
20
21 First of all, you have to check (or install if needed) the dependant
22 software programs on your system. These programs are:
23
24 - common development tools as gcc, CMake tool.
25 - third party softwares used in %SALOME building or runtime process
26   (python, OCC, VTK, ...)
27
28 Further details can be found in sections \ref S2_install and \ref S3_install.
29
30 If the dependencies are installed on your system, then you have to set
31 your shell environment to get access to the software components
32 (cf. \ref S4_install).
33
34 The next step is to install the KERNEL (cf. \ref S5_install):
35
36 \code
37 $ mkdir <kernel_build>
38 $ mkdir <kernel_install>
39 $ cd <kernel_build>
40 $ cmake -DCMAKE_BUILD_TYPE=<Mode> -DCMAKE_INSTALL_PREFIX=<kernel_install> ../<kernel_src>
41 $ make
42 $ make install
43 \endcode
44
45 Where <Mode> is build mode (Release or Debug), <kernel_install> 
46 is a destination folder to install KERNEL module of SALOME.
47
48 Then, the %SALOME components GEOM, MED, VISU, ... can be installed
49 with a similar procedure (cf. \ref S6_install).
50
51 Eventually, the platform can be run by executing the shell script
52 %runSalome (cf. \ref S7_install). Here, somme additionnal variables have to be set
53 to describe the %SALOME runtime configuration (<COMPONENT>_ROOT_DIR,
54 OMNIORB_CONFIG)
55
56 The following provides you with specific instructions for each step.
57
58
59 \section S2_install System configuration
60
61 %SALOME is compiled and tested on differents platforms with native packages:
62 - Debian sarge
63 - Mandrake 10.1
64 - ...
65
66 If you have another platform, we suggest the following configuration
67 for building process:
68
69 - gcc-3.3.x or 3.4.x
70 - CMake-2.8.8 or more
71
72 remarks:
73
74 - This is the minimum level of CMake, if you need
75   to compile all the third party softwares (included OpenCascade 5.2.x).
76
77 \section S3_install Third-party dependencies
78
79 The %SALOME platform relies on a set of third-party softwares. The
80 current version depends on the following list
81 (versions given here are from Debian Sarge, except OpenCascade, VTK and MED,
82 which are not Debian packages):
83
84 - CAS-5.2.4             OpenCascade (try binaries,a source patch is needed)
85 - VTK-4.2.6             VTK 3D-viewer
86 - PyQt-3.13             Python-Qt Wrapper
87 - Python-2.3.5          Python interpreter
88 - SWIG-1.3.24           SWIG library
89 - boost-1_32_0          C++ library (only include templates are used)
90 - hdf5-1.6.2            Files Database library
91 - med-2.2.2             MED Data Format support for file records 
92 - omniORB-4.0.5         ORB used in %SALOME
93 - qt-x11-free-3.3.3     Qt library
94 - qwt-4.2               Graph components for Qt
95 - sip4-4.1.1            langage binding software 
96
97 And, in order to build the documentation:
98
99 - doxygen-1.4.2
100 - graphviz-2.2.1
101
102
103 Additionnal software may be installed for optional features: 
104
105 - netgen4.3 + patch
106 - tix8.1.4
107 - openpbs-2.3.16
108 - lsf-???
109
110 <b>To Do</b>
111
112 - Instructions for installing these software programs can be found in a
113   special note doc/configuration_examples/install-prerequis.
114 - Installation shell scripts are also provided.
115   These scripts have to be adapted to your own configuration.
116
117 - See doc/configuration_examples/*
118
119 In the following, we assume that all the third-party softwares are
120 installed in the same root directory, named <salomeroot>/prerequis.
121 Then, your file system should probably look like:
122
123 \code
124 <salomeroot>/prerequis/Python-2.2.2
125 <salomeroot>/prerequis/omniORB-3.0.5
126 <salomeroot>/prerequis/qt-x11-free-3.0.5
127 ...
128 \endcode
129
130 \section S4_install Preparing the shell environment
131
132 Some variables have to be set to get access to third-party software
133 components (include files, executable, library, ...) during building
134 process and runtime.
135
136 The shell file prerequis.sh, embedded in the KERNEL source package,
137 provides a template for setting those variables. In this example, all the
138 softwares are supposed to be installed in the same root directory,
139 named here INSTALLROOT.
140
141 Copy the prerequis.sh in a working directory and adjust the settings
142 to your own configuration. To get the shell prepared, just
143 execute the following command in the building shell:
144
145 \code
146 $ source prerequis.sh
147 \endcode
148
149 (we assume here a ksh or bash mode)
150
151
152 \section S5_install Installing the KERNEL component
153
154 We use here the notation <kernel_src> to specify the source directory
155 of the KERNEL component. The shell environment is supposed to have
156 been set (cf. \ref S4_install).
157
158 Installing the KERNEL from a source package needs three directories:
159
160 - the source directory, denoted here by <kernel_src>.
161
162 - the build directory, denoted by <kernel_build> in the following. This
163   directory can't be the same directory as <kernel_src>.
164
165 - the install directory, denoted by <kernel_install> in the following. This
166   directory can't be the same directory as <kernel_src> or
167   <kernel_build>.
168
169 The installing process is:
170
171 <b>STEP 1:</b>
172   preparing directories
173
174   create the <kernel_build> and the <kernel_install> directories:
175
176   \code
177 $ mkdir <kernel_build>
178 $ mkdir <kernel_install>
179 \endcode
180
181   go to the build directory
182   
183   \code
184 $ cd <kernel_build>
185   \endcode
186
187 <b>STEP 2:</b>
188   configure the building process
189
190   \code
191 $ cmake -DCMAKE_BUILD_TYPE=<Mode> -DCMAKE_INSTALL_PREFIX=<kernel_install> ../<kernel_src>
192   \endcode
193
194   Where <Mode> is build mode(Release or Debug), <kernel_install> 
195   is a destination folder to install KERNEL module of SALOME.
196   Note that <kernel_install> must be an absolute path.
197
198   When the configure process is complete, check the status of cmake build.
199   You should not have the errors and warnings. All dependent products and packages must be found.
200   
201   If a software get a status "not found", then it is not "seen" in the system:
202
203 - the software is not installed, or
204 - the shell environment is not set correctly. 
205
206 <b>STEP 3 :</b>
207   Building the binary files
208
209   Execute make in the <kernel_build> directory:
210
211   \code
212 $ make
213   \endcode
214
215 <b>STEP 4:</b>
216   Installing binary files, scripts and documentation
217
218   Execute install target in the <kernel_install> directory:
219
220   \code
221 $ make install
222   \endcode
223
224 \section S6_install Installing the SALOME components
225
226 Installing a component <COMPONENT> is done by following the same
227 instructions as given for the KERNEL, replacing KERNEL by
228 <COMPONENT>.
229
230 You just have to be aware of the dependencies between components:
231
232 - MED    depends on KERNEL
233 - GEOM   depends on KERNEL
234 - SMESH  depends on KERNEL, MED, GEOM
235 - VISU   depends on KERNEL, MED
236 - YACS depends on KERNEL
237
238 For example, installing the component SMESH needs the previous
239 installation of the KERNEL component, and then the GEOM and MED components.
240
241 The building process uses the variables <COMPONENT>_ROOT_DIR to
242 localize the dependant components. The variables must be set to the
243 install path directory of the components <COMPONENT> (ex:
244 KERNEL_ROOT_DIR=<kernel_install>). 
245  
246 In the above example, the three variables KERNEL_ROOT_DIR,
247 GEOM_ROOT_DIR and MED_ROOT_DIR have to be set before configuring the
248 building process of the SMESH component (STEP 3).
249
250
251 \section S7_install Runtime
252
253 See \ref SALOME_Application to define your own configuration of %SALOME and run it
254 on one or several computers. This is the recommended way of configuration.
255
256 The following explains the general principles.
257
258 To run the %SALOME platform, the procedure is:
259
260 - set the shell environment to get access to third-party softwares:
261   \code
262 $ source prerequis.sh
263   \endcode
264
265 - define the %SALOME configuration by setting the whole set of
266   variables <COMPONENT>_ROOT_DIR. Here, you just have to set the
267   kernel and the components you need:
268   \code
269 $ export KERNEL_ROOT_DIR=<kernel_install>
270 $ export MED_ROOT_DIR=<med_install>
271 $ ...
272   \endcode
273
274 - define the CORBA configuration file by setting the variable
275   OMNIORB_CONFIG. This variable must be set to a writable file
276   path. The file may be arbitrary chosen and doesn't need to exist
277   before running. We suggest:
278   \code
279 $ export OMNIORB_CONFIG=$HOME/.omniORB.cfg
280   \endcode
281
282 - run the %SALOME platform by executing the script %runSalome:
283   \code
284 $KERNEL_ROOT_DIR/bin/salome/runSalome
285   \endcode
286
287 \section S8_install Suggestions and advices
288
289 For convenience or customization, we suggest the following organisation:
290
291 - choose and create a root directory for the %SALOME platform, say
292   <salomeroot>.
293
294 - install the third-party softwares in a sub-directory "prerequis"
295
296 - install the %SALOME components in a sub-directory "SALOME2"
297
298 - make personnal copies of the files prerequis.sh and %runSalome in
299   <salomeroot>:
300   \code
301 $ cp <kernel_src>/prerequis.sh <rundir>/.
302 $ cp <kernel_install>/bin/salome/runSalome <rundir>/.
303   \endcode
304   Edit the file prerequis.sh and adjust it to your own configuration.
305
306 - define the SALOME2 configuration\n
307   This step consists in setting the KERNEL_ROOT_DIR, the whole set of
308   variables <COMPONENT>_ROOT_DIR you need, and the OMNIORB_CONFIG
309   variable.
310   \n
311   We suggest to create a shell file envSalome.sh containing those
312   settings. Then the configuration consists in loading envSalome.sh in
313   the runtime shell:
314   \code
315 $ source envSalome.sh
316   \endcode
317
318 - When installed with this file organisation, running %SALOME is done
319   with the following shell commands:
320   \code
321     $ source <salomeroot>/prerequis.sh
322     $ source <salomeroot>/envSalome.sh
323     $ ./runSalome
324   \endcode
325
326 */