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