Debian Codegraph @

doc/reference/building-clutter.xml

raw
1 <part id="building-clutter">
2 <partinfo>
3 <author>
4 <firstname>Emmanuele</firstname>
5 <surname>Bassi</surname>
6 <affiliation>
7 <address>
8 <email>[email protected]</email>
9 </address>
10 </affiliation>
11 </author>
12 </partinfo>
13
14 <title>Building Clutter</title>
15
16 <partintro>
17
18 <section id='dependencies'>
19 <title>Clutter Dependencies</title>
20
21 <variablelist>
22 <varlistentry>
23 <term>GLib</term>
24 <listitem>
25 <para>A general-purpose utility library, not specific to
26 graphical user interfaces. GLib provides many useful data
27 types, macros, type conversions, string utilities, file
28 utilities, a main loop abstraction, and so on.</para>
29 </listitem>
30 </varlistentry>
31 <varlistentry>
32 <term>GObject</term>
33 <listitem>
34 <para>The GLib Object System provides the required
35 implementations of a flexible, extensible and intentionally
36 easy to map (into other languages) object-oriented framework
37 for C.</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term>Pango</term>
42 <listitem>
43 <para>Pango is a library for laying out and rendering
44 text, with an emphasis on internationalization.</para>
45 </listitem>
46 </varlistentry>
47 <varlistentry>
48 <term>Backend Windowing System Library</term>
49 <listitem>
50 <para>GLX, EGL (1.1), Cocoa (OS X) and WGL (Windows)</para>
51 </listitem>
52 </varlistentry>
53 <varlistentry>
54 <term>Graphics Rendering </term>
55 <listitem>
56 <para>Open GL (1.3+ or 1.2 with multitexturing support) or
57 Open GL ES (1.1 or 2.0)</para>
58 </listitem>
59 </varlistentry>
60 </variablelist>
61
62 </section>
63
64 <section id='building-instructions'>
65 <title>Platform-specific instructions</title>
66
67 <section id='building-linux'>
68 <title>Linux</title>
69
70 <para>If you are using Debian or Ubuntu, you can install pre-compiled
71 binary packages the normal Debian way following the instructions at
72 <ulink type="http" url="http://debian.o-hand.com/">
73 http://debian.o-hand.com/</ulink>.
74 </para>
75
76 <para>To build Clutter clutter from sources, get the latest source
77 archives from <ulink type="http"
78 url="http://www.clutter-project.org/sources/">
79 http://www.clutter-project.org/sources/</ulink>. Once you have extracted
80 the sources from the archive execute the following commands in the
81 top-level directory:
82 </para>
83
84 <literallayout>
85 $ ./configure
86 $ make
87 # make install
88 </literallayout>
89
90 <para>You can configure the build with number of additional arguments
91 passed to the configure script, the full list of which can be obtained
92 by running ./configure --help. The following arguments are specific to
93 Clutter:
94
95 <variablelist>
96 <varlistentry>
97 <term>--enable-debug=[no/minimum/yes]</term>
98 <listitem>
99 <para>Controls the Clutter debugging level. Possible values
100 are: yes (all GLib asserts, checks and runtime debug
101 messages); minimum - just GLib cast checks and runtime
102 debug messages; no (no GLib asserts or checks and no
103 runtime debug messages). The default is yes for development
104 cycles, and minimum for stable releases. You should not use
105 no, unless the only performance critical paths are the
106 GLib type system checks.</para>
107 </listitem>
108 </varlistentry>
109
110 <varlistentry>
111 <term>--enable-cogl-debug=[no/minimum/yes]</term>
112 <listitem>
113 <para>Controls the COGL debugging level, similarly to
114 --enable-debug.</para>
115 </listitem>
116 </varlistentry>
117
118 <varlistentry>
119 <term>--enable-maintainer-flags=[no/yes]</term>
120 <listitem>
121 <para>Use strict compiler flags; default=no.
122 </para>
123 </listitem>
124 </varlistentry>
125
126 <varlistentry>
127 <term>--enable-gtk-doc</term>
128 <listitem>
129 <para>Use gtk-doc to build documentation; default=no.
130 </para>
131 </listitem>
132 </varlistentry>
133
134 <varlistentry>
135 <term>--enable-manual=[no/yes]</term>
136 <listitem>
137 <para>Build application developers manual; requires jw and
138 xmlto binaries; default=no.
139 </para>
140 </listitem>
141 </varlistentry>
142
143 <varlistentry>
144 <term>--with-flavour=[glx/eglx/eglnative/win32/osx/cex100]</term>
145 <listitem>
146 <para>Select the Clutter backend; default=glx.
147 </para>
148 </listitem>
149 </varlistentry>
150
151 <varlistentry>
152 <term>--with-imagebackend=[gdk-pixbuf/quartz/internal]</term>
153 <listitem>
154 <para>Select the image loading backend; default is
155 set to gdk-pixbuf on Linux and Windows, and to quartz
156 on OS X. The internal image loading backend should only
157 be used when porting to a new platform or for testing
158 purposes, and its stability or functionality are not
159 guaranteed.</para>
160 </listitem>
161 </varlistentry>
162
163 <varlistentry>
164 <term>--with-gles=[1.1/2.0]</term>
165 <listitem>
166 <para>Select the version of GLES to support in COGL;
167 default is 1.1.</para>
168 </listitem>
169 </varlistentry>
170
171 <varlistentry>
172 <term>--with-json=[internal/check]</term>
173 <listitem>
174 <para>Select whether to use the internal copy of
175 JSON-GLib to parse the ClutterScript UI definition
176 files, or to check for the system installed library;
177 default is internal.</para>
178 </listitem>
179 </varlistentry>
180
181 <varlistentry>
182 <term>--enable-xinput=[no/yes]</term>
183 <listitem>
184 <para>Whether to enable XInput 1 support; default is
185 no.</para>
186 </listitem>
187 </varlistentry>
188
189 <varlistentry>
190 <term>--enable-introspection=[no/auto/yes]</term>
191 <listitem>
192 <para>Whether to generate GObject Introspection data
193 at build time; default is auto.</para>
194 </listitem>
195 </varlistentry>
196
197 </variablelist>
198
199 </para>
200
201 </section>
202
203 <section id='building-windows'>
204 <title>Windows</title>
205 <para>
206 The recommended way of building Clutter for Windows is using the
207 <ulink type="http"
208 url="http://www.mingw.org/">mingw</ulink> tool chain. This
209 will work either by cross compiling from a Linux
210 installation or directly on Windows using MSYS. See
211 the <ulink type="http" url=
212 "http://wiki.clutter-project.org/wiki/BuildingClutterOnWindows">
213 wiki</ulink> for more information.
214 </para>
215 </section>
216
217 <section id='building-osx'>
218 <title>OSX</title>
219 <para>
220 Before you start you should install XCode either from the OSX
221 installation disk or by downloading it from the Apple website.
222 </para>
223
224 <para>
225 Note: These instructions have only been tested on OS X 10.6
226 (a.k.a Snow Leopard)
227 </para>
228
229 <para>
230 Currently the only way to install Clutter for developing
231 applications, or hacking on Clutter itself, is to build it yourself.
232 The recommended route is to install the dependencies with
233 the <ulink href="http://www.macports.org/">MacPorts</ulink>
234 project, by simply invoking:
235 </para>
236
237 <informalexample><programlisting>
238 $ sudo port install libpixman-devel cairo-devel pango gtk-doc
239 </programlisting></informalexample>
240
241 <para>
242 on a terminal, after installing and updating MacPorts.
243 This should give you all of the required dependencies for building
244 Clutter.
245 </para>
246
247 <para>
248 It should be noted that building gtk-doc pulls in a lot of other
249 MacPorts dependencies and takes some considerable time. You can omit
250 this dependency so long as you disable documentation when you are
251 configuring the build with
252 <literal>--disable-gtk-doc --disable-docs</literal>
253 </para>
254
255 <para>
256 The Clutter Quartz backend is built by passing the
257 <literal>--with-flavour=osx</literal> command line argument
258 to the configure script. If not passed, the GLX backend will
259 be built. By default, the Quartz backend depends on CoreGraphics
260 in order to load images into textures, but it can also depend
261 on GDK-Pixbuf or an internal, highly experimental PNG and JPEG
262 loader.
263 </para>
264
265 <para>
266 GTK introspection is untested on OSX (as there isn't a MacPorts
267 package) so it is recommended that you disable this with the
268 <literal>--disable-introspection</literal>.
269 </para>
270
271 <para>
272 If building on top of MacPorts, as recommended, the following
273 configure command should suffice:
274 </para>
275
276 <informalexample><programlisting>
277 ./configure --with-flavour=osx --disable-introspection --prefix=/opt
278 </programlisting></informalexample>
279 </section>
280
281 </section>
282
283 </partintro>
284 </part>