-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathreal-life-app-setup.page
54 lines (46 loc) · 3.4 KB
/
real-life-app-setup.page
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
<page xmlns="http://projectmallard.org/1.0/"
type="guide"
id="real-life-app-setup">
<info>
<credit type="author maintainer copyright">
<name>Philip Chimento</name>
<email>[email protected]</email>
<years>2008-2012</years>
</credit>
<license href="http://creativecommons.org/licenses/by-nc-sa/3.0/">
<p>This work is licensed under a <link href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License</link>.</p>
</license>
<link type="guide" xref="index" group="#default"/>
<link type="next" xref="autoconf-project"/>
<desc>Putting together the build infrastructure for an application</desc>
</info>
<title>Setting up a real-life GTK application</title>
<p>Learning to write a GTK program using a tutorial is all well and good.
At some point, though, you will have gone through enough beginners' tutorials that you won't learn any more from them.
How do you make the step from simple tutorial program to whole application?</p>
<p>This section will show you how to <em>prepare</em> to write an application that does the simple job of displaying information about a file.
You will learn how to set up your build system using GNU Autotools, something that most tutorials don't cover, because using Autotools for a one-file sample program is overkill.
For larger programs, however, you cannot do without Autotools, or another automated build system.</p>
<note>
<title>Why Autotools?</title>
<p>There is no such thing as indifference towards Autotools.
They are loved by thousands and hated by millions, so to speak.
My suspicion is that the haters don't understand what Autotools do: they aid you in implementing the <link href="http://www.gnu.org/prep/standards/">GNU Coding Standards</link>.
They are <em>not</em> meant to aid you in implementing your own preferred build workflow.
This is probably the reason for a lot of the frustration.</p>
<p>Looking at the complaints objectively, though, one cannot deny that the Autotools have a steep learning curve.
This is partly because of a lack of tutorial-style documentation.
If you want to learn, your only recourse is to read the entire manual (no easy task), or learn by copying incantations from existing projects and lots of trial and error.</p>
<p>There are two resources, unfortunately little-known, to which one can turn for an introduction to Autotools.
One is John Calcote's excellent <em>Autotools: A Practitioner's Guide to Automake, Autoconf and Libtool</em>.
Chapters from this book have also been published online, at <link href="http://fsmsh.com/2753">Free Software Magazine</link>.
The other is Alexandre Duret-Lutz' <em href="http://www.lrde.epita.fr/~adl/autotools.html">Autotools Tutorial</em>, available online.
In its form of presentation slides, it is a little difficult to read like a book, but its diagrams and code examples are very helpful.</p>
</note>
<p>Once you have set up the application, you will learn to actually <em>write</em> it in the <link xref="real-life-app-writing">next tutorial</link>.</p>
<note>
<p>This tutorial is large and therefore it is divided into several sections.
You can go through the whole tutorial in order, or if you like, you can do just one section by copying the code from the previous section and starting from there.
Each section has a link to the code that you need to start out with.</p>
</note>
</page>