Salome HOME
spns #40779: implement git multiserver approach: github, gitpub, tuleap
[tools/sat.git] / doc / src / installation_of_sat.rst
1 ************
2 Installation
3 ************
4
5 **sat** is provided either embedded into a salome package, or as a standalone package. It can also be retrieved from the git repositories.
6
7
8 From git bases
9 --------------
10
11 **sat** git bases are hosted by the `salome platform Tuleap forge <https://codev-tuleap.cea.fr/projects/salome>`_ . Therefore you first have to get an account to this forge.
12 To get started, one has to download sat, and at last one sat project (usually SAT_SALOME project, which contains all the configuration required to build SALOME and its prerequisites). The following script get sat and SAT_SALOME project from git repositories: ::
13
14     # get sat
15     BASE_SAT=https://codev-tuleap.cea.fr/plugins/git/spns/SAT.git
16     BASE_PROJET=https://codev-tuleap.cea.fr/plugins/git/spns/SAT_SALOME.git
17     TAG_SAT=master
18     TAG_PROJET=master
19     git clone ${BASE_SAT}
20     cd SAT
21     git checkout ${TAG_SAT}
22     cd ..
23     
24     # get sat project SAT_SALOME 
25     git clone ${BASE_PROJET}
26     cd  SAT_SALOME
27     git checkout ${TAG_PROJET}
28     cd ..
29
30     # initialisation de sat 
31
32     # add SAT_SALOME project to sat, other configurations projects can be added
33     SAT/sat init --add_project  $(pwd)/SAT_SALOME/salome.pyconf
34
35     # record tag and url (not mandatory)
36     SAT/sat init --VCS $BASE_SAT
37     SAT/sat init --tag $(git describe --tags)
38
39
40 Embedded sat version
41 --------------------
42
43 **sat** is provided in salome packages with sources, in order to be able to recompile the sources (**sat** is not provided in salome packages with only binaries).
44
45 Embedded **sat** is always associated to an embedded **sat**  project, which contains all the products and application configuration necessary to the package.
46
47 .. code-block:: bash
48
49     tar -xf SALOME-9.3.0-CO7-SRC.tgz
50     cd SALOME-9.3.0-CO7-SRC
51     ls PROJECT/   # list the embedded sat project
52     # edit the SALOME-9.3.0 configuration pyconf file
53     sat/sat config SALOME-9.3.0 -e   
54
55
56 The user has usually two main use cases with an embedded sat, which are explained in the README file of the archive:
57
58 1. recompile the complete application
59
60 .. code-block:: bash
61
62     ./sat prepare SALOME-9.3.0
63     ./sat compile SALOME-9.3.0
64     ./sat launcher SALOME-9.3.0
65
66 Please note that the sources are installed in *SOURCES* directory, and the compilation is installed in *INSTALL*  directory (therefore they do not overwrite the initial binaries, which are stored in *BINARIES-XXX* directory). The launcher *salome* is overwritten (it will use the new compiled binaries) but the old binaries can still be used in connection with *binsalome* launcher).
67
68 2. recompile only a part of the application
69
70 It is possible to recompile only a part of the products (those we need to modify and recompile). To enter this (partial recompilation mode), one has initially to copy the binaries from *BINARIES-XXX* to *INSTALL*, and do the path substitutions by using the **install_bin.sh** script: 
71
72 .. code-block:: bash
73
74     # pre-installation of all binaries in INSTALL dir, with substitutions
75     ./install_bin.sh  
76     ./sat prepare SALOME-9.3.0 -p GEOM  # get GEOM sources, modify them
77     ./sat compile SALOME-9.3.0 -p GEOM --clean_all  # only recompile GEOM
78
79
80
81 Standalone sat packages
82 ---------------------------
83
84 **sat** is also delivered as a standalone package, usually associated to a sat project. The following example is an archive containing sat 5.3.0 and the salome sat project. It can be used to build from scratch any salome application.
85
86 .. code-block:: bash
87
88     # untar a standalone sat package, with a salome project
89     tar xf sat_5.3.0_satproject_salome.tgz
90     cd sat_5.3.0_satproject_salome
91     ls projects  # list embedded sat projects
92     > salome
93     ./sat config -l  # list all salome applications available for build
94
95
96 Finally, the project also provides bash scripts that get a tagged version of sat from the git repository, and a tagged version of salome projects. This mode is dedicated to the developers, and requires an access to the Tuleap git repositories.