Salome HOME
Copyrights update 2015.
[tools/simanio.git] / INSTALL
1 # Copyright (C) 2013-2015  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, or (at your option) any later version.
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 This paragraph describes a procedure of the web services client stubs generating
92 Note: it is an optional action for the current version of SimanIO.
93
94 SimanIO library sources include a set of web services client stubs generated
95 by means of WSO2 Web Services Framework for C++.
96
97 Properly installed WSO2 includes the java based tool that is used to generate
98 all required web services client stubs and other supporting files from the 
99 SIMAN wsdl file. 
100
101 Use the following parameters to generate the Axis2/C client stub code with
102 ADB (Axis Data Binding) support:
103
104     $ siman_stabs_code_generator.sh -uri <wsdl_location> -d adb -u
105
106 The SIMAN stabs code generator script creates the client stub files .h and
107 .cpp from the given SIMAN wsdl file, path to which is specified
108 via the <wsdl_location> parameter; resulting files should be put to the 
109 src sub-directory of a source tree.
110
111 The siman_stabs_code_generator.sh script and wsdl template file
112 SimanSalomeService.wsdl are located in the scripts sub-directory of a source
113 tree.
114
115 -------------------------------------------------
116 4. Build SALOME KERNEL module with SIMAN support
117 -------------------------------------------------
118
119 To build SALOME KERNEL with SIMAN support, the SIMANIO_ROOT_DIR environment
120 variable should be specified to point to the directory containing preinstalled
121 SimanIO library. 
122
123 Then, use SALOME_USE_SIMAN variable to build SALOME KERNEL with SIMAN support:
124
125     $ cd KERNEL_BUILD
126     $ cmake -DSALOME_USE_SIMAN=ON [<other-cmake-options>] ../KERNEL_SRC
127     $ make
128     $ make install
129
130 Note, that other SALOME modules (GEOM, MED, SMESH, ...) that implement
131 interaction with SIMAN are built as usual. Each SALOME module that requires
132 communication with SIMAN should implement corresponindg interfaces as decribed
133 in the documentation (SIMAN_Integration_of_SALOME_Modules_vx.y).
134
135 -----------
136 5. APPENDIX
137 -----------
138
139 This paragraph provides some additional information about SIMAN and SimanIO.
140
141 5.1. Building and installing the library basing on SALOME installation
142
143 The source code of the SimanIO library is delivered as part of the offcial 
144 SALOME distribution; alternatively it can be obtained from CVS repository:
145
146     $ cvs -d :pserver:<user_name>@cvs.opencascade.com:/home/server/cvs/SIMAN 
147     $ cvs checkout -PRA SIMANIO_SRC
148
149 Building and installation of the SimanIO library is performed in accordance
150 with the procedure described above (paragraph 2).
151
152 5.2. Testing
153
154 The set of the tests using SimanIO library for accesing SIMAN server is
155 developed and delivered separatelly from this package.
156 These tests can be properly executed only when SIMAN web and database 
157 servers are properly configured and run.
158
159 5.3. Additional scripts
160
161 The scripts sub-directory contains several scripts that can be used to
162 set environment and and running specific configuration of SALOME session
163 communicating with SIMAN.
164 These scripts are automatically copied to the SimanIO installation directory
165 (share/simanio/misc sub-directory) by the build procedure; they can be 
166 adjusted if necessary:
167
168     run_salome_siman.sh          - the script used by SIMAN to start SALOME
169                                    session in SIMAN mode
170     castem_env_products.sh       - CASTEM module run time environment
171     eficas_aster_env_products.sh - EFICAS & ASTER modules run time environment 
172     syrthes_env_products.sh      - SYRTHES modules run time environment
173
174 5.4. Additional modules communicating with SIMAN
175
176 These specific SALOME modules are delivered separatelly from SALOME platform;
177 each module is built in accordance with the instructions provided by module 
178 maintainer.
179
180 If necessary, build SALOME CASTEM (CEA/DEN) module using the latest CASTEM_SRC
181 source code that includes all necessary updates of scripts (e0_donnees.py, 
182 CASTEM.py) in a usual way.
183 Set proper value of CASTEM solver binaries location in e0_donnees.py,
184 for example:
185
186     castem_exe = modele("castem_exe" , "<castem10_path>/bin/castem10")
187
188 If necessary, build and configure EFICAS, ASTER and SYRTHES SALOME modules
189 (EDF R&D) and the tools used by these modules: Eficasv1 (tool), EFICAS
190 (module used by SALOME_MECA), CODE_ASTER (tool), ASTER_MODULE and
191 CODE_SYRTHES (tool), MODULE_SYRTHES (module) in a usual way.
192
193 5.5. Test SALOME session with and without SIMAN support
194
195 For properly built SimanIO and SALOME modules you can check operating of SALOME
196 in two modes (with and without SIMAN) after setting run time environment with the
197 script env_products.sh as following:
198
199     $ . <salome_install_dir>/env_products.sh
200     $ . <prefix>/share/simanio/misc/castem_env_products.sh        (if necessary)
201     $ . <prefix>/share/simanio/misc/eficas_aster_env_products.sh  (if necessary)
202     $ . <prefix>/share/simanio/misc/syrthes_env_products.sh       (if necessary)
203     $ runSalome
204     $ runSalome --siman
205
206 Here, <prefix> is a SimanIO installation directory, e.g. /home/user/siman, and
207 <salome_install_dir> is a SALOME installation directory.
208
209 Note: mentioned env_products.sh script is a part of SALOME Installation procedure;
210 it sets up the environment required for proper SALOME operating.
211 If SALOME is built/installed in another way than with SALOME Installation 
212 procedure, you will need to use alternative way to set proper environment.
213
214 5.6. Configuration of SIMAN web server and SIMAN database server
215
216 Please find all necessary details concerning the configuration and running of
217 SALOME SIMAN client and SIMAN Web server with SIMAN database in the SIMAN
218 Administration Guide (SIMAN_AdminGuide_vX.Y).
219
220 5.7. Basic working mode of SALOME with SIMAN server
221
222 If installation and configuration of SIMAN have been performed successfully
223 the SIMAN server can be accesible on SALOME client side from your browser using URL:
224 "http://<server_name or server_IP>:8080/siman".
225 Normally, this should display the SIMAN start page.
226
227 SALOME session connected to SIMAN is automatically started from the browser;
228 this SALOME session will access SIMAN server providing all functionality defined
229 in the SIMAN Detailed Functional Specifications for the current version of SIMAN
230 (see SIMAN_Functional_Specifications_vx.y).