Salome HOME
Increment version: 9.10.0
[samples/light.git] / README
1 *************************
2 About SALOME LIGHT sample
3 *************************
4
5 SALOME LIGHT module presents example of a simple SALOME module, implemented
6 with C++, without CORBA-engine; such type of module is called "light" in SALOME.
7 This sample demonstrates a way to create a modules which have only GUI library
8 but nevertheless can be integrated into SALOME platform.
9
10 This sample module is a simple text file reader. Each empty line read from the
11 file is presented in the data tree as the beginning of new paragraph; paragraph
12 can be empty. Non-empty line presents a "leaf" in the data tree.
13
14 Thus, the data tree hierarchy has tree levels:
15
16 Root
17   |__ Paragraph
18   |        |____ Text line
19   |        |____ Text line
20   |        |____ ...
21   |__ Paragraph
22   |__ Paragraph
23   |        |____ Text line
24   |        |____ ...
25   |__ ...
26
27 For more information about SALOME platform please visit the SALOME web site:
28
29   <http://www.salome-platform.org/>
30
31 =======
32 License
33 =======
34
35 SALOME platform is distributed under the GNU Lesser General Public License.
36 See COPYING file for more details.
37
38 Also, additional information can be found at SALOME platform web site:
39
40   <http://www.salome-platform.org/downloads/license/>
41
42 ============
43 Installation
44 ============
45
46 --------------
47 Pre-requisites
48 --------------
49
50 SALOME platform relies on a set of third-party softwares; some of them are needed
51 at build time only, while other ones are needed in runtime also.
52
53 For more information about the pre-requisites please visit SALOME platform web
54 site:
55
56 * Check Release Notes and Software Requirements of the latest SALOME release at
57
58   <http://www.salome-platform.org/downloads/current-version/>
59
60 * Pre-requisites page at SALOME web site:
61
62   <http://www.salome-platform.org/downloads/license/>
63
64 Note: SALOME LIGHT needs SALOME KERNEL and SALOME GUI as pre-requisites.
65
66 ------------------
67 Basic Installation
68 ------------------
69
70 The build procedure of the SALOME platform is implemented with CMake.
71 In order to build the module you have to do the following actions:
72
73 1. Set up environment for pre-requisites (see "Pre-requisites" section above).
74
75 2. Create a build directory:
76
77    % mkdir LIGHT_BUILD
78
79 3. Configure the build procedure:
80
81    % cd LIGHT_BUILD
82    % cmake -DCMAKE_BUILD_TYPE=<mode> -DCMAKE_INSTALL_PREFIX=<installation_directory> <path_to_src_dir>
83
84    where
85    - <mode> is either Release or Debug (default: Release);
86    - <installation_directory> is a destination folder to install SALOME LIGHT
87      module (default: /usr);
88    - <path_to_src_dir> is a path to the SALOME LIGHT sources directory.
89
90    Note: by default (if CMAKE_INSTALL_PREFIX option is not given), SALOME LIGHT
91    module will be configured for installation to the /usr directory that requires
92    root permissions to complete the installation.
93
94 4. Build and install:
95
96    % make
97    % make install
98
99    This will install SALOME LIGHT module to the <installation_directory>
100    specified to cmake command on the previous step.
101
102 -------------------
103 Custom installation
104 -------------------
105
106 SALOME LIGHT module supports a set of advanced configuration options;
107 for more details learn CMakeLists.txt file in the root source directory.
108
109 You can also use other options of cmake command to customize your installation.
110 Learn more about available options by typing
111
112    % cmake --help
113
114 =============
115 Functionality
116 =============
117
118 The module functionality includes the following user actions:
119
120 * "File" menu:
121
122   - "Load text file"       : reads and loads the contents of text file to the
123                              data model; the previous contents of data model
124                              is erased.
125
126   - "Save text file"       : dumps the contents of the data model to the text
127                              file.
128
129 * "LIGHT" menu:
130
131   - "Edit selected line"   : allows user to edit the selected text line.
132
133   - "Insert new text line" : inserts the new text line entered by the user before
134                              the selected one; if there is no selection, new line
135                              is added to the end of the data tree.
136
137   - "Remove line"          : removes the selected line.
138
139   - "Clear all"            : clears all the contents of the data model.
140
141
142 Most of these actions change the contents of the internal data model, so the data
143 tree is rebuilt correspondingly.
144 Some of these commands are also avaiable via the context popup menu in the Object
145 Browser.
146
147 Saving/restoring of the data is performed by using of default SALOMEDS-based
148 persistence mechanism provided by SALOME GUI via embedded SalomeApp engine.
149
150 Note: after opening of the sudy file the LIGHT module data is not
151 immediately displayed in the Object Browser. To see it, you should activate the
152 module. Such behaviour takes place because the LIGHT module does not publish any
153 data directly in the SALOMEDS study - this is typical behavior of any "lighy"
154 SALOME module, imposed by limitation of SALOME platform.
155
156 =====
157 Usage
158 =====
159
160 Run SALOME with LIGHT module:
161
162 - In full, CORBA-based session:
163
164 runSalome --modules=LIGHT
165
166 - In "light" session:
167
168 runLightSalome.sh --modules=LIGHT
169
170 ===============
171 Troubleshooting
172 ===============
173
174 Please, send a mail to webmaster.salome@opencascade.com.