comparison doc/installation.rst @ 2946:ce16847a7b6d

doc: documentation first draft: this patch starts the local documentation, existing documentation will be imported from wiki/other places to this folder and updated. This doc is using reStructuredText format and will be generated with Sphinx.
author Goffi <goffi@goffi.org>
date Fri, 22 Feb 2019 18:58:59 +0100
parents
children 03fe31effa7f
comparison
equal deleted inserted replaced
2945:6c264c224614 2946:ce16847a7b6d
1 ============
2 Installation
3 ============
4
5 This are the instructions to install SàT using Python.
6 Note that if you are using GNU/Linux, Salut à Toi may already be present on your distribution.
7
8 Salut à Toi is made of one backend, and several frontends. To use it, the first thing to do is to install the backend.
9
10 We recommand to use development version for now, until the release of
11 0.7 version which will be "general public" version.
12
13 Also note that SàT is still using Python 2 (this will change for 0.8 version which will be Python 3 only), so all instructions below have to be made using python 2.
14
15 Development version
16 -------------------
17
18 *Note for Arch users: a pkgbuild is available for your distribution on
19 AUR, check sat-xmpp-hg (as well as other sat-\* packages).*
20
21 You can install the latest development version using pip. You need to
22 have the following dependencies installed first:
23
24 - Python 2 with development headers
25 - Mercurial
26 - VirtualEnv
27 - libcairo 2 with development headers
28 - libjpeg with development headers
29 - libgirepository 1.0 with development headers
30 - libdbus-1 with development headers
31 - libdbus-glib-1 with development headers
32 - libxml2 with development headers
33 - libxlt2 with development headers
34 - D-Bus x11 tools (this doesn't needs X11, it is just needed for dbus-launch)
35 - cmake
36
37 On Debian and derivatives, you can get all this with following command::
38
39 $ sudo apt-get install python-dev mercurial virtualenv libxml2-dev libxslt-dev libcairo2-dev libjpeg-dev libgirepository1.0-dev libdbus-1-dev libdbus-glib-1-dev dbus-x11 cmake
40
41 Now go in a location where you can install Salut à Toi, for
42 instance your home directory::
43
44 $ cd
45
46 And enter the following commands (note that *virtualenv2* may be named
47 *virtualenv* on some distributions, just be sure it's Python **2** version)::
48
49 $ virtualenv2 env
50 $ source env/bin/activate
51 $ pip install hg+https://repos.goffi.org/sat
52
53 Don't worry if you see the following message, SàT should work anyway::
54
55 Failed building wheel for pygobject
56
57 After installing SàT, you need to install the media::
58
59 $ cd
60 $ hg clone https://repos.goffi.org/sat_media
61
62 then, create the file ~/.config/sat/sat.conf containing:
63
64 .. sourcecode:: cfg
65
66 [DEFAULT]
67 media_dir = ~/sat_media
68
69 Of course, replace ``~/sat_media`` with the actual path you have used.
70
71 .. following part is currently hidden until v0.7 is released
72
73 Last release
74 ------------
75
76 This release is really old and code has changed a lot since it.
77 Furthermore, stable version is currently not maintained. We recommend to use current dev version until version 0.7 is released.
78
79 If you are willing to install last release anyway, here are the instructions.
80
81 You can automatically install SàT and its dependencies using
82 easy_install or pip. You will however need to install Python's headers
83 (needed to build some packages),
84 `PyGObject <http://ftp.gnome.org/pub/GNOME/sources/pygobject/>`__ and
85 developments version of libxml2 and libxslt (to compile lxml python
86 library). On some ARM systems like Raspberry Pi or OLinuXino, it is also
87 required to install libjpeg-dev and libffi-dev beforehand.
88
89 The environment variable SAT_INSTALL customises the installation, it
90 contains flags separated by spaces:
91
92 - "nopreinstall" skip all preinstallation checks
93 - "autodeb" automatically install missing packages on Debian based
94 distributions
95
96 PyGobject is automatically installed on Debian based distributions if
97 "autodeb" option is set. Indeed, on Debian based distribution, you can
98 type:
99
100 | ``sudo apt-get install python-pip python-virtualenv python-dev libxml2-dev libxslt-dev libjpeg-dev libffi-dev zlib1g-dev``
101 | ``virtualenv --system-site-packages sat``
102 | ``source sat/bin/activate``
103 | ``pip2 install -U setuptools``
104 | ``SAT_INSTALL="autodeb" pip2 install sat``
105
106 After installing SàT, you need to install the media:
107
108 | ``mkdir -p /path/to/sat_media``
109 | ``cd /path/to/sat_media``
110 | ``wget ``\ ```ftp://ftp.goffi.org/sat_media/sat_media.tar.bz2`` <ftp://ftp.goffi.org/sat_media/sat_media.tar.bz2>`__
111 | ``tar -jxvf sat_media.tar.bz2``
112
113 then, create a ~/.sat.conf file which contains:
114
115 | ``[DEFAULT]``
116 | ``media_dir=/path/to/sat_media``
117
118 Of course, replace /path/to/sat_media with the actual path you want to
119 use.
120
121 Usage
122 =====
123
124 To launch the sat backend, enter::
125
126 $ sat
127
128 …or, if you want to launch it in foreground::
129
130 $ sat fg
131
132 You can stop it with::
133
134 $ sat stop
135
136 To know if backend is launched or not::
137
138 $ sat status
139
140 **NOTE**: since SàT v0.5.0, the backend is automatically launched when a frontend needs it.
141
142 You can check that SàT is installed correctly by trying jp (the backend need to be launched first, check below)::
143
144 $ jp --version
145 jp 0.7.0D « La Commune » (rev 2dd53ffa4781 (default 2019-02-22 18:58 +0100) +110) Copyright (C) 2009-2019 Jérôme Poisson, Adrien Cossa
146 This program comes with ABSOLUTELY NO WARRANTY;
147 This is free software, and you are welcome to redistribute it under certain conditions.
148
149 If you have a similar output, SàT is working.
150
151 Frontends
152 =========
153
154 So far, the following frontends exist and are actively maintained:
155
156 Cagou
157 desktop/mobile (Android) frontend
158
159 Libervia
160 the web frontend
161
162 Primitivus
163 Text User Interface
164
165 jp
166 Command Line Interface
167
168 To launch Primitivus, just type::
169
170 $ primitivus
171
172 then create a profile (XMPP account must already exist).
173
174 To use jp, follow its help::
175
176 $ jp --help
177
178
179 There are some other frontends:
180
181 Bellaciao
182 based on Qt, a rich desktop frontend (currently on hold)
183
184 Wix
185 former desktop frontend based on WxWidgets (deprecated with version 0.6.0)
186
187 Sententia
188 Emacs frontend developed by a third party (development is currently stalled)