File: chapter-working-with-source.html

package info (click to toggle)
gtkmm-documentation 4.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,772 kB
  • sloc: cpp: 15,541; javascript: 1,208; makefile: 1,080; python: 401; xml: 106; perl: 67; sh: 8
file content (177 lines) | stat: -rw-r--r-- 9,551 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="highlight.min.css">
<script src="highlight.min.js"></script><script>
      hljs.configure({languages: ['cpp']});
      hljs.highlightAll();
    </script><title>Appendix F. Working with gtkmm's Source Code</title>
<link rel="stylesheet" type="text/css" href="style.css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Programming with gtkmm 4">
<link rel="up" href="index.html" title="Programming with gtkmm 4">
<link rel="prev" href="sec-windows-installation.html" title="Appendix E. gtkmm and Win32">
<link rel="next" href="sec-installing-jhbuild.html" title="Installing and Using the git version of gtkmm">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">Appendix F. Working with gtkmm's Source Code</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="sec-windows-installation.html"><img src="icons/prev.png" alt="Prev"></a> </td>
<th width="60%" align="center"> </th>
<td width="20%" align="right"> <a accesskey="n" href="sec-installing-jhbuild.html"><img src="icons/next.png" alt="Next"></a>
</td>
</tr>
</table>
<hr>
</div>
<div class="appendix">
<div class="titlepage"><div><div><h1 class="title">
<a name="chapter-working-with-source"></a>Appendix F. Working with gtkmm's Source Code</h1></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<ul class="toc">
<li><span class="section"><a href="chapter-working-with-source.html#sec-setting-up-jhbuild">Setting up jhbuild</a></span></li>
<li><span class="section"><a href="sec-installing-jhbuild.html">Installing and Using the git version of <span class="application">gtkmm</span></a></span></li>
</ul>
</div>

  <p>
    If you are interested in helping out with the development of <span class="application">gtkmm</span>, or
    fixing a bug in <span class="application">gtkmm</span>, you'll probably need to build the development
    version of <span class="application">gtkmm</span>. However, you should not install a development version over
    your stable version. Instead, you should install it alongside your existing <span class="application">gtkmm</span>
    installation, in a separate path.
  </p>
  <p>
    The easiest way to do this is using <a class="ulink" href="https://wiki.gnome.org/Projects/Jhbuild" target="_top">jhbuild</a>.
    <span class="application">jhbuild</span> is a program that makes building GNOME
    software much easier by calculating dependencies and building things in the
    correct order. This section will give a brief explanation of how to set up
    <span class="application">jhbuild</span> to build and install <span class="application">gtkmm</span> from the
    source repository (git). For up-to-date information
    on <span class="application">jhbuild</span>, please refer to the <a class="ulink" href="https://gnome.pages.gitlab.gnome.org/jhbuild/" target="_top">jhbuild manual</a>.
  </p>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="icons/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
    <p>
    Note that to build <span class="application">gtkmm</span> from git, you'll often need to build many of its
    dependencies from git as well. <span class="application">jhbuild</span> makes
    this easier than it would normally be, but it will take quite a while to
    build and install them all. You will probably encounter build problems,
    though these will usually be corrected quickly if you report them.
    </p>
  </td></tr>
</table></div>
  <p>
    <span class="application">gnome-build-meta</span> is an alternative to
    <span class="application">jhbuild</span>. It is described at the
    <a class="ulink" href="https://wiki.gnome.org/Newcomers/BuildSystemComponent" target="_top">Building system components</a>
    wiki page, but here we concentrate on <span class="application">jhbuild</span>.
  </p>
  <div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="sec-setting-up-jhbuild"></a>Setting up jhbuild</h2></div></div></div>
  

    <p>
      To set up <span class="application">jhbuild</span>, follow the basic
      installation instructions from the <a class="ulink" href="https://gnome.pages.gitlab.gnome.org/jhbuild/" target="_top">jhbuild manual</a>.
      After you have installed <span class="application">jhbuild</span>, you
      should copy the sample <span class="application">jhbuild</span> configuration
      file into your home directory by executing the following command from the
      <span class="application">jhbuild</span> directory:
      </p>
<pre class="screen">$ cp examples/sample.jhbuildrc ~/.config/jhbuildrc</pre>
<p>
    </p>
    <p>
      The <span class="application">gtkmm</span> module is defined in the
      <code class="filename">gnome-suites-core-deps-latest.modules</code> moduleset. So edit your
      <code class="filename">jhbuildrc</code> file and set your moduleset setting like so:
    </p>
    <pre class="programlisting"><code class="code">moduleset = 'gnome-suites-core-deps-latest'</code></pre>
    <p>
      After setting the correct moduleset, you need to tell
      <span class="application">jhbuild</span> which module or modules to build. To
      build <span class="application">gtkmm</span> and all of its dependencies, set <code class="varname">modules</code>
      like so:
    </p>
    <pre class="programlisting"><code class="code">modules = [ 'gtkmm' ]</code></pre>
    <p>
      You can build several modules by setting the
      <code class="varname">modules</code> variable to a meta-package, e.g.
      <code class="literal">meta-gnome-core</code>, or listing more than one module name.
      The <code class="varname">modules</code> variable specifies which modules will be
      built when you don't explicitly specify anything on the command line. You
      can always build a different moduleset later by specifying it on the
      commandline (e.g. <span class="command"><strong>jhbuild build gtkmm</strong></span>).
    </p>
    <div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Setting a prefix">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="icons/important.png"></td>
<th align="left">Setting a prefix</th>
</tr>
<tr><td align="left" valign="top">
      
      <p>
        By default, <span class="application">jhbuild</span>'s configuration is
        configured to install all software built with
        <span class="application">jhbuild</span> under the
        <code class="filename">~/jhbuild/install</code> prefix. You can choose a different
        prefix, but it is recommended that you keep this prefix different from
        other software that you've installed (don't set it to
        <code class="filename">/usr</code>!) If you've followed the jhbuild instructions
        then this prefix belongs to your user, so you don't need to run jhbuild
        as <code class="literal">root</code>.
      </p>
    </td></tr>
</table></div>
    <p>
      You should also set <code class="varname">buildroot</code> in <code class="filename">jhbuildrc</code>.
      <span class="application">jhbuild</span> builds <span class="application">gtkmm</span> and many of its dependencies
      with Meson. Meson does not allow building in the source tree.
      <span class="application">jhbuild</span>'s default action is to build in a
      <code class="filename">build</code> directory directly below the source root directory.
      Some modules have a <code class="filename">build</code> directory with files
      used when building with Autotools. Those files can be destroyed if you
      let <span class="application">jhbuild</span> build in that directory.
    </p>
    <p>
      When you downloaded <span class="application">jhbuild</span> from the git repository,
      you got a number of <code class="filename">.modules</code> files, specifying
      dependencies between modules. By default <span class="application">jhbuild</span>
      does not use the downloaded versions of these files, but reads the
      latest versions in the git repository. This is usually what you want.
      If you don't want it, use the <code class="varname">use_local_modulesets</code>
      variable in <code class="filename">jhbuildrc</code>.
    </p>
  </div>
  
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="sec-windows-installation.html"><img src="icons/prev.png" alt="Prev"></a> </td>
<td width="20%" align="center"> </td>
<td width="40%" align="right"> <a accesskey="n" href="sec-installing-jhbuild.html"><img src="icons/next.png" alt="Next"></a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Appendix E. <span class="application">gtkmm</span> and Win32 </td>
<td width="20%" align="center"><a accesskey="h" href="index.html"><img src="icons/home.png" alt="Home"></a></td>
<td width="40%" align="right" valign="top"> Installing and Using the git version of <span class="application">gtkmm</span>
</td>
</tr>
</table>
</div>
</body>
</html>