Commit 91f2d107 authored by Matthias Clasen's avatar Matthias Clasen

Getting started: Add docs about desktop file and icon

parent 90299148
......@@ -419,7 +419,8 @@ HTML_IMAGES = \
$(srcdir)/images/getting-started-app4.png \
$(srcdir)/images/getting-started-app6.png \
$(srcdir)/images/getting-started-app7.png \
$(srcdir)/images/getting-started-app8.png \
# Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS=--extra-dir=../gdk/html \
......@@ -263,6 +263,36 @@
<title>Building applications</title>
<para>An application consists of a number of files:
<term>The binary</term>
<listitem>This gets installed in <filename>/usr/bin</filename>.</listitem>
<term>A desktop file</term>
<listitem>The desktop file provides important information about the application to the desktop shell, such as its name, icon, D-Bus name, commandline to launch it, etc. It is installed in <filename>/usr/share/applications</filename>.</listitem>
<term>An icon</term>
<listitem>The icon gets installed in <filename>/usr/share/icons/hicolor/48x48/apps</filename>, where it will be found regardless of the current theme.</listitem>
<term>A settings schema</term>
<listitem>If the application uses GSettings, it will install its schema
in <filename>/usr/share/glib-2.0/schemas</filename>, so that tools
like dconf-editor can find it.</listitem>
<term>Other resources</term>
<listitem>Other files, such as GtkBuilder ui files, are best loaded from
resources stored in the application binary itself. This eliminates the
need for most of the files that would traditionally be installed in
an application-specific location in <filename>/usr/share</filename>.</listitem>
<para>GTK+ includes application support that is built on top of
#GApplication. In this tutorial we'll build a simple application by
starting from scratch, adding more and more pieces over time. Along
......@@ -304,6 +334,24 @@
<programlisting><xi:include href="../../../../examples/application1/exampleappwin.c" parse="text"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
<para>As part of the initial setup of our application, we also
create an icon and a desktop file.</para>
<imagedata fileref="exampleapp.png" format="PNG"/>
<programlisting><xi:include href="../../../../examples/application1/exampleapp.desktop" parse="text"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
<para>Note that <replaceable>@<!-- -->bindir@</replaceable> needs to be replaced
with the actual path to the binary before this desktop file can be used.</para>
<para>Here is what we've achieved so far:</para>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment