Salome HOME
fix a bug: set SUITRoot and SalomeAppConfig variables
[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 Linux version and uses corresponding xml file. 
44           For example, for the Mandrake 10.1 config_Mandrake10_1.xml file 
45           is supposed to be used by default. If the appropriate file 
46           is not found, config.xml is used by default. This file usually
47           refers to the default target platform. For SALOME version 3.0.0
48           and higher default target platform is Linux Mandrake 10.1.
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 (usually /salome).
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 (usually /tmp).
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; these files can be used for the launching of
81                  SALOME.
82                * env_products.csh + env_products.sh in the target directory;
83                  these files contain minimal environment settings necessary
84                  to build SALOME packages from sources (see paragraph 4).
85
86           To set SALOME environment just type in the terminal window:
87
88                cd <KERNEL_ROOT_DIR>
89                source salome.sh
90           or
91                cd <KERNEL_ROOT_DIR>
92                source salome.csh
93
94           where <KERNEL_ROOT_DIR> is KERNEL binaries directory, e.g. 
95           KERNEL_3.0.0 for the 3.0.0 version.
96
97      2.2. Launching of SALOME
98         
99           After you set environment you can start SALOME. Go to the KERNEL 
100           module's binaries directory (KERNEL_3.0.0/bin/salome for the version 
101           3.0.0) by using of cd command and then type:
102
103                runSalome [<parameters>]
104
105           This will start SALOME according to the configuration parameters which
106           are described in the configuration files: SalomeApp.xml in the 
107           <GUI_ROOT_DIR>/share/salome/resources folder and .SalomeApprc.<version_number>
108           file, located in your home directory (where <version_number> is number 
109           of SALOME version). If the latest file does not exist, it is created during
110           the first launch of SALOME.
111
112           You can modify SALOME launching options by editing your 
113           ~/.SalomeApprc.<version_number> file:
114
115           <section name="launch">
116             <parameter name="gui"        value="yes"/>
117             <parameter name="splash"     value="yes"/>
118             <parameter name="file"       value="no"/>
119             <parameter name="key"        value="no"/>
120             <parameter name="interp"     value="no"/>
121             <parameter name="logger"     value="no"/>
122             <parameter name="xterm"      value="no"/>
123             <parameter name="portkill"   value="no"/>
124             <parameter name="killall"    value="no"/>
125             <parameter name="modules"    value="GEOM,SMESH,VISU,SUPERV,MED,COMPONENT"/>
126             <parameter name="embedded"   value="SalomeAppEngine"/>
127             <parameter name="standalone" value="study,pyContainer,cppContainer,registry,moduleCatalog"/>
128           </section>
129
130           Some parameters described in configuration file can be overrided by 
131           using of corresponding command-line keys for runSalome script:
132
133           --gui
134                 Launch GUI desktop
135           --logger
136                 Use logger server
137           --xterm
138                 Start each server in its own xterm console window
139           --portkill
140                 Kill SALOME, running on the current port
141           --killall
142                 Kill SALOME, running on all ports
143           --modules=<module>,<module>,...,<module>
144                 Use module(s), possible values are GEOM,SMESH,VISU,MED,SUPERV,etc.
145           --embedded=<server>,<server>,...<server>
146                 Start specified server/container(s) embedded in SALOME Session server 
147                 (i.e. running in the same process), possible values are registry, 
148                 study, moduleCatalog, cppContainer, registry
149           --standalone=<server>,<server>,...<server>
150                 Start standalone server/container(s), possible values are registry, 
151                 study, registry, moduleCatalog, cppContainer, pyContainer, supervContainer.
152
153           Additional launch settings are given in other sections, which refer to certain
154           modules. For example, SMESH plugins which should be used in the SALOME launch 
155           session can be mentioned in the <SMESH> section, e.g.:
156
157           <section name="SMESH">
158             <parameter name="name"       value="Mesh"/>
159             <parameter name="icon"       value="ModuleMesh.png"/>
160             <parameter name="plugins"    value="StdMeshers,NETGENPlugin"/>
161           </section>
162
163 ================================================================================
164
165   3. Installation notes
166
167      3.1. Time required for the installation
168
169           Installation of all products which are necessary to build and 
170           start SALOME is a time-consuming process and needs from the user to be
171           patient. 
172           The quickest way to install SALOME is installation from the binaries. 
173           In this mode the Installation Wizard just extracts all precompiled 
174           products from the corresponding archives (except those products
175           which can be installed only by compiling from sources). 
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 compilation 
179           procedure.
180           The installation time also depends on the computer and platform used.
181           For example, to install SALOME on Pentium IV-2GHz, Linux Mandrake 10.1,
182           time of the installation is:
183
184                - from binaries: ~10 minutes;
185                - from sources: more than 24 hours.
186
187           Note, the most time-consuming process is compiling of CASCADE libraries from
188           sources - it takes about 90% of time needed for compilation of all products.
189         
190      3.2. Log files
191
192           The Installation Wizard displays the installation progress in the 
193           corresponding windows (see readme.html). The Wizard uses a temporary 
194           directory to store and build the products. During the installation 
195           it produces some log files in this directory. If you suspect that
196           program hangs you can check the log files. These files have names
197           in capital letters like CONFIGURE.LOG, MAKE.LOG, MAKEINSTALL.LOG, etc.
198
199      3.3. Testing of installed SALOME platform
200
201           There is a python script which allows to test shortly all SALOME
202           modules. This script can help to check if SALOME has been installed
203           successfully.
204           To test SALOME platform, run SALOME desktop (see section 2), then 
205           create a new study window (menu command 'File/New') and then type 
206           in the study's embedded python console window:
207  
208                import salome_test
209
210           When running, the script loads different modules (Geometry, Mesh, Med, 
211           Post-Pro and Supervisor) and tests different functionality of these 
212           modules. You can watch script running progress in the python console
213           window.
214
215 ================================================================================
216
217   4. How to build SALOME modules from sources
218
219      This section describes the way how to build SALOME modules manually from
220      sources distribution provided with Installation Wizard.
221
222      4.1. General procedure
223
224           If you want to build SALOME modules from sources, install all prerequisite
225           products, required for the platform and SALOME modules sources.
226           Then follow the scenario described below.
227           In the scenario below it is supposed that you have installed SALOME
228           modules sources in the /home/salome directory. The name of each module
229           sources directory depends on the version of the platform, for example,
230           KERNEL_SRC_3.0.0 for KERNEL module of SALOME version 3.0.0.
231
232           The order of compilation and installation should be performed according 
233           to the dependancies between modules:
234
235           Main SALOME modules:
236
237           * KERNEL -> no dependancies
238           * GUI -> KERNEL
239           * GEOM -> KERNEL, GUI
240           * MED -> KERNEL, GUI
241           * SMESH -> KERNEL, GUI, GEOM, MED
242           * VISU -> KERNEL, GUI, MED
243           * SUPERV -> KERNEL, GUI
244
245           SMESH plugins:
246
247           * NETGENPLUGIN -> KERNEL, GUI, SMESH
248           * GHS3DPLUGIN -> KERNEL, GUI, SMESH
249
250           Sample modules:
251
252           * COMPONENT -> KERNEL, MED
253           * PYCALCULATOR -> KERNEL
254           * CALCULATOR -> KERNEL, MED
255           * HELLO -> KERNEL, GUI
256           * PYHELLO -> KERNEL
257           * LIGHT -> KERNEL, GUI
258
259           Note: SMESH plugins and sample modules are optional. You may skip 
260           compiling them if you do not plan to use NETGEN and/or GHS3D meshing
261           algorithms and do not want to build samples.
262
263           In general, each module (except KERNEL and GUI, of course) is optional for 
264           SALOME. If you do not need any module, just do not compile or install
265           it. But remember that some modules require other ones to be built first 
266           (see dependancies table above).
267
268           To build KERNEL module:
269
270           - go to installation root directory (/home/salome in this example):
271
272                cd /home/salome
273
274           - to set environment variables use bash or csh script, depending on 
275             your shell:
276
277                source ../env_products.csh
278             or
279                source ../env_products.sh
280
281           - create build directory for the KERNEL module:
282
283                mkdir KERNEL_build
284                cd KERNEL_build
285
286           - create a configuration script by typing
287
288                ../KERNEL_SRC_3.0.0/build_configure
289
290           - run configure script which will check the environment and create 
291             Makefile files:
292
293                ../KERNEL_SRC_3.0.0/configure --prefix=/home/salome/KERNEL_install
294
295           Note, that --prefix option defines the directory where you want to 
296           install KERNEL module after 'make install' procedure. configure script
297           accepts also a lot of other parameters (for example, to build the module
298           in the optimized mode use --disable-debug --enable-production keys).
299           More about certain module's configure options you can learn by using
300           --help (-h) parameter.
301
302           - build and (optionally) install KERNEL module:
303
304                make
305                make install
306
307           After you have completed this scenario, KERNEL module is built and 
308           installed into /home/salome/KERNEL_install directory.
309
310           - modify your environment scripts:
311
312           * for bash:
313
314                export KERNEL_ROOT_DIR=/home/salome/KERNEL_install
315             or 
316                export KERNEL_ROOT_DIR=/home/salome/KERNEL_build
317                (if make install step was not performed).
318
319           * for csh:
320
321                setenv KERNEL_ROOT_DIR /home/salome/KERNEL_install
322             or 
323                setenv KERNEL_ROOT_DIR /home/salome/KERNEL_build
324                (if make install step was not performed).
325
326           - then repeat this scenario for other modules you want to build taking 
327             into account the dependancies between modules (see dependancies table
328             above).
329
330           Note: if the compilation fails it may be caused by bad environment. 
331           In this case you should check that environment script you use 
332           (salome.csh or salome.sh) contains the following lines for each module MODULE:
333
334           * for bash:
335
336                export MODULE_ROOT_DIR=/home/salome/<MODULE_distribution>
337
338           * for csh:
339
340                setenv MODULE_ROOT_DIR /home/salome/<MODULE_distribution>
341
342           where <MODULE_distribution> is a MODULE_build or MODULE_install (see above).
343      
344      4.2. Automatic build procedure: build.csh script
345
346           From version 2.2.0 SALOME Installation Wizard provides the script
347           for automatic building of SALOME modules from sources packages:
348           build.csh. It is installed into the top-level target directory
349           (the same directory where env_products.[c]sh files are generated.
350
351           To use this script just install SALOME sources packages with
352           Installation Wizard, then cd to the SALOME installation directory
353           and type:
354
355                ./build.csh
356
357           and that's all.
358           
359           By default, build.csh only compiles the modules but does not install them,
360           i.e. does not perform 'make install' step.
361           To do this, use -i option or -p <prefix> where <prefix> is target
362           directory.
363
364           If you want to build only some SALOME modules, just pass them as 
365           parameters, e.g.:
366
367                ./build.csh -i KERNEL MED GEOM
368
369           The script also provides some other options which specify compiling
370           and installation parameters. You can learn about options by using
371           -h key:
372
373                ./build.csh -h
374
375           When you run build.csh at first time it is not necessary to pass 
376           -b, -c parameters. The script detects if build procedure has not yet
377           been performed and runs build_configure, configure procedures
378           in this case automatically.
379
380           Note: for avoiding of collisions it is recommended not to install 
381           SALOME binaries packages with Installation Wizard if you plan to build
382           SALOME modules from sources packages or to edit/comment all rows
383           in env_products.csh file concerning binaries packages.
384
385           Note: use -d option carefully because in this case the script removes
386           existing (previously installed) SALOME modules.
387
388 ================================================================================