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>Environment Setup: Grilo Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Grilo Reference Manual">
<link rel="up" href="rn01.html" title="Tutorial">
<link rel="prev" href="ch01.html" title="Quick start guide">
<link rel="next" href="ch03.html" title="Writing applications with Grilo">
<meta name="generator" content="GTK-Doc V1.28 (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><a accesskey="u" href="rn01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ch01.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="ch03.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
<a name="id-1.3.3"></a>Environment Setup</h2></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="ch02.html#environment-setup"></a></span></dt>
<dd><dl>
<dt><span class="section"><a href="ch02.html#building-grilo-detailed">Building Grilo </a></span></dt>
<dt><span class="section"><a href="ch02.html#compiling-grilo-programs-detailed">Compiling Grilo based programs</a></span></dt>
<dt><span class="section"><a href="ch02.html#running-grilo-programs-detailed">Running Grilo based programs</a></span></dt>
<dt><span class="section"><a href="ch02.html#debugging-with-grilo">Debugging with Grilo</a></span></dt>
</dl></dd>
</dl></div>
<div class="section">
<div class="titlepage"></div>
<p>
    This section provides information on how to configure a proper environment for
    building Grilo, as well building and running Grilo based programs.
  </p>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="building-grilo-detailed"></a>Building Grilo </h3></div></div></div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="building-grilo-sources-install"></a>Building and installing Grilo</h4></div></div></div>
<p>
        You can check the basics of how to build and install Grilo from the
        source code repositories in the
        <a class="link" href="ch01.html#quick-start">Quick start guide</a>.
      </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="compilation-options"></a>Compilation options</h4></div></div></div>
<p>
        This is a reference of the most useful compilation switches available:
      </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
          --enable-gtk-doc: Build documentation
          tutorials and API reference. Check doc/ directory for
          the generated documentation. Only in grilo core.
        </li>
<li class="listitem">
          --enable-debug: Build with debug information.
        </li>
<li class="listitem">
          --enable-uninstalled: Prepare for uninstalled use. Only
          in grilo-plugins.
        </li>
</ul></div>
<p>
        For more options please run './configure --help'.
      </p>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="compiling-grilo-programs-detailed"></a>Compiling Grilo based programs</h3></div></div></div>
<p>
      You can check how to compile Grilo based apps
      by checking the
      <a class="link" href="ch01.html#quick-start">Quick start guide</a>.
    </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="running-grilo-programs-detailed"></a>Running Grilo based programs</h3></div></div></div>
<p>
      If you have installed the Grilo libraries in your system
      make sure they have been installed in a path that is
      included in the dynamic linker search path, otherwise
      export the environment variable LD_LIBRARY_PATH to
      include them, for example:
    </p>
<pre class="programlisting">
$ export LD_LIBRARY_PATH=/usr/local/lib
  </pre>
<p>
      For plugins to be visible to application they must be
      stored in the default plugin search path. This should be
      the case if you are not running Grilo in uninstalled form.
      If you are running Grilo uninstalled, or for some reason
      you have plugins available in directories other than
      the default plugin path, export the GRL_PLUGIN_PATH to
      point to the list of directories containing Grilo plugins,
      for example:
    </p>
<pre class="programlisting">
$ export GRL_PLUGIN_PATH=/usr/local/lib/grilo-0.3
    </pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="debugging-with-grilo"></a>Debugging with Grilo</h3></div></div></div>
<p>
      If you want to debug Grilo itself, make sure you have built it with
      --enable-debug (both the framework and the plugins).
    </p>
<p>
      You can also control logging by setting the environment variable GRL_DEBUG.
      Here are some examples:
    </p>
<pre class="programlisting">
# Disable logging for all modules
$ export GRL_DEBUG=*:-

# Enable full logging for all modules
$ export GRL_DEBUG=*:*

# Enable logging of messages of level WARNING or higher  for all modules
$ export GRL_DEBUG=*:warning

# Enable logging of messages of level INFO or higher for all modules
$ export GRL_DEBUG=*:info

# Enable full logging for the plugin registry module
$ export GRL_DEBUG=registry:*

# Enable full logging for the plugin registry module
# and WARNING or higher for the Youtube plugin
$ export GRL_DEBUG=registry:*,youtube:warning
    </pre>
<p>
      Programs can also control logging programatically. See the
      <a class="link" href="grilo-grl-log.html" title="grl-log">GrlLog</a> API reference for details.
    </p>
<p>
      Plugins can be ranked. Ranks can be used to sort plugins
      by rank and also in case of conflict when two plugins offer the same
      feature, to decide on the one to use. By default, all the plugins
      have the same rank (0). Higher ranks give plugins more relevance /
      priority.
    </p>
<p>
      Ranks can be controlled with the environment variable GRL_PLUGIN_RANKS.
      Here is one example:
    </p>
<pre class="programlisting">
# Set the rank of the Youtube plugin to 5 and the Bookmarks plugin to -4
$ export GRL_PLUGIN_RANKS=youtube:5,bookmarks:-4
    </pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.28</div>
</body>
</html>