~ubuntu-branches/ubuntu/raring/grilo/raring

« back to all changes in this revision

Viewing changes to doc/grilo/environment-setup.xml

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Garcia
  • Date: 2011-07-02 13:48:46 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110702134846-u10hi90nwf6wf3v0
Tags: 0.1.16-1
* New upstream release.
* debian/{grl-inspect.1,libgrilo-0.1-0.manpages,libgrilo-0.1-0.install}:
  use manpage shipped by upstream.
* debian/libgrilo-0.1-0.shlibs: new API, bump shlibs to 0.1.16.
* debian/copyright: Author(s) => Authors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
 
3
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
 
4
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
 
5
]>
 
6
 
 
7
<section id="environment-setup">
 
8
 
 
9
  <para>
 
10
    This section provides information on how to configure a proper environment for
 
11
    building Grilo, as well building and running Grilo based programs.
 
12
  </para>
 
13
 
 
14
  <section id="building-grilo-detailed">
 
15
    <title>Building Grilo </title>
 
16
 
 
17
    <section id="building-grilo-sources-install">
 
18
      <title>Building and installing Grilo</title>
 
19
 
 
20
      <para>
 
21
        You can check the basics of how to build and install Grilo from the
 
22
        source code repositories in the
 
23
        <link linkend="quick-start">Quick start guide</link>.
 
24
      </para>
 
25
    </section>
 
26
 
 
27
    <section id="building-grilo-sources-uninstalled">
 
28
      <title>Building and not installing Grilo</title>
 
29
      
 
30
      <para>
 
31
        If you do not want to install Grilo and rather use it in uninstalled
 
32
        form, do:
 
33
      </para>
 
34
    
 
35
      <programlisting>
 
36
# Building Grilo
 
37
$ git clone git://git.gnome.org/grilo
 
38
$ cd grilo
 
39
$ ./autogen.sh
 
40
$ make
 
41
 
 
42
# Building Grilo Plugins
 
43
$ export PKG_CONFIG_PATH=$PWD:$PKG_CONFIG_PATH
 
44
$ cd ..
 
45
$ git clone git://git.gnome.org/grilo-plugins
 
46
$ cd grilo-plugins
 
47
$ ./autogen.sh --enable-uninstalled
 
48
$ make
 
49
$ source ./setup-plugins-env.sh
 
50
      </programlisting>
 
51
    
 
52
      <para>
 
53
        Please, notice the '--enable-uninstalled' switch passed to the autogen.sh
 
54
        script in grilo-plugins and the PKG_CONFIG_PATH export.
 
55
      </para>
 
56
      
 
57
      <para>
 
58
        The last 'source' command looks for the plugins built in the local repository
 
59
        and exports the GRL_PLUGIN_PATH environment variable accordingly, making them
 
60
        visible to Grilo based applications. Notice that if that if this last step
 
61
        is ommitted Grilo based applications (like grilo-test-ui) will not
 
62
        see any of the plugins available.
 
63
      </para>
 
64
    </section>
 
65
 
 
66
    <section id="compilation-options">
 
67
      <title>Compilation options</title>
 
68
      <para>
 
69
        This is a reference of the most useful compilation switches available:
 
70
      </para>
 
71
      <itemizedlist>
 
72
        <listitem>
 
73
          --enable-gtk-doc: Build documentation
 
74
          tutorials and API reference. Check doc/ directory for
 
75
          the generated documentation. Only in grilo core.
 
76
        </listitem>
 
77
        <listitem>
 
78
          --enable-debug: Build with debug information.
 
79
        </listitem>
 
80
        <listitem>
 
81
          --enable-uninstalled: Prepare for uninstalled use. Only
 
82
          in grilo-plugins.
 
83
        </listitem>
 
84
      </itemizedlist>
 
85
      
 
86
      <para>
 
87
        For more options please run './configure --help'.
 
88
      </para>
 
89
    </section>
 
90
  </section>
 
91
 
 
92
  <section id="compiling-grilo-programs-detailed">
 
93
    <title>Compiling Grilo based programs</title>
 
94
    
 
95
    <para>
 
96
      You can check how to compile Grilo based apps
 
97
      by checking the
 
98
      <link linkend="quick-start">Quick start guide</link>.
 
99
    </para>
 
100
  </section>
 
101
 
 
102
  <section id="running-grilo-programs-detailed">
 
103
    <title>Running Grilo based programs</title>
 
104
    
 
105
    <para>
 
106
      If you have installed the Grilo libraries in your system
 
107
      make sure they have been installed in a path that is
 
108
      included in the dynamic linker search path, otherwise
 
109
      export the environment variable LD_LIBRARY_PATH to
 
110
      include them, for example:
 
111
    </para>
 
112
 
 
113
  <programlisting>
 
114
$ export LD_LIBRARY_PATH=/usr/local/lib
 
115
  </programlisting>
 
116
 
 
117
 
 
118
    <para>
 
119
      For plugins to be visible to application they must be
 
120
      stored in the default plugin search path. This should be
 
121
      the case if you are not running Grilo in uninstalled form.
 
122
      If you are running Grilo uninstalled, or for some reason
 
123
      you have plugins available in directories other than
 
124
      the default plugin path, export the GRL_PLUGIN_PATH to
 
125
      point to the list of directories containing Grilo plugins,
 
126
      for example:
 
127
    </para>
 
128
    
 
129
    <programlisting>
 
130
$ export GRL_PLUGIN_PATH=/usr/local/lib/grilo-0.2
 
131
    </programlisting>
 
132
 
 
133
    <para>
 
134
      Notice that if you are running Grilo uninstalled the above will not
 
135
      be necessary if you have followed the instructions provided in this
 
136
      documentation, since sourcing the setup-plugins-env.sh script will
 
137
      export the variable automatically for you.
 
138
    </para>
 
139
  </section>
 
140
 
 
141
  <section id="debugging-with-grilo">
 
142
    <title>Debugging with Grilo</title>
 
143
 
 
144
    <para>
 
145
      If you want to debug Grilo itself, make sure you have built it with
 
146
      --enable-debug (both the framework and the plugins).
 
147
    </para>
 
148
 
 
149
    <para>
 
150
      You can also control logging by setting the environment variable GRL_DEBUG.
 
151
      Here are some examples:
 
152
    </para>
 
153
 
 
154
    <programlisting>
 
155
# Disable logging for all modules
 
156
$ export GRL_DEBUG=*:-
 
157
 
 
158
# Enable full logging for all modules
 
159
$ export GRL_DEBUG=*:*
 
160
 
 
161
# Enable logging of messages of level WARNING or higher  for all modules
 
162
$ export GRL_DEBUG=*:warning
 
163
 
 
164
# Enable logging of messages of level INFO or higher for all modules
 
165
$ export GRL_DEBUG=*:info
 
166
 
 
167
# Enable full logging for the plugin registry module
 
168
$ export GRL_DEBUG=plugin-registry:*
 
169
 
 
170
# Enable full logging for the plugin registry module
 
171
# and WARNING or higher for the Youtube plugin
 
172
$ export GRL_DEBUG=plugin-registry:*,youtube:warning
 
173
    </programlisting>
 
174
 
 
175
    <para>
 
176
      Programs can also control logging programatically. See the
 
177
      <link linkend="grilo-grl-log">GrlLog</link> API reference for details.
 
178
    </para>
 
179
 
 
180
    <para>
 
181
      Plugins can be ranked. Ranks can be used to sort plugins
 
182
      by rank and also in case of conflict when two plugins offer the same
 
183
      feature, to decide on the one to use. By default, all the plugins
 
184
      have the same rank (0). Higher ranks give plugins more relevance /
 
185
      priority.
 
186
    </para>
 
187
 
 
188
    <para>
 
189
      Ranks can be controlled with the environment variable GRL_PLUGIN_RANKS.
 
190
      Here is one example:
 
191
    </para>
 
192
 
 
193
    <programlisting>
 
194
# Set the rank of the Youtube plugin to 5 and the Bookmarks plugin to -4
 
195
$ export GRL_PLUGIN_RANKS=youtube:5,bookmarks:-4
 
196
    </programlisting>
 
197
 
 
198
  </section>
 
199
</section>