website view fr/doc/scratchbook/gtk-libs.html @ rev 1344

Resize balinor logo to 120px
author Christophe Lincoln <pankso@slitaz.org>
date Fri Jan 22 23:02:15 2021 +0100 (2021-01-22)
parents 0ae6cfc85e03
children
line source
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
4 <head>
5 <title>SliTaz Scratchbook - GTK+ libs</title>
6 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
7 <meta name="description" content="SliTaz GNU/Linux GTK+ installation compilation pango atk cairo glib" />
8 <meta name="expires" content="never" />
9 <meta name="modified" content="2007-12-24 17:00:00" />
10 <meta name="publisher" content="www.slitaz.org" />
11 <meta name="author" content="Christophe Lincoln"/>
12 <link rel="shortcut icon" href="favicon.ico" />
13 <link rel="stylesheet" type="text/css" href="book.css" />
14 </head>
15 <body bgcolor="#ffffff">
17 <!-- Header and quick navigation -->
18 <div id="header">
19 <div align="right" id="quicknav">
20 <a name="top"></a>
21 <a href="x-window-system.html">X window system</a> |
22 <a href="index.html">Table des matières</a> |
23 <a href="gtk-apps.html">GTK+ apps</a>
24 </div>
25 <h1><font color="#3E1220">SliTaz Scratchbook</font></h1>
26 </div>
28 <!-- Content. -->
29 <div id="content">
30 <div class="content-right"></div>
33 <h2><font color="#DF8F06">Bibliothèques GTK+</font></h2>
34 <p>
35 Compilation et installation des bibliothèques GTK+ et compagnie.
36 </p>
37 <ul>
38 <li><a href="gtk-libs.html#about">A propos de ce chapitre.</a> - Description et variable
39 d'environnement ($fs)</li>
40 <li><a href="gtk-libs.html#cairo">cairo-1.2.6</a> - 2D graphics library.</li>
41 <li><a href="gtk-libs.html#glib">glib-2.12.4</a> - C routines.</li>
42 <li><a href="gtk-libs.html#pango">pango-1.14.8</a> - Library for layout and rendering of text.</li>
43 <li><a href="gtk-libs.html#atk">atk-1.12.4</a> - Accessibility toolkit.</li>
44 <li><a href="gtk-libs.html#gtk">gtk-2.8.20</a> - The GIMP Toolkit.</li>
45 <li><a href="gtk-libs.html#initramfs-iso">Génération de l'initramfs, et d'une image ISO.</a></li>
46 </ul>
47 <a name="about"></a>
48 <h3><font color="#6c0023">A propos</font></h3>
49 <p>
50 Ce chapitre décrit l'installation et la configuration sur SliTaz, des
51 bibliothèques GTK permettant d'insataller des miliers de logiciels.
52 A noter que vous pouvez simplement compiler, et créer un paquet
53 SliTaz que vous installé ensuite à la demande avec tazpkg.
54 </p>
55 <p>
56 La compilation de GTK demandes pas mal de temp, et il faut satisfaire
57 beaucoup de dépendances. Vous trouverez (en anglais) le guide de
58 compilation de GTK: <a href="http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html"
59 >gtk-building.html sur developer.gnome.org</a>. Ce document
60 précise qu'il faut compiler dans l'ordre: GLib, Pango, ATK, puis GTK+.
61 Avant de commancer il faur vérifier que les dépendances soient bien installées
62 sur votre système hôte. Les paquets GLib, Pango, ATK, et GTK+ vont ensemles,
63 et sont distribués par l'équipe des développeurs GTK. Nous ne les décrivons pas,
64 seulement les commandes à lancer.
65 </p>
66 <h4>Variable d'environnement ($fs)</h4>
67 <p>
68 Pour ne pas spécifier tout le chemin vers le répertoire rootfs, export
69 de la variable d'environnement:
70 </p>
71 <pre>
72 # export fs=$PWD/rootfs
73 </pre>
74 <p>
75 Pour vérifier:
76 </p>
77 <pre>
78 # echo $fs
79 </pre>
80 <a name="cairo"></a>
81 <h3><font color="#6c0023">cairo-1.2.6 - 2D graphics library</font></h3>
82 <p>
83 Nous commençons par libcairo
84 (<a href="http://www.cairographics.org/">http://www.cairographics.org/</a>)
85 utilisé pour compiler pango:
86 </p>
87 <pre>
88 # cd src
89 # wget http://cairographics.org/releases/cairo-1.2.6.tar.gz
90 # tar xzf cairo-1.2.6.tar.gz
91 # cd cairo-1.2.6
92 # ./configure --prefix=/usr --mandir=/usr/share/man \
93 --with-html-dir=/usr/share/doc
94 # make
95 # make DESTDIR=$PWD/_pkg install
96 # strip -v _pkg/usr/lib/*.so*
97 </pre>
98 <h4>Install in rootfs</h4>
99 <pre>
100 # cp -av _pkg/usr/lib/*.so* $fs/usr/lib
101 </pre>
102 <a name="glib"></a>
103 <h3><font color="#6c0023">glib-2.12.4 - C routines</font></h3>
104 <pre>
105 # cd ..
106 # wget ftp://ftp.gtk.org/pub/glib/2.12/glib-2.12.4.tar.bz2
107 # tar xjf glib-2.12.4.tar.bz2
108 # cd glib-2.12.4
109 # ./configure --prefix=/usr --sysconfdir=/etc \
110 --mandir=/usr/share/man --with-html-dir=/usr/share/doc
111 # make
112 # make DESTDIR=$PWD/_pkg install
113 # strip -v _pkg/usr/bin/*
114 # strip -v _pkg/usr/lib/*.so*
115 </pre>
116 <h4>Install in rootfs</h4>
117 <p>
118 Option, les utilitaires glib-genmarshal et gobject-query on besoin de
119 /lib/tls/librt.so.1:
120 </p>
121 <pre>
122 # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
123 # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
125 Les binaires en option:
126 # cp -a _pkg/usr/bin/* $fs/usr/bin
127 </pre>
128 <a name="pango"></a>
129 <h3><font color="#6c0023">pango-1.14.8 - Library for layout and rendering of text</font></h3>
130 <pre>
131 # cd ..
132 # wget ftp://ftp.gtk.org/pub/pango/1.14/pango-1.14.8.tar.bz2
133 # tar xjf pango-1.14.8.tar.bz2
134 # cd pango-1.14.8
135 # ./configure --prefix=/usr --sysconfdir=/etc \
136 --mandir=/usr/share/man --with-html-dir=/usr/share/doc
137 # make
138 # make DESTDIR=$PWD/_pkg install
139 # strip -v _pkg/usr/bin/*
140 # strip -v _pkg/usr/lib/*.so*
141 # strip -v _pkg/usr/lib/pango/1.5.0/modules/*
142 </pre>
143 <h4>Install in rootfs</h4>
144 <pre>
145 # cp -a _pkg/usr/bin/* $fs/usr/bin
146 # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
147 # cp -a _pkg/usr/lib/pango $fs/usr/lib
148 # rm -rf $fs/usr/lib/pango/1.5.0/modules/*.la
149 # cp -a _pkg/etc $fs
150 </pre>
151 <p>
152 Création du fichier /etc/pango/pango.modules via un chroot dans
153 le rootfs (pango-querymodules utilise librt.so.1):
154 </p>
155 <pre>
156 # chroot $fs /bin/ash
157 /# pango-querymodules &gt; /etc/pango/pango.modules
158 # exit
159 </pre>
160 <a name="atk"></a>
161 <h3><font color="#6c0023">atk-1.12.4 - Accessibility toolkit</font></h3>
162 <pre>
163 # cd ..
164 # wget http://ftp.gnome.org/pub/gnome/sources/atk/1.12/atk-1.12.4.tar.bz2
165 # tar xjf atk-1.12.4.tar.bz2
166 # cd atk-1.12.4
167 # ./configure --prefix=/usr --mandir=/usr/share/man \
168 --with-html-dir=/usr/share/doc
169 # make
170 # make DESTDIR=$PWD/_pkg install
171 # strip -v _pkg/usr/lib/*.so*
172 </pre>
173 <h4>Install in rootfs</h4>
174 <pre>
175 # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
176 # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
177 </pre>
178 <a name="gtk"></a>
179 <h3><font color="#6c0023">gtk+-2.8.20 - The GIMP Toolkit</font></h3>
180 <pre>
181 # cd ..
182 # wget ftp://ftp.gtk.org/pub/gtk/v2.8/gtk+-2.8.20.tar.bz2
183 # tar xjf gtk+-2.8.20.tar.bz2
184 # cd gtk+-2.8.20
185 # ./configure --prefix=/usr --sysconfdir=/etc \
186 --mandir=/usr/share/man --with-html-dir=/usr/share/doc
187 # make
188 # make DESTDIR=$PWD/_pkg install
189 # strip -v _pkg/usr/bin/*
190 # strip -v _pkg/usr/lib/*.so*
191 # strip -v --strip-unneeded \
192 _pkg/usr/lib/gtk-2.0/2.4.0/*/*
193 </pre>
194 <h4>Install in rootfs</h4>
195 <pre>
196 # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
197 # mkdir $fs/usr/lib/gtk-2.0
198 # cp -a _pkg/usr/lib/gtk-2.0/2.4.0 $fs/usr/lib/gtk-2.0
199 # rm -rf $fs/usr/lib/gtk-2.0/2.4.0/*/*.la
201 Locale et themes:
202 # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
203 # cp -a _pkg/usr/share/themes $fs/usr/share
205 Les applications:
206 # cp _pkg/usr/bin/gtk-query-immodules-2.0 $fs/usr/bin
207 # cp _pkg/usr/bin/gtk-update-icon-cache $fs/usr/bin
208 # cp _pkg/usr/bin/gdk-pixbuf-csource $fs/usr/bin
209 # cp _pkg/usr/bin/gdk-pixbuf-query-loaders $fs/usr/bin
210 ...
212 Pour l'application gtk-demo:
213 # cp -a _pkg/usr/bin/gtk-demo $fs/usr/bin
214 # cp -a _pkg/usr/share/gtk-2.0 $fs/usr/share
215 </pre>
216 <p>
217 Création des fichiers /etc/gtk-2.0/gtk.immodules et gdk-pixbuf.loaders
218 via un chroot dans le rootfs:
219 </p>
220 <pre>
221 # chroot $fs /bin/ash
222 /# mkdir /etc/gtk-2.0
223 /# gtk-query-immodules-2.0 &gt; /etc/gtk-2.0/gtk.immodules
224 /# gdk-pixbuf-query-loaders &gt; /etc/gtk-2.0/gdk-pixbuf.loaders
225 # exit
226 </pre>
227 <p>
228 A ce stade vous pouvez tester GTK+ avec l'application 'gtk-demo' en
229 créant une ISO, et en utilisant 'qemu'. Vous pouvez aussi compiler
230 une petite application GTK+ tel que LeafPad, et tester! La compilation et
231 l'installation des application GTK+ distribuées par défaut avec SliTaz, est
232 décrite dans le chapitre <a href="gtk-apps.html">gtk-apps</a>.
233 </p>
234 <a name="initramfs-iso"></a>
235 <h3><font color="#6c0023">Génération de l'initramfs, et d'une image ISO</font></h3>
236 <p>
237 Pour créer une nouvelle image ISO vous pouvez utiliser 'mktaziso'
238 contenu dans
239 <a href="http://doc.slitaz.org/en:cookbook:slitaztools">SliTaz tools</a> .
240 Vous pouvez aussi créer
241 un nouvelle image initramfs, et la copier dans /boot de la racine de cdrom
242 (rootcd), et pour finir créer un image ISO avec genisoimage:
243 </p>
244 <pre>
245 # cd $fs
246 # find . -print | cpio -o -H newc | gzip -9 &gt; ../rootfs.gz
247 # cd ..
248 # cp rootfs.gz rootcd/boot
249 # genisoimage -R -o slitaz-cooking.iso -b boot/isolinux/isolinux.bin \
250 -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
251 -V "SliTaz" -boot-info-table rootcd
252 </pre>
253 <h4>Suite</h4>
254 <p>
255 Après les bibliothèques, <a href="gtk-apps.html">les applications GTK+</a>.
256 </p>
259 <!-- End of content -->
260 </div>
262 <!-- Footer. -->
263 <div id="footer">
264 <div class="footer-right"></div>
265 <a href="gtk-libs.html#top">Haut de la page</a> |
266 <a href="index.html">Table des matières</a>
267 </div>
269 <div id="copy">
270 Copyright &copy; <span class="year"></span> <a href="http://www.slitaz.org/">SliTaz</a> -
271 <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
272 Documentation publiées sous
273 <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
274 et codée en <a href="http://validator.w3.org/">xHTML 1.0 valide</a>.
275 </div>
277 </body>
278 </html>