Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Part II. Building Clutter: Clutter Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Clutter Reference Manual">
<link rel="up" href="index.html" title="Clutter Reference Manual">
<link rel="prev" href="clutter-overview.html" title="Part I. Overview">
<link rel="next" href="running-clutter.html" title="Part III. Running Clutter">
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
<td><a accesskey="p" href="clutter-overview.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="running-clutter.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="part">
<div class="titlepage"><div>
<div><h1 class="title">
<a name="building-clutter"></a>Part II. Building Clutter</h1></div>
<div><div class="author">
<h3 class="author">
<span class="firstname">Emmanuele</span> <span class="surname">Bassi</span>
</h3>
<div class="affiliation"><div class="address"><p><br>
          <code class="email">&lt;<a class="email" href="mailto:ebassiopenedhand.com">ebassi<em class="parameter"><code>openedhand.com</code></em></a>&gt;</code><br>
        </p></div></div>
</div></div>
</div></div>
<div class="partintro">
<div></div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="dependencies"></a>Clutter Dependencies</h2></div></div></div>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">GLib</span></p></td>
<td><p>A general-purpose utility library, not specific to
            graphical user interfaces. GLib provides many useful data
            types, macros, type conversions, string utilities, file
            utilities, a main loop abstraction, and so on.</p></td>
</tr>
<tr>
<td><p><span class="term">GObject</span></p></td>
<td><p>The GLib Object System provides the required
            implementations of a flexible, extensible and intentionally
            easy to map (into other languages) object-oriented framework
            for C.</p></td>
</tr>
<tr>
<td><p><span class="term">Pango</span></p></td>
<td><p>Pango is a library for laying out and rendering
            text, with an emphasis on internationalization.</p></td>
</tr>
<tr>
<td><p><span class="term">Backend Windowing System Library</span></p></td>
<td><p>GLX, EGL (1.1), Cocoa (OS X) and WGL (Windows)</p></td>
</tr>
<tr>
<td><p><span class="term">Graphics Rendering </span></p></td>
<td><p>Open GL (1.3+ or 1.2 with multitexturing support) or
                  Open GL ES (1.1 or 2.0)</p></td>
</tr>
</tbody>
</table></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="building-instructions"></a>Platform-specific instructions</h2></div></div></div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="building-linux"></a>Linux</h3></div></div></div>
<p>If you are using Debian or Ubuntu, you can install pre-compiled
        binary packages the normal Debian way following the instructions at
        <a class="ulink" href="http://debian.o-hand.com/" target="_top">
        http://debian.o-hand.com/</a>.
        </p>
<p>To build Clutter clutter from sources, get the latest source
        archives from <a class="ulink" href="http://www.clutter-project.org/sources/" target="_top">
        http://www.clutter-project.org/sources/</a>. Once you have extracted
        the sources from the archive execute the following commands in the
        top-level directory:
        </p>
<div class="literallayout"><p><br>
    $ ./configure<br>
    $ make<br>
    # make install<br>
        </p></div>
<p>You can configure the build with number of additional arguments
        passed to the configure script, the full list of which can be obtained
        by running ./configure --help. The following arguments are specific to
        Clutter:

            </p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">--enable-debug=[no/minimum/yes]</span></p></td>
<td><p>Controls the Clutter debugging level. Possible values
                  are: yes (all GLib asserts, checks and runtime debug
                  messages); minimum - just GLib cast checks and runtime
                  debug messages; no (no GLib asserts or checks and no
                  runtime debug messages). The default is yes for development
                  cycles, and minimum for stable releases. You should not use
                  no, unless the only performance critical paths are the
                  GLib type system checks.</p></td>
</tr>
<tr>
<td><p><span class="term">--enable-cogl-debug=[no/minimum/yes]</span></p></td>
<td><p>Controls the COGL debugging level, similarly to
                  --enable-debug.</p></td>
</tr>
<tr>
<td><p><span class="term">--enable-maintainer-flags=[no/yes]</span></p></td>
<td><p>Use strict compiler flags; default=no.
                  </p></td>
</tr>
<tr>
<td><p><span class="term">--enable-gtk-doc</span></p></td>
<td><p>Use gtk-doc to build documentation; default=no.
                  </p></td>
</tr>
<tr>
<td><p><span class="term">--enable-manual=[no/yes]</span></p></td>
<td><p>Build application developers manual; requires jw and
                  xmlto binaries; default=no.
                  </p></td>
</tr>
<tr>
<td><p><span class="term">--with-flavour=[glx/eglx/eglnative/win32/osx/cex100]</span></p></td>
<td><p>Select the Clutter backend; default=glx.
                  </p></td>
</tr>
<tr>
<td><p><span class="term">--with-imagebackend=[gdk-pixbuf/quartz/internal]</span></p></td>
<td><p>Select the image loading backend; default is
                  set to gdk-pixbuf on Linux and Windows, and to quartz
                  on OS X. The internal image loading backend should only
                  be used when porting to a new platform or for testing
                  purposes, and its stability or functionality are not
                  guaranteed.</p></td>
</tr>
<tr>
<td><p><span class="term">--with-gles=[1.1/2.0]</span></p></td>
<td><p>Select the version of GLES to support in COGL;
                  default is 1.1.</p></td>
</tr>
<tr>
<td><p><span class="term">--with-json=[internal/check]</span></p></td>
<td><p>Select whether to use the internal copy of
                  JSON-GLib to parse the ClutterScript UI definition
                  files, or to check for the system installed library;
                  default is internal.</p></td>
</tr>
<tr>
<td><p><span class="term">--enable-xinput=[no/yes]</span></p></td>
<td><p>Whether to enable XInput 1 support; default is
                  no.</p></td>
</tr>
<tr>
<td><p><span class="term">--enable-introspection=[no/auto/yes]</span></p></td>
<td><p>Whether to generate GObject Introspection data
                  at build time; default is auto.</p></td>
</tr>
</tbody>
</table></div>
<p>

        </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="building-windows"></a>Windows</h3></div></div></div>
<p>
            The recommended way of building Clutter for Windows is using the
            <a class="ulink" href="http://www.mingw.org/" target="_top">mingw</a> tool chain. This
            will work either by cross compiling from a Linux
            installation or directly on Windows using MSYS. See
            the <a class="ulink" href="http://wiki.clutter-project.org/wiki/BuildingClutterOnWindows" target="_top">
            wiki</a> for more information.
          </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="building-osx"></a>OSX</h3></div></div></div>
<p>
            Before you start you should install XCode either from the OSX
            installation disk or by downloading it from the Apple website.
          </p>
<p>
            Note: These instructions have only been tested on OS X 10.6
            (a.k.a Snow Leopard)
          </p>
<p>
            Currently the only way to install Clutter for developing
            applications, or hacking on Clutter itself, is to build it yourself.
            The recommended route is to install the dependencies with
            the <a class="ulink" href="" target="_top">MacPorts</a>
            project, by simply invoking:
          </p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="normal">$ sudo port </span><span class="usertype">install</span><span class="normal"> libpixman</span><span class="symbol">-</span><span class="usertype">devel</span><span class="normal"> cairo</span><span class="symbol">-</span><span class="normal">devel </span><span class="usertype">pango</span><span class="normal"> gtk</span><span class="symbol">-</span><span class="normal">doc</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
            on a terminal, after installing and updating MacPorts.
            This should give you all of the required dependencies for building
            Clutter.
          </p>
<p>
            It should be noted that building gtk-doc pulls in a lot of other
            MacPorts dependencies and takes some considerable time. You can omit
            this dependency so long as you disable documentation when you are
            configuring the build with
            <code class="literal">--disable-gtk-doc --disable-docs</code>
          </p>
<p>
            The Clutter Quartz backend is built by passing the
            <code class="literal">--with-flavour=osx</code> command line argument
            to the configure script. If not passed, the GLX backend will
            be built. By default, the Quartz backend depends on CoreGraphics
            in order to load images into textures, but it can also depend
            on GDK-Pixbuf or an internal, highly experimental PNG and JPEG
            loader.
          </p>
<p>
            GTK introspection is untested on OSX (as there isn't a MacPorts
            package) so it is recommended that you disable this with the
            <code class="literal">--disable-introspection</code>.
          </p>
<p>
            If building on top of MacPorts, as recommended, the following
            configure command should suffice:
          </p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="symbol">./</span><span class="normal">configure </span><span class="symbol">--</span><span class="normal">with</span><span class="symbol">-</span><span class="normal">flavour</span><span class="symbol">=</span><span class="normal">osx </span><span class="symbol">--</span><span class="normal">disable</span><span class="symbol">-</span><span class="normal">introspection </span><span class="symbol">--</span><span class="normal">prefix</span><span class="symbol">=/</span><span class="normal">opt</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>