Salome HOME
Update for version 2.2.5
[tools/install.git] / README
1 ================================================================================
2                                      README
3                            SALOME Installation Wizard
4 ================================================================================
5
6   Contents of this file:
7
8   1. Running of the Installation Wizard
9
10   2. Running of SALOME
11      2.1. Setting of the environment for SALOME
12      2.2. Launching of SALOME
13
14   3. Installation notes
15      3.1. Time required for the installation
16      3.2. Log files
17      3.3. Testing of the installed SALOME platform
18
19   4. How to build SALOME modules from sources
20      4.1. General procedure
21      4.2. Automatic build procedure: build.csh script
22
23 ================================================================================
24
25   1. Running of the Installation Wizard
26
27      You can run the Installation Wizard in two modes: batch and gui. 
28      It's root directory contains python script runInstall:
29
30      [python] runInstall [-g|b] [-f <xml-file>] [-t <taget-dir>] [-tmp <tmp-dir>]
31
32      -g              
33           Runs the Installation Wizard in the GUI mode. In this case 
34           only <xml-file> key is taken into account. 
35           This option is used by default.
36
37      -b              
38           Runs the Installation Wizard in the batch mode.
39
40      -f <xml-file>   
41           The configuration file to be used by the Installation Wizard.  
42           If this parameter is missed then the script tries to define 
43           the Red Hat version and uses corresponding xml file. 
44           For example, for the Red Hat 8.0 config_RedHat8_0.xml file 
45           is supposed to be used by default. If the appropriate file 
46           is not found, config.xml is used by default.
47
48      -t <target-dir> 
49           The target directory SALOME products to be installed to. 
50           If used, overloads target directory, given in the 
51           configuration xml file.
52
53      -tmp <tmp-dir>  
54           The directory, which is used to contain temporary files.  
55           If used, overloads temporary directory, given in the 
56           configuration xml file.
57
58      -h   
59           Prints help information.
60
61      For more detailed information about the Installation Wizard refer to the 
62      readme.html file in the doc directory.
63
64 ================================================================================
65
66   2. Running of SALOME
67
68      This section describes how to run SALOME platform after its installation 
69      with the Installation Wizard.
70
71      2.1. Setting of the environment for SALOME
72
73           Installation Wizard creates some environment files to simplify 
74           the procedure of launching of SALOME. These shell scripts set all 
75           necessary environment variables for all products you have installed. 
76           These files are: 
77                * salome.csh + salome.sh in the KERNEL module's sources/binaries
78                  root directories;
79                * env_products.csh + env_products.sh in the target directory.
80
81           To set SALOME environment just type in the terminal window:
82
83                cd <KERNEL_ROOT_DIR>
84                source salome.sh
85           or
86                cd <KERNEL_ROOT_DIR>
87                source salome.csh
88
89           where <KERNEL_ROOT_DIR> is KERNEL binaries directory, e.g. 
90           KERNEL_2.2.0 for the 2.2.0 version.
91
92      2.2. Launching of SALOME
93         
94           After you set environment you can start SALOME. Go to the KERNEL 
95           module's binaries directory (KERNEL_2.2.0/bin/salome for the version 
96           2.2.0) by using of cd command and then type:
97
98                runSalome [<parameters>]
99
100           This will start SALOME according to the configuration parameters which
101           are described into salome.launch file, located in your home directory
102           ( $HOME/.salome_<version-number>/salome.launch ),
103           where <version_number> is number of SALOME version.
104
105           If this file does not exists, it is created on the first launch of 
106           SALOME from <KERNEL_ROOT_DIR>/bin/salome/salome.launch.
107
108           You can modify SALOME launching options by editing 
109           salome_<version_number>.launch file:
110
111           <Configuration-list>
112                <launchoptions>
113                     <gui>yes</gui>
114                     <logger>no</logger>
115                     <xterm>no</xterm>
116                     <portkill>yes</portkill>
117                     <killall>no</killall>
118                </launchoptions>
119                <modules-list>
120                     <module name="...">
121                          <plugin name="..."/>
122                     </module>
123                </modules-list>
124                <embedded-list>
125                     <embeddedserver>...</embeddedserver>
126                </embedded-list>
127                <standalone-list>
128                     <standaloneserver>...</standaloneserver>
129                </standalone-list>
130           </Configuration-list>     
131
132           Each parameter described in salome.launch file can be overrided by 
133           using corresponding keys for runSalome script:
134
135           --gui
136                 Launch GUI desktop
137           --logger
138                 Use logger server
139           --xterm
140                 Start each server in its own xterm console window
141           --portkill
142                 Kill SALOME, running on the current port
143           --killall
144                 Kill SALOME, running on all ports
145           --modules=<module>,<module>,...,<module>
146                 Use module(s), possible values are GEOM,SMESH,VISU,MED,SUPERV
147           --embedded=<container>,<container>,...<container>
148                 Start specified container(s) embedded in SALOME Session server 
149                 (i.e. running in the same process), possible values are registry, 
150                 study, moduleCatalog, cppContainer, pyContainer, supervContainer
151           --standalone=<container>,<container>,...<container>
152                 Start standalone container(s), possible values are registry, 
153                 study, moduleCatalog, cppContainer, pyContainer, supervContainer
154
155           Note that there is no key which corresponds to the <plugin> tag.
156           This tag can be used currently only for SMESH module to point external 
157           meshers plugins which should be loaded by SMESH dynamically.
158           Refer <SMESH_ROOT_DIR>/doc/salome/tui/SMESH/PluginMeshers.html
159           for more information om meshers plugins.
160
161 ================================================================================
162
163   3. Installation notes
164
165      3.1. Time required for the installation
166
167           Installation of all products which are necessary to build and 
168           start SALOME is a time-consuming process and needs from the user to be
169           patient. 
170           The quickest way to install SALOME is installation from the binaries. 
171           In this mode the Installation Wizard just extracts all precompiled 
172           products from the corresponding archives. 
173           The installation from sources requires much more time than from 
174           binaries because in this case the Installation Wizard extracts and 
175           then builds each product using the product's own installation 
176           procedure.
177           The installation time also depends on the computer and platform used.
178           For example, to install SALOME on Pentium III-800, Linux Red Hat 8.0,
179           time of the installation is:
180
181                - from binaries: ~10 minutes;
182                - from sources: up to 7 hours.
183         
184      3.2. Log files
185
186           The Installation Wizard displays the installation progress in the 
187           corresponding windows (see readme.html). The Wizard uses a temporary 
188           directory to store and build the products. During the installation 
189           it produces some log files in this directory. If you suspect that
190           program hangs you can check the log files. These files have names
191           in capital letters like CONFIGURE.LOG, MAKE.LOG, MAKEINSTALL.LOG, etc.
192
193      3.3. Testing of installed SALOME platform
194
195           There is a python script which allows to test shortly all SALOME
196           modules. This script can help to check if SALOME has been installed
197           successfully.
198           To test SALOME platform, run SALOME desktop (see section 2), then 
199           create a new study window (menu command 'File/New') and then type 
200           in the study's python console window:
201  
202                import salome_test
203
204           When running, the script loads diferent modules (Geometry, Mesh, Med, 
205           Post-Pro and Supervisor) and tests different functionality of these 
206           modules. You can watch script running progress in the python console
207           window.
208
209 ================================================================================
210
211   4. How to build SALOME modules from sources
212
213      This section describes the way how to build SALOME modules manually from
214      sources packages provided with Installation Wizard.
215      4.1. General procedure
216
217           If you want to build SALOME modules from sources, install all products
218           necessary for the platform and SALOME modules sources.
219           Then follow the scenario described below.
220           In the scenario below it is supposed that you have installed SALOME
221           modules sources in the /home/salome directory. The name of each module
222           sources directory depends on the version of the platform, for example,
223           KERNEL_SRC_2.2.0 for KERNEL module of SALOME version 2.2.0.
224
225           The order of compilation and installation should be performed according 
226           to the dependancies between modules:
227      
228           * KERNEL -> no dependancies
229           * GEOM -> KERNEL
230           * MED -> KERNEL
231           * SMESH -> KERNEL, GEOM, MED
232           * VISU -> KERNEL, MED
233           * SUPERV -> KERNEL
234           * COMPONENT -> KERNEL
235           * PYCALCULATOR -> KERNEL
236           * NETGENPLUGIN -> KERNEL, SMESH
237           * GHS3DPLUGIN -> KERNEL, SMESH
238
239           Note: NETGENPLUGIN, GHS3DPLUGIN are optional components. You may skip 
240           compiling them if you do not plan to use NETGEN and/or GHS3D mesher 
241           algorithms.
242           In general, each module (except KERNEL, of course) is optional for 
243           SALOME. If you do not need any module, just do not compile or install
244           it. But remember that some modules require other ones to be built first 
245           (see dependancies table above).
246
247           - go to KERNEL module's sources directory:
248
249                cd /home/salome/KERNEL_SRC_2.2.0
250
251           - set environment variables (use bash or csh script, depending on 
252             your shell):
253
254                source salome.csh
255             or
256                source salome.sh
257
258           - create a configuration script by typing
259
260                ./build_configure
261
262           - go to the parent directory and create build directory:
263
264                cd ..
265                mkdir KERNEL_build
266
267           - run configure script which will check the environment and create 
268             Makefile files:
269
270                cd KERNEL_build
271                ../KERNEL_SRC_2.2.0/configure --prefix=/home/salome/KERNEL_install
272
273           Note, that --prefix option defines the directory where you want to 
274           install KERNEL module after 'make install' procedure.
275           More about certain module's configure options you can learn by using
276           --help (-h) parameter.
277
278           - build and install KERNEL module:
279
280                make
281                make install
282
283           After you have completed this scenario, KERNEL module is built and 
284           installed into /home/salome/KERNEL_install directory.
285
286           - set environment:
287
288           * for bash:
289
290                export KERNEL_ROOT_DIR=/home/salome/KERNEL_install
291             or 
292                export KERNEL_ROOT_DIR=/home/salome/KERNEL_build
293                (if make install step was not performed).
294
295           * for csh:
296
297                setenv KERNEL_ROOT_DIR /home/salome/KERNEL_install
298             or 
299                setenv KERNEL_ROOT_DIR /home/salome/KERNEL_build
300                (if make install step was not performed).
301
302           - then repeat this scenario for other modules you want to build taking 
303             into account the dependancies between modules (see dependancies table
304             above).
305
306           Note: if the compilation fails it may be caused by bad environment. 
307           In this case you should check that environment script you use 
308           (salome.csh or salome.sh) contains the following lines for each module:
309
310           * for bash:
311
312                export PATH=${<module>_ROOT_DIR}/bin/salome:${PATH}
313                export LD_LIBRARY_PATH=${<module>_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH}
314                export PYTHONPATH=${<module>_ROOT_DIR}/bin/salome:${PYTHONPATH}
315                export PYTHONPATH=${<module>_ROOT_DIR}/lib/salome:${PYTHONPATH}
316                export PYTHONPATH=${<module>_ROOT_DIR}/lib/python2.2/site-packages/salome:${PYTHONPATH}
317                export PYTHONPATH=${<module>_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:${PYTHONPATH}
318
319           * for csh:
320
321                setenv PATH ${<module>_ROOT_DIR}/bin/salome:${PATH}
322                setenv LD_LIBRARY_PATH ${<module>_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH}
323                setenv PYTHONPATH ${<module>_ROOT_DIR}/bin/salome:${PYTHONPATH}
324                setenv PYTHONPATH ${<module>_ROOT_DIR}/lib/salome:${PYTHONPATH}
325                setenv PYTHONPATH ${<module>_ROOT_DIR}/lib/python2.2/site-packages/salome:${PYTHONPATH}
326                setenv PYTHONPATH ${<module>_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:${PYTHONPATH}
327      
328      4.2. Automatic build procedure: build.csh script
329
330           From version 2.2.0 SALOME Installation Wizard provides the script
331           for automatic building of SALOME modules from sources packages:
332           build.csh. It is installed into the top-level target directory
333           (the same directory where env_products.[c]sh files are generated.
334
335           To use this script just install SALOME sources packages with
336           Installation Wizard, then cd to the SALOME isntallation directory
337           and type:
338
339                ./build.csh
340
341           and that's all.
342           
343           By default, build.csh only compiles the modules but not installs them,
344           i.e. does not perform 'make install' step.
345           To do this, use -i option or -p <prefix> where <prefix> is target
346           directory.
347
348           If you want to build only some SALOME modules, just pass them as 
349           parameters, e.g.:
350
351                ./build.csh -i KERNEL MED GEOM
352
353           The script also provides some other options which specify compiling
354           and installation parameters. You can learn about options by using
355           -h key:
356
357                ./build.csh -h
358
359           When you run build.csh at first time it is not necessary to pass 
360           -b, -c parameters. The script detects if build procedure has not yet
361           been performed and runs build_configure, configure procedures
362           in this case.
363
364           Note: for avoiding of collisions it is recommended not to install 
365           SALOME binaries packages with Installation Wizard if you plan to build
366           SALOME modules from sources packages or to edit/comment all rows
367           in env_products.csh file concerning binaries packages.
368
369           Note: use -d option carefully because in this case the script removes
370           existing (previously installed) SALOME modules.
371
372 ================================================================================