Salome HOME
update INSTALL file text
[tools/simanio.git] / INSTALL
1 #  Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 #  This library is free software; you can redistribute it and/or
4 #  modify it under the terms of the GNU Lesser General Public
5 #  License as published by the Free Software Foundation; either
6 #  version 2.1 of the License.
7 #
8 #  This library is distributed in the hope that it will be useful,
9 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 #  Lesser General Public License for more details.
12 #
13 #  You should have received a copy of the GNU Lesser General Public
14 #  License along with this library; if not, write to the Free Software
15 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 ---------------
21 1. Introduction
22 ---------------
23
24 SimanIO library provides interaction of SALOME modules with SIMAN (SALOME 
25 Simulation Data Manager) server using Web Services and based on WSO2 Web Services 
26 Framework for C++ (wso2-wsf-cpp-x.x.x). 
27
28 ---------------
29 2. Installation
30 ---------------
31
32 2.1 Pre-requisites
33
34 SimanIO library is based on CMake build system (http://www.cmake.org/); this
35 means that you must have CMake installed on your system (minimum version 2.8.8)
36 in order to build and install SimanIO.
37
38 Additional pre-requisites:
39 - C++ compiler with standard libraries
40 - WSO2 Web Services Framework for C++ (wso2-wsf-cpp-2.1.0)
41
42 2.2. Building and installing library
43
44 To build the library, you will have to extract the source package in a
45 directory where you have write permissions:
46
47      $ tar xzf simanio-x.y.z.tar.gz         (x.y.z is a version signature)
48
49 You can then build the library directly in the source tree, but it is strongly
50 advised to use an independant build tree. For that, just go to the directory
51 where you extracted SimanIO and type for instance:
52
53      $ mkdir simanio_build
54      $ cd simanio_build
55
56 After that, you will just need to run cmake to generate the Makefiles and to
57 run make and make install to install the library:
58
59     $ cmake ../simanio-x.y.z                (x.y.z is a version signature)
60     $ make
61     $ make install
62
63 Normally, the pre-requisites are automatically detected during the configuration 
64 procedure basing on the current environment; this procedure is managed by CMake
65 by analyzing standard directories and environment variables.
66 However, if it fails or if you want to specify alternative installation of some
67 pre-requisite, you can do it by setting the corresponding environment variable.
68 For example, you might want to specify installation directory of wso2-wsf-cpp-2.1.0
69 with WSO2_ROOT_DIR environment variable:
70
71      export WSO2_ROOT_DIR=/usr/local/wso2-wsf-cpp-2.1.0
72
73 Alternatively, to change CMake behavior, you can either preset the environment
74 variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH (see CMake documentation
75 for more details) or use CMake graphical interface. For this, run cmake once
76 to populate the cache and then run ccmake:
77
78     $ cmake ../simanio-x.y.z                (x.y.z is a version signature)
79     $ ccmake ../simanio-x.y.z               (x.y.z is a version signature)
80
81 Note, that by default 'make install' will install all staff to the /usr directory.
82 The installation directory can be changed by specifying custom location with
83 CMAKE_INSTALL_PREFIX variable (passed to cmake or ccmake):
84
85     $ cmake -DCMAKE_INSTALL_PREFIX=/home/user/siman ../simanio-x.y.z
86
87 --------------------------------------
88 3. Generating Web Service Client Stubs
89 --------------------------------------
90
91 It is the optional action for current version.
92
93 SimanIO library sources include a set of web services client stubs generated
94 by means of WSO2 Web Services Framework for C++.
95
96 Properly installed WSO2 includes the java based tool that is used to generate
97 all required web services client stubs and other supporting files from the 
98 SIMAN wsdl file. 
99
100 Use the following parameters to generate the Axis2/C client stub code with
101 ADB (Axis Data Binding) support:
102
103     $ ./siman_stabs_code_generator.sh -uri <wsdl_location> -d adb -u
104
105 The SIMAN stabs code generator script
106 (<SIMANIO_SRC>/scripts/siman_stabs_code_generator.sh) generates the client stub
107 files .h and .cpp from the given SIMAN wsdl file, path to which is specified
108 via <wsdl_location> (<SIMANIO_SRC>/scripts/SimanSalomeService.wsdl) 
109 and puts generated files to the src sub-directory of a source tree.
110
111 -------------------------------------------------
112 4. Build SALOME KERNEL module with SIMAN support
113 -------------------------------------------------
114
115 To build SALOME KERNEL with SIMAN support, the SIMANIO_ROOT_DIR environment
116 variable should be specified to point to the directory containing preinstalled
117 SimanIO library. 
118
119 Then, use SALOME_USE_SIMAN variable to build SALOME KERNEL with SIMAN support:
120
121     $ cd KERNEL_BUILD
122     $ cmake -DSALOME_USE_SIMAN=ON [<other-cmake-options>] ../KERNEL_SRC
123     $ make
124     $ make install
125
126 Note, that other SALOME modules (GEOM, MED, SMESH, ...) that implement
127 interaction with SIMAN are built as usual. Each SALOME module that requires
128 communication with SIMAN should implement corresponindg interfaces as decribed
129 in the documentation (SIMAN_Integration_of_SALOME_Modules_vx.y).
130
131 -----------
132 5. APPENDIX
133 -----------
134
135 This paragraph provides some additional information about SIMAN and SimanIO.
136
137 5.1. Building and installing the library basing on SALOME installation
138
139 The source code of the SimanIO library is delivered as part of the offcial 
140 SALOME distribution; alternatively it can be obtained from CVS repository:
141
142     $ cvs -d :pserver:<user_name>@cvs.opencascade.com:/home/server/cvs/SIMAN 
143     $ cvs checkout -PRA SIMANIO_SRC
144
145 Building and installation of the SimanIO library is performed in accordance
146 with the procedure described above (paragraph 2).
147
148 5.2. Testing
149
150 The set of the tests using SimanIO library for accesing SIMAN server is
151 developed and delivered separatelly from this package.
152 These tests can be properly executed only when SIMAN web and database 
153 servers are properly configured and run.
154
155 5.3. Additional scripts
156
157 The scripts sub-directory contains several scripts that can be used to
158 set environment and and running specific configuration of SALOME session
159 communicating with SIMAN.
160 These scripts are automatically copied to the SimanIO installation directory
161 (share/simanio/misc sub-directory) by the build procedure; they can be 
162 adjusted if necessary:
163
164     run_salome_siman.sh          - the script used by SIMAN to start SALOME
165                                    session in SIMAN mode
166     castem_env_products.sh       - CASTEM module run time environment
167     eficas_aster_env_products.sh - EFICAS & ASTER modules run time environment 
168     syrthes_env_products.sh      - SYRTHES modules run time environment
169
170 5.4. Additional modules communicating with SIMAN
171
172 These specific SALOME modules are delivered separatelly from SALOME platform;
173 each module is built in accordance with the instructions provided by module 
174 maintainer.
175
176 If necessary, build SALOME CASTEM (CEA/DEN) module using the latest CASTEM_SRC
177 source code that includes all necessary updates of scripts (e0_donnees.py, 
178 CASTEM.py) in a usual way.
179 Set proper value of CASTEM solver binaries location in e0_donnees.py,
180 for example:
181
182     castem_exe = modele("castem_exe" , "<castem10_path>/bin/castem10")
183
184 If necessary, build and configure EFICAS, ASTER and SYRTHES SALOME modules
185 (EDF R&D) and the tools used by these modules: Eficasv1 (tool), EFICAS
186 (module used by SALOME_MECA), CODE_ASTER (tool), ASTER_MODULE and
187 CODE_SYRTHES (tool), MODULE_SYRTHES (module) in a usual way.
188
189 5.5. Test SALOME session with and without SIMAN support
190
191 For properly built SimanIO and SALOME modules you can check operating of SALOME
192 in two modes (with and without SIMAN) after setting run time environment with the
193 script env_products.sh as following:
194
195     $ . <salome_install_dir>/env_products.sh
196     $ . <prefix>/share/simanio/misc/castem_env_products.sh        (if necessary)
197     $ . <prefix>/share/simanio/misc/eficas_aster_env_products.sh  (if necessary)
198     $ . <prefix>/share/simanio/misc/syrthes_env_products.sh       (if necessary)
199     $ runSalome
200     $ runSalome --siman
201
202 Here, <prefix> is a SimanIO installation directory, e.g. /home/user/siman, and
203 <salome_install_dir> is a SALOME installation directory.
204
205 Note: mentioned env_products.sh script is a part of SALOME Installation procedure;
206 it sets up the environment required for proper SALOME operating.
207 If SALOME is built/installed in another way than with SALOME Installation 
208 procedure, you will need to use alternative way to set proper environment.
209
210 5.6. Configuration of SIMAN web server and SIMAN database server
211
212 Please find all necessary details concerning the configuration and running of
213 SALOME SIMAN client and SIMAN Web server with SIMAN database in the SIMAN
214 Administration Guide (SIMAN_AdminGuide_vX.Y).
215
216 5.7. Basic working mode of SALOME with SIMAN server
217
218 If installation and configuration of SIMAN have been performed successfully
219 the SIMAN server can be accesible on SALOME client side from your browser using URL:
220 "http://<server_name or server_IP>:8080/siman".
221 Normally, this should display the SIMAN start page.
222
223 SALOME session connected to SIMAN is automatically started from the browser;
224 this SALOME session will access SIMAN server providing all functionality defined
225 in the SIMAN Detailed Functional Specifications for the current version of SIMAN
226 (see SIMAN_Functional_Specifications_vx.y).
227