Data Files¶
Inside the data
directory are three files:
com.example.first_application.desktop
, com.example.first_application.svg
and meson.build
:
com.example.first_application.desktop
is a Desktop Entry file.com.example.first_application.svg
is a Scalable Vector Graphics (SVG) file that contains the application icon.meson.build
describes the build rules for the program – we will look at these later in Building the Application.
The Desktop Entry File¶
The com.example.first_application.desktop
contains metadata about the
application that browsers and application launchers can use to show information
about the application, including its name, icon and the name of its executable
file. The contents of the file itself follows a simple format with many entries
being self-documenting:
[Desktop Entry]
Name=Your First Application
Icon=com.example.first_application
Exec=your-first-application
Terminal=false
Type=Application
Categories=
StartupNotify=false
Less obvious entries are Exec
and Terminal
. The Exec
entry holds the
file name of the executable used to run the application. This will be defined
in the build script we use. The Terminal
entry determines whether the
application should be run in a terminal program. We can ignore the other
entries for now.
The Icon File¶
The com.example.first_application.svg
file is simply an SVG file:
We use an SVG file for convenience – it can be rescaled as needed by the user interface that shows it because the icon is stored in a vector file format. As a result, we do not need to provide bitmaps of different sizes.