Salome HOME
5a2f0bd19d250a41443ca073c6dfd0701b9fe41c
[modules/gui.git] / doc / salome / gui / input / installing_salome.doc
1 /*!
2
3 \page installing_salome_page SALOME Installation Wizard Help
4
5 <hr>
6 <ul>
7 <li>\ref installing_products "Installing products with the Installation Wizard"
8 <ul>
9 <li>\ref gui_mode_install "GUI mode"
10 <li>\ref batch_mode_install "Batch mode"
11 <li>\ref environment_files "Environment files"
12 </ul>
13 <li>\ref pick_up_env "Pick up the environment"
14 <li>\ref modifying_xml "Modifying XML configuration file"
15 <li>\ref installation_scripts "Implementing installation scripts for the new products"
16 <li>\ref finish_buttons "Customizing Readme page buttons"
17 </ul>
18 <hr>
19 \anchor installing_products 
20 <h1>Installing products with the <em>Installation Wizard</em></h1>
21
22 The Installation Wizard can be launched in two modes: \b GUI and \b
23 batch.
24 <br>The root directory of the Installation Wizard contains Python
25 script \b runInstall. To run the Installation Wizard just type \b runInstall.
26 in the terminal window:
27 <br><br>[ python ] \b runInstall [options]
28
29 Without options this script will launch the SALOME Installation
30 Wizard in the default mode (GUI). \n The default installation settings
31 can be overridden by using command line options. Each option has a
32 short and a long notation:
33
34 <b>-g / --gui</b>
35 \par
36 Runs the Installation Wizard in the GUI mode (this is the default
37 mode).
38
39 <b>-b / --batch</b>
40 \par
41 Runs the Installation Wizard in the terminal mode.
42
43 <b>-f FILE / --file=FILE</b>
44 \par
45 The XML configuration file to be used by the Installation Wizard.  If
46 this option is not used then the installation script tries to define
47 the \e Linux version and use the corresponding XML file if it exists. For
48 examle, for <em>Linux Mandrake 10.1</em>  the <b>config_Mandrake_10.1.xml</b>  file
49 will be used by default. If no appropriate file is found, the file
50 <b>config.xml</b> will be used. This file refers to the basic target platform 
51 which is <em>Linux Mandrake 10.1</em> for SALOME 3.0 and newer. If <b>config.xml</b>
52 file is not found either, a warning message box is shown (in GUI mode)
53 or printed to the console (in batch mode) and the Installation Wizard 
54 quits.
55
56 <b>-d DIR / --target=DIR</b>
57 \par
58 The target directory SALOME platform is to be installed to. 
59 If used, this option overrides the default target directory, given in
60 the configuration XML file (usually <b>${HOME}/salome_\<version\></b>, 
61 see \ref modifying_xml "here" for more details).
62
63 <b>-t DIR / --tmp=DIR</b>
64 \par
65 The directory, which should be used for temporary files. If given,
66 this option overrides the default temporary directory, given in the
67 configuration xml file (usually \b /tmp, see \ref modifying_xml "here"
68 for more information).
69
70 <b>-a / --all-from-sources</b>
71 \par
72 Forces all the products to be installed from sources (including all
73 SALOME modules). If this option is used, all default installation
74 modes for all products are ignored.
75 \n This option is helpful when the user wants to install SALOME on the
76 platform which is not officially supported. In this case, the user can
77 try to run the SALOME Installation Wizard with the \b -a option in order
78 to build all the products from sources.
79 \n<b>Note, that this is a time-consuming operation which can take
80 more than 24 hours depending on the computer.</b>
81
82 <b>-s / --single-directory</b>
83 \par
84 Install all SALOME binaries packages to one directory. <br><b>
85 This option is ignored when --all-from-sources (-a) option is used.</b>
86
87 <b>-h / --help</b>
88 \par
89 Prints help information on the Installation Wizard's use.
90
91 <b>-v / --version</b>
92 \par
93 Prints version information (\b Note: this is the Installation Wizard's
94 version number, not the number of SALOME platform version).
95
96 The installation procedure supports different \em Linux platforms and
97 installs various installation 3d-party prerequisite products which are
98 required by SALOME platform. As it was mentioned above, the basic
99 target platform for SALOME 3.0 and newer is <em>Linux Mandrake 10.1</em>.
100 Use of configuration XML files gives a flexible way to modify the list
101 of products to be installed by the Installation Wizard without
102 changing the program source code. Just create your own XML
103 configuration file and implement installation scripts for the
104 prerequisite products you need and then use this XML file with the
105 Installation Wizard. This can be done, for example, for some Linux
106 platform which is not supported directly by the Installation
107 Wizard. See \ref modifying_xml "Modifying XML configuration file" and
108 \ref installation_scripts "Implementing installation scripts for the new products"
109 sections for more information.
110
111 <br>
112 <hr>
113 \anchor gui_mode_install
114 <h2>GUI mode</h2>
115
116 The <b>Installation Wizard</b> GUI has been developed using
117 Trolltech's <b>Qt 3.0.5</b> toolkit. After launching the Installation
118 Wizard in the GUI mode the wizard window is shown to the user. This
119 wizard guides the user through several subsequent pages. To navigate
120 between the pages use \em "Next" and \em "Back" buttons in the lower
121 part of the wizard window. The \em "Cancel" button closes the wizard
122 window and quits the installation procedure after the user's
123 confirmation. The \em "Help" button opens an additional window to show
124 help information.
125
126 The first \em "Introduction" page is shown in \ref figure_1 "Figure 1". 
127 Skip this page by clicking \em "Next":
128
129 \anchor figure_1
130 \image html intropage.png 
131 \n <center><b>Figure 1:</b> "Introduction" page</center>
132
133 In the second page you are proposed to select the type of the SALOME installation.<br><br>
134 At this step three possible types of installation are available:
135
136 1. <b><em>"Install binaries"</em></b> type:
137 \par
138     - all binaries and sources of the chosen modules are installed;
139     - all binaries of the chosen prerequisites are installed.
140
141 2. <b><em>"Install sources"</em></b> type:
142 \par
143     - all sources of the chosen modules and prerequisites are installed without compilation.
144
145 3. <b><em>"Install sources and make compilation"</em></b> type:
146 \par
147     - all sources of the chosen modules and prerequisites are installed;<br>
148     - all sources are compiled.
149
150 In case you select "Install sources and make compilation" installation type, then you can also check "Remove sources and temporary files after compilation" option.
151
152 \anchor figure_2
153 \image html installtypepage.png
154 \n <center><b>Figure 1:</b> "Type Of Installation" page</center>
155
156 After the installation type has been selected you click "Next" button and the Installation Wizard tries to determine the Linux platform to load the corresponding configuration file. If the user system is not defined or the current SALOME package does not support this one, the warning will appear (<em>"Install binaries"</em> and <em>"Install sources"</em> installation types only):
157
158 \anchor figure_3
159 \image html platformpage.png
160 \n <center><b>Figure 3:</b> "Installation platform" page</center>
161
162 If <em>"Install sources and make compilation"</em> installation type has been selected, the warning message will be slightly different: <em>"Your Linux platform is not supported by this SALOME package and compilation is not tested on this one".</em><br>
163 There is a list of all platforms supported by SALOME, but only those supported by the current package are available for selection. in this page you need to to select the reference platform, if you wish to proceed with the present installation procedure.
164
165 \b Note: this page is not displayed if the installation platform has been defined automatically.
166
167 In the next page you are proposed to enter the target directory
168 where the SALOME platform should be installed to. You can also click
169 <em>"Browse..."</em> and choose the destination folder using the standard
170 browse directory dialog box.
171 \n If the necessary directory does not exist you
172 are prompted to confirm directory creation. If you type a wrong
173 directory path, or if you do not have write permissions 
174 for the directory you use, the corresponding message box is shown.
175
176 \b Note: you are strongly recommended to avoid using directory names containing spaces.</b> Otherwise you can experience some troubles with the installation.
177 \n
178 \anchor figure_4
179 \image html directorypage.png
180 \n <center><b>Figure 4:</b> "Installation directory" page</center>
181
182 You can select the products to be installed in the "Choice of the products to be installed" page.
183 \n In the default mode it gives you the possibility to view and select SALOME modules only. There is a hidden list of 3d-party prerequisite products. To show it, just click <em>"Show prerequisites..."</em> button.
184
185 \anchor figure_5
186 \image html productpage1.png
187 \n <center><b>Figure 5:</b> Choice of the SALOME modules</center>
188
189 In the full mode you also have the possibility to select prerequisites.
190 \n The checkbox before each product indicates if this one will be installed or not (checked or unchecked). The second column shows the disk space occupied by the corresponding module. This value depends on the selected type of installation.
191 \n To hide the prerequisites list - click <em>"Hide prerequisites"</em> button.
192
193 \anchor figure_6
194 \image html productpage2.png
195 \n <center><b>Figure 6:</b> Choice of the prerequisites</center>
196
197 Some products may require some other prerequisite products to be installed. So the installation procedure has a special feature to automatically mark these products in the list view. For example, to install PyQt it is necessary to have gcc, Python, Qt and Sip installed, and these products will be also turned on when you check on PyQt. GEOM module requires KERNEL, GUI modules and such prerequisites as: OpenCascade, Python, Swig, Qt, etc.
198 \n
199 \n The dependencies between SALOME modules are managed in the following way:
200 \par
201 - If one module is unchecked, all modules which depend on this one are also unchecked automatically;\n
202 - If one module is checked, all modules required for this one are also checked automatically.
203
204 Dependency between modules and prerequisites is realized in the following way:
205 \par
206 -  The choices made by the user in the list of modules have a direct impact on the list of prerequisites;
207 - Whenever a module is checked, all the necessary prerequisites are checked automatically with no possibility for the user to uncheck them (see \ref figure_7 "Fig. 7" below);
208 - Whenever a module is unchecked, according to the remaining checked modules, the unnecessary prerequisites are unchecked automatically (see \ref figure_7 "Fig. 7" below).
209
210 It is possible to check again the prerequisites, which have been automatically unchecked. In other words, it is possible to add more prerequisites than necessary.
211
212 \anchor figure_7
213 \image html productpage3.png
214 \n <center><b>Figure 7:</b> Dependencies between modules and prerequisites</center>
215
216 The <em>"Installation with GUI"</em> checkbox allows managing the installation of the graphical interface. Only modules for that 'woguimode' attribute is set to "true" value in the XML file (see \ref modifying_xml "here" for more information about customizing this installation mode) support without GUI mode and will be checked and installed with their necessary prerequisites in case of installation without GUI. And other modules are unchecked with no possibility to check them in this mode (see \ref figure_8 "Figure below").
217 \n By default 'Installation with GUI' checkbox is switched on.
218
219 \anchor figure_8
220 \image html productpage4.png
221 \n <center><b>Figure 8:</b> Installation without GUI mode</center>
222
223 The box at the right side of the page displays the information about
224 currently selected product: name, version and short description,
225 required disk space, disk space required for temporary files and the list of
226 prerequisites (this information is provided in the XML file).
227
228 The <em>"Disk space required:"</em> field displays how much disk space
229 on the hard drive is required for installation of selected products.
230 \n\b Note: Please, take into account that the displayed amount of
231 required disk space is approximate and may differ when you actually install
232 products on your hard drive.
233
234 The installation procedure uses a special directory to store temporary
235 files. The <em>"Space for temporary files:"</em> field shows the information
236 about required disk space on the hard drive for extracting and
237 compiling the selected products. You can change the temporary directory (this information is provided in the XML file) to the folder you want.
238 \n\b Note: Actually, temporary files are not stored directly in the
239 directory entered by the user. The Installation Wizard creates in this directory an additional folder named like INSTALLWORK<b>XXXXX</b> where XXXXX is a unique number. This allows launching several Installation Wizards simultaneously. This temporary directory is removed automatically when the installation finishes.
240
241 The installation procedure also checks the available disk space. If there is not enough disk space on your hard drive you will see the corresponding error message box.
242
243 Also in the current version of Installation Wizard is possible to install all binaries of the selected SALOME modules into a \b single directory. It is "SALOME" directory. For this purpose there is a checkbox "Install modules to a single directory" checkbox exists (see \ref figure_8 "Fig. 8").
244 \n This feature helps to get shorter PYTHONPATH and LD_LIBRARY_PATH environment variables.
245 \n\b Note: the installation into a single directory is available with the binaries installation type only.
246
247 To proceed further click <em>"Next"</em>. At this moment the program will make some tests to check the installation settings: if there is enough disk space on the hard drive, check for the dependencies for each product you have selected to be installed. If any test fails you will see the corresponding warning message box. Otherwise the wizard will proceed to the next page:
248
249 \anchor figure_9
250 \image html choicepage.png
251 \n <center><b>Figure 9:</b> "Check your choice" page</center>
252
253 This page summarizes the installation options you've selected in the previous pages. You can review again your choices and change them if necessary returning to the previous pages.
254 \n When you are sure that everything is OK, click <em>"Next"</em> to
255 follow to the \ref figure_10 "progress page".
256
257 \anchor figure_10
258 \image html progresspage1.png
259 \n <center><b>Figure 10:</b> "Installation progress" page</center>
260
261 To start the installation of the selected products click <em>"Start"</em> button. It launches the shell installation script and you will be able to see the output of the script in the topmost frame of the dialog box. If any errors occur during the installation progress, the corresponding messages will be printed to the log window in the bold red font.
262 \n It is possible to break the installation at any time by pressing <em>"Stop"</em> button. Then you can get back to the previous pages if you wish to change the installation settings or restart the installation by pressing <em>"Start"</em> button again.
263
264 \b Note: in the current implementation it is not possible to resume the stopped installation process; the installation will restart from the very beginning.
265
266 \anchor figure_11
267 \image html progresspage2.png
268 \n <center><b>Figure 11:</b> "Installation progress" page: installation in progress</center>
269
270 The <em>"Installation Status"</em> frame window shows you the progress of
271 installation. \c "Waiting" status means that installation of this product
272 has not been started yet. The product currently being installed is
273 marked as \c "Processing" and is displayed in the status bar under "Installation Status" view. All installed products have \c "Completed"
274 status.
275
276 You can abort installation and close the installation procedure using
277 \em "Cancel" button.
278
279 \b Note: This button sends the signal "SIGTERM" to the shell
280 script. The script tries to clear all temporary files. The process of
281 removing temporary files can take some time, so the installation
282 wizard will wait 3 seconds before closing.
283
284 At the end of the installation <b>"Installation completed"</b> message will appear in the status bar. You can return to the previous pages to start a new installation or click \em"Next" button to go to the readme page:
285
286 \anchor figure_12
287 \image html readmepage.png
288 \n <center><b>Figure 12:</b> "Finish installation" page</center>
289
290 In this page you can read important information about the Instalation
291 Wizard itself and some tips: how to run and test SALOME or how to
292 build SALOME from the sources. This is the contents of the README file
293 which you can find in the root directory of the Installation Wizard.
294
295 You can also launch SALOME Desktop from this page or read the Release
296 Notes file by clicking on the corresponding buttons in the lower part
297 of the page (see \ref modifying_xml "here" and \ref finish_buttons
298 "here" for more information about customizing these buttons).
299
300 <br>
301 <hr>
302 \anchor batch_mode_install
303 <h2>Batch mode</h2>
304
305 To launch the Installation Wizard in the batch mode use -\b b (--\b batch)
306 parameter.
307 \n In this mode the GUI wizard is not shown but all the installation
308 status is displayed directly in the console. In the batch mode the
309 user does not have a possibility to change installation settings which
310 are given in the configuration file, except target and temporary
311 directories which can be overridden by the corresponding command line
312 options.
313 \n The only exception is --\b all-from-sources (-\b a) option which enables
314 special installation mode in which all the products (including SALOME
315 modules) are installed from sources, ignoring the default mode defined
316 in the XML configuration file (see \ref installing_products "here" for details) and <b>--single-directory (-s)</b> option which defines that all SALOME modules have to be installed into the one directory (SALOME_<version>, by default, where <version> is SALOME version).
317
318 \anchor figure_13
319 \image html batchmode.png
320 \n <center><b>Figure 13:</b> Batch mode</center>
321
322 <br>
323 <hr>
324 \anchor environment_files
325 <h2>Environment files</h2>
326
327 During the process of installation the script creates some environment
328 files to simplify the procedure of launching SALOME. These shell
329 scripts set all necessary environment variables for all products you
330 have installed. To learn how installation scripts collects the
331 environment, see \ref pick_up_env "here". These files are: \b
332 salome.csh + \b salome.sh in the <b><em>KERNEL module sources</em></b>
333 and <b><em>KERNEL module binaries</em></b> root directories and
334 \b env_products.csh + \b env_products.sh and \b env_build.csh + 
335 \b env_build.sh in the target installation directory.
336
337 \b Note: there is some difference between these files: \b env_build.*
338 files are optimized to be used for building SALOME modules from
339 sources (see \b README file provided with the installation procedure
340 on the CD). The \b env_products.* (and \b salome.*) files are
341 optimized for SALOME launching. The behavior is defined by the
342 environment variable \b ENV_FOR_LAUNCH which is set to \b 0 in
343 env_build.* files and to \b 1 in env_products.* (salome.*) files.
344
345 <br>
346 <hr>
347 \anchor pick_up_env
348 <h2>Pick up the <em>environment</em></h2>
349
350 Please, read carefully the following information. This section
351 describes how the installation procedure generates the environment
352 scripts for the SALOME platform being installed.
353
354 After installing each product shell the script creates a special
355 environment file for the product in its installation folder. The name
356 of the file is generated from the name of product by the following
357 scheme: \b env_<product_name>.sh (for example \b env_Vtk.sh for the
358 Vtk). This file includes all necessary environment settings. At the
359 final step of the installation the script picks up all the settings
360 files and generates two common environment files from them: \b salome.sh
361 and \b salome.csh for \b bash and \b csh shells correspondingly.
362 Such approach helps to save time when reinstalling products and you may not bother about setting all environment variables manually to build/launch
363 SALOME. What you simply need is to source one of these environment
364 files.
365
366 This also concerns those products which are not being installed. For
367 example, you install some SALOME binaries to the directory where you
368 have previously installed other products.  The Installation procedure
369 tries to collect environment files from the target directory if it
370 finds necessary products installed there. If some product is not found
371 in the target directory the corresponding section of
372 \b salome.sh/salome.csh files will be skipped.
373 \n For native products (like \b gcc, \b tcl, etc...) the installation
374 procedure tries to find them first using \b PATH / \b LD_LIBRARY_PATH
375 variables and then in the system default directories (\b /usr/bin,
376 \b /usr/lib etc., depending on the product).
377 <br><br>
378 In any case you may edit \b salome.* files after the installation
379 procedure finishes, if you want.
380
381 \n\b Note: As it was mentioned \ref environment_files "above" there are
382 other environment files which are generated by the installation
383 procedure: \b env_products.csh + \b env_products.sh and \b env_build.csh +
384 \b env_build.sh. These files can be found in the target installation root
385 directory.
386
387 <br>
388 <hr>
389 \anchor modifying_xml
390 <h2>Modifying <em>XML</em> configuration <em>file</em></h2>
391
392 You can create your own XML configuration file. The Installation
393 Wizard can then take it as a command line argument to provide a list
394 of products you want to install with it. The list of products and some
395 other settings for the Installation Wizard are provided in the XML
396 file.
397 \n This section describes the structure of the configuration file, optional sections/tags are in brackets.
398
399 \code
400 <document>
401       <config [ version=<application_version>      ]
402               [ caption=<application_caption>      ]
403               [ copyright=<application_copyright>  ]
404               [ license=<application_license_info> ]
405                 platforms=<target_platform>
406               [ targetdir=<target_directory>       ]
407               [ tempdir=<temp_directory>           ]
408       />
409     [ <buttons>
410       [ <button   label=<button_label>     
411                 [ tooltip=<button_tooltip> ]
412                   script=<button_script>   
413                 [ disable=<disable_flag>   ]
414         />
415       ]
416       [ <button ...
417         />
418       ]
419         ...
420       </buttons>
421     ]
422     [ <products>
423       [ <product  name=<product_name>
424                   type=<product_type>
425                 [ description=<product_description> ]
426           <installation  os=<installation_platform>
427                          version=<product_version>
428                        [ disable=<disable_flag>            ]
429                        [ woguimode=<without_gui_mode_flag> ]
430                          installdiskspace=<install_disk_space>
431                        [ pickupenv=<pickup_env_flag>       ] 
432                          script=<installation_script_name>
433           />
434           ...
435         />
436       ]
437       [ <product ...
438         />
439       ]
440         ...
441       </products>
442     ]
443     [ <dependencies>
444       [ <product  name=<product_name> >
445         [ <dep> <prerequisite_name> </dep> ]
446           ...
447         </product>
448       ]
449         ...
450       </dependencies>
451     ]
452 </document> 
453 \endcode
454
455 <b>\<config\> section</b>
456 \n\n This is an optional section; it provides general information about the Installation Wizard itself.<br><br>
457 Attributes:
458 <ul>
459 <li><b>version</b>
460 \n\n The application version number to be shown in the caption.<br><br>
461 </li>
462 <li><b>caption</b>
463 \n\n The application main window caption - if this string contains '\%1' text the title will contain the version number in this place (see
464 above).<br><br>
465 </li>
466 <li><b>copyright</b>
467 \n\n The application copyright information (shown in the first page).<br><br>
468 </li>
469 <li><b>license</b>
470 \n\n The application license information (shown in the first page).<br><br>
471 </li>
472 <li><b>platforms</b>
473 \n\n This parameter defines the directory (relative from ./Products/BINARIES) where the Installation Wizard will search
474 precompiled binaries packages. If this tag is not provided, binaries
475 packages are looked for in the ./Products/BINARIES directory.<br><br>
476 </li>
477 <li><b>targetdir</b>
478 \n\n The target directory - the path to the directory where products
479 should be installed.<br><br>
480 </li>
481 <li><b>tempdir</b>
482 \n\n The temporary directory - the path to the directory for the
483 temporary files.<br><br>
484 </li>
485 </ul>
486
487 <b>\<button\> section</b>
488 \n\n This is an optional section. It allows customization of the last
489 "Finish installation" page of the Installation Wizard by adding one or
490 more buttons in the lower part of the wizard's window. The script
491 which is attached to each such button, can perform some specific
492 action, for example, launch the application or show the Release Notes
493 file by using an external program. See \ref finish_buttons "here" for
494 more details about writing scripts.<br><br>
495 Attributes:
496 <ul>
497 <li><b>label</b>
498 \n\n This is the button text.<br><br>
499 </li>
500 <li><b>tooltip</b>
501 \n\n The button tooltip (optional).<br><br>
502 </li>
503 <li><b>script</b>
504 \n\n The script attached to the button.<br><br>
505 </li>
506 <li><b>disable</b>
507 \n\n If this optional flag has 'true' value, the corresponding button
508 will not appear in the "<em>Finish installation</em>" page - the section of XML
509 file is silently ignored.<br><br>
510 </li>
511 </ul>
512
513 <b>\<product\> section</b>
514 \n\n This section describes product to be installed with the
515 Installation Wizard. The XML file should include a \<product\> section
516 for each product to be installed. The products appear in the tree view
517 and are installed in the order they are described in the configuration
518 file. It is recommended (but not obligatory) to define native products
519 at the top of the list before all other products.
520 <br><br>
521 Attributes:
522 <ul>
523 <li><b>name</b>
524 \n\n Product name.<br><br>
525 </li>
526 <li><b>type</b>
527 \n\n The type of the product: 'component' - SALOME module or 'prerequisite' - prerequisite product.<br><br>
528 </li>
529 <li><b>description</b>
530 \n\n Product description (optional).<br><br>
531 </li>
532 </ul>
533
534 <b>\<installation\> section</b>
535
536 It is a part of the <product> section, that provides installation information by platforms. The <product> section may contains a several <installation> ones for the different platforms. 
537 <br><br>
538 Attributes:
539 <ul>
540 <li><b>os</b>
541 \n\n A possible installation platform.<br><br>
542 </li>
543 <li><b>version</b>
544 \n\n The version of the product.<br><br>
545 </li>
546 <li><b>disable</b>
547 \n\n If this optional flag has 'true' value, the corresponding product will not appear in the list of products and will not be installed.<br><br>
548 </li>
549 <li><b>woguimode</b>
550 \n\n This optional flag defines that it's possible to install this module without GUI.<br><br>
551 </li>
552 <li><b>installdiskspace</b>
553 \n\n List of three total amount spaces (integer, in Kbytes, derived by comma), which product occupies on the hard drive after the installation in case 'binary', 'sources' and 'sources and compile' installation type.<br><br>
554 </li>
555 <li><b>pickenv</b>
556 \n\n This flag shows that the pickup environment procedure should be performed for this product. If this flag equal to 'true',  salome.sh and salome.csh files will  be created in the product's installation directory. Usually this option is set to true for SALOME KERNEL module. This is optional key, default value is 'false'.<br><br>
557 </li>
558 <li><b>script</b>
559 \n\n The installation script name. This script is in charge of the installation of the product. It is called automatically by the Installation Wizard when necessary from the main program. See the see 
560 \ref installation_scripts "next section" for more information.<br><br>
561 </li>
562 </ul>
563
564 \n\b Note: If you add new products to be installed with Installation
565 Wizard, you should also provide installation script for this
566 product. See the next section for more details.
567
568 <br>
569 <hr>
570 \anchor installation_scripts
571 <h2>Implementing <em>installation scripts</em> for the new products</h2>
572
573 When you want some product to be installed with the Installation
574 Wizard, you should add its description \ref modifying_xml "to the configuration file"
575 and create the installation script, following the rules described in this section.
576
577 There are some obligatory functions which should be implemented in
578 this installation script. These functions are automatically called by
579 the master installation script or/and its GUI shell when it is
580 necessary. \n File \b common.sh contains some service functions which can
581 be used in your installation script, like \b make_env(), \b make_dir(),
582 \b try_existing(), \b sort_path(), \b find_in_path(), etc.
583
584 <ul>
585 <li><b>check_version()</b>
586 \n\n This function allows to check the version of the product already
587 installed on the computer. It should try to find the product (native
588 or preinstalled in the target directory) and check its version. This
589 helps to avoid unnecessary reinstallation. This is an internal
590 function and is not called from the master installation
591 script.<br><br>
592 </li>
593 <li><b>install_binary()</b>
594 \n\n This function is called when <em>'Install binaries'</em> installation mode is selected by the user. The function is responsible for the extracting of the product from the binaries package. It should create environment for the product in the temporary directory (see also the description of \b print_env() function). It is not necessary to implement this function if you do not provide binaries mode installation for the current product.<br><br>
595 </li>
596 <li><b>install_source()</b>
597 This function is called to install SALOME modules sources, if <em>'Install binaries'</em> installation mode is selected by the user, and to install prerequisite products sources, in <em>'Install sources'</em> case (\ref Figure_2 "Fig. 2" above). The function is responsible for the building of the product from the sources package. It should create the environment file for the product in the temporary directory (see also the description of print_env() function). It is not necessary to implement this function if you do not provide a sources mode installation for the current product. <br><br>
598 </li>
599 <li><b>install_source_and_build()</b>
600 This function is called when <em>'Install sources and make a compilation'</em> installation mode is selected. This function should be used to unpack SALOME or prerequisite sources package and then call build/install procedure for it.
601 For more details please refer to the \ref installing_products "this"
602 and \ref gui_mode_install "this" sections for more details.<br><br>
603 </li>
604 <li><b>try_preinstalled()</b>
605 \n\n This function is called when the 'not install' installation mode
606 is selected by the user. In this case the script should inspect the
607 target directory to try to find an already preinstalled product, pick
608 up and check the environment from there. See \ref pick_up_env "here" for more
609 details.<br><br>
610 </li>
611 <li><b>print_env_bin() & print_env_src()</b>
612 \n\n These functions are in charge of the creation of the environment scripts. They should create in the temporary directory two files with \b env_<product_name>.sh and \b env_<product_name>_src.sh names and then copy them into the binary and sources product installation directories correspondingly. The file should contain all necessary environment variable settings for the product. It will be collected during the 'pick-up-environment' procedure.<br><br>
613 </li>
614 <li><b>pickup_env()</b>
615 \n\n This procedure corresponds to the \b pickupenv tag of the
616 configuration xml file (see previous section). It should call the
617 \b make_env procedure to perform the pick-up environment procedure for
618 the product.<br><br>
619 </li>
620 </ul>
621
622 The calling signature of the product installation script is the following: 
623 <b>\<product_script_name\> \<function_name\> \<temp_folder\>
624 \<products_directory\> \<target_directory\> \<dependancies\>
625 \<product_name\></b>
626 \n\n where \n\n
627 <b>\<product_script_name\></b> - installation script name (described in the
628 configuration xml file);\n
629 <b>\<function_name\></b> - the name of function, corresponding to the selected
630 installation mode: \em try_native, \em install_source, \em install_binary or
631 \em try_preinstalled;\n
632 <b>\<temp_folder\></b> - temporary files directory;\n
633 <b>\<products_directory\></b> - directory where the sources/binaries package
634 can be found. You should provide the sources package in the
635 <em>\<Install_Wizard_root_directory\>/Products/SOURCES</em> directory and
636 binaries package in the
637 <em>\<InstallWizard_root_directory\>/Products/BINARIES/\<os_version\></em>, where
638 \<os_version\> is the target platform description, which appears in the
639 corresponding section of the \ref modifying_xml "configuration xml file";
640 <em>\<target_directory\></em> - root target directory where the product should be installed to; 
641 <em>\<dependancies\></em> - single-quoted list of prerequisite products, separated by space; 
642 <em>\<product_name\></em> - product name itself.
643
644 \b Example:
645 \n <em>med-2.2.3.sh install_binary /tmp/work
646 ./Products/BINARIES/Mandrake10.1 /usr/salome 'gcc Hdf' med</em>
647
648 Copy the created script into the
649 <em>\<Install_Wizard_root_directory\>/config_files</em> sub-directory where all
650 installation scripts are stored. Installation Wizard will
651 automatically search and call your script during the installation
652 procedure.
653
654 <br>
655 <hr>
656 \anchor finish_buttons
657 <h2>Customizing <em>Readme page</em> buttons</h2>
658
659 The Installation Wizard allows customizing the look-n-feel of the last
660 <em>"Finish installation"</em> page. If you want to add one or more buttons to
661 this page in order to perform some specific actions at the end of the
662 installation (for example, to show the Release Notes file by using
663 Open Office) you can put an additional section to the XML
664 configuration file. This is the \b \<button\> section (see 
665 \ref modifying_xml "here" for more details).
666
667 To implement the action which will be performed when the user clicks
668 the button, you need to create a script and put it to the
669 <em>\<Install_Wizard_root_directory\>/config_files</em> directory.
670 \n There are some obligatory functions which should be implemented in
671 this script. These functions are automatically called by the
672 Installation Wizard GUI.
673
674 <ul>
675 <li><b>check_enabled()</b>
676 \n\n This procedure is called by the Installation Wizard when the
677 <em>"Finish installation"</em> page is displayed and the status of the buttons
678 should be modified according to the installation options. This
679 procedure should return \b 0 if the corresponding action can be performed
680 and, thus, the button should become enabled. Otherwise, it should
681 return \b 1 - in this case the corresponding button will be
682 disabled.<br><br>
683 </li>
684 <li><b>execute()</b>
685 \n\n This procedure is invoked when the user clicks the button. This
686 procedure should return \b 0 if the corresponding action is done
687 successfully and \b 1 if any error occurs.<br><br>
688 </li>
689 </ul>
690
691 The calling signature of the script is the following:
692 \n <b>\<product_script_name\> \<function_name\> \<target_directory\>
693 \<temp_folder\></b>
694 \n\n where \n\n
695 \b \<product_script_name\> - the script name itself (retrieved from the XML configuration xml file); 
696 \n \b \<function_name\> - the name of function; 
697 \n \b \<target_directory\> - root target directory where the product is installed to; 
698 \n \b \<temp_folder\> - temporary files directory;
699
700 \n\b Note: The standard Installation Wizard buttons "Launch SALOME" and
701 "Release Notes" are implemented with this feature. Refer to scripts
702 \b start_salome.sh and \b release_notes.sh for sample implementation.
703
704 \n\b Note: Any button (even standard) can be ignored by the Installation
705 Wizard if the attribute \b \<disable\> in the XML configuration file is set
706 to the "true" value.
707
708 */