Salome HOME
bos #17716 [CEA] KERNEL: retrieve IP of Host. A workaround for Windows by nghodban.
[modules/kernel.git] / doc / salome / salome_application.dox
1 /*!
2   \page SALOME_Application Salome Application Concept
3
4
5 The following explains how to configure your own application with your list of
6 modules, how to define and run this application on one or more computers.
7 You can choose one of the following approaches:
8 -# use an \ref sec_salome_profile
9 -# use a \ref sec_virtual_appli
10
11 \section S1_sal_appl General principles
12
13 %A %SALOME application is defined by:
14 - a set of modules (GEOM, SMESH, ASTER...)
15 - a set of informatic resources (images, documentation, tests...) binding the modules together, also called profile.
16 - a launcher: a python script that creates a context (set of environment variables usable by the %SALOME modules) and runs an instance of %SALOME.
17
18 %A %SALOME user can define several %SALOME applications. These applications are
19 runnable from the same user account. These applications may share the same
20 KERNEL and modules. Thus, the application configuration is independent of
21 KERNEL and must not be put in KERNEL_ROOT_DIR.
22
23 Furthermore, prerequisites may not be the same on all the applications.
24
25 %A %SALOME session can run on a several computers.
26
27 Binary modules and prerequisites are installed on the different computers.
28 There is no need to have all the modules on each computer (the minimum is
29 KERNEL).
30
31 There is no need of standardization or centralised information on the details
32 of configuration on each computer (PATH, LD_LIBRARY_PATH, environment
33 variables) provided the application modules are version - compatible. Details
34 of configuration stay private to the computer, and are held by scripts on each
35 computer.
36
37 There is no hierarchy between the computers (for example only one master
38 computer used to launch application).
39
40 The %SALOME user has an account on all the computers. Access between
41 account@computer is via rsh or ssh and must be configured for use without
42 password (key exchange for ssh). Account may be different on each
43 computer.
44
45
46 \section sec_salome_profile Application profile
47
48 The user can generate a default profile for its application using the following command:
49 \code
50 python ${KERNEL_ROOT_DIR}/bin/salome/app-quickstart.py --prefix=<generation directory> --name=<application's name> --modules=<list,of,modules>
51 \endcode
52
53 Likely, the user would like to personalize its application's profile. Then, the profile
54 can be compiled using the standard cmake procedure:
55
56 \code
57 cmake
58 make
59 make install
60 \endcode
61
62 This profile can be used within a python launcher - like the \subpage salome_command - by setting
63 context variable <b>SalomeAppConfig</b> to the path where the profile is installed.
64
65
66 \section sec_virtual_appli Virtual application
67
68 First, the user must create a %SALOME application configuration file by modifying a
69 copy of ${KERNEL_ROOT_DIR}/bin/salome/config_appli.xml.
70 The file describes the list of %SALOME modules used in the application, with
71 their respective installation path. The configuration file also defines the
72 path of an existing script which sets the %SALOME prerequisites (tag "prerequisites"),
73 and optionally, the path of samples directory (SAMPLES_SRC) (tag "samples")
74 and the path of a catalog of resources (tag "resources").
75
76 The following command:
77
78 \code
79 python <KERNEL_ROOT_DIR>/bin/salome/appli_gen.py --prefix=<install directory> --config=<configuration file>
80 \endcode
81
82 creates a %SALOME application in the application directory given by the prefix option (local directory
83 by default) with the configuration file given by the config option (config_appli.xml by default).
84
85 Providing an existing script for %SALOME prerequisites (the same one
86 used for modules compilation, or given with the modules installation), the
87 installation works without further modification for a single computer (unless
88 some modules needs a special environment not defined in the above script).
89
90 For a distributed application (several computers), one must copy and adapt
91 CatalogResources.xml from ${KERNEL_ROOT_DIR}/bin/salome/appliskel (see below).
92
93 The application directory contains the elements required to run %SALOME, for example the \ref salome_command, and some context files in env.d directory.
94
95 */