Product SiteDocumentation Site

2.2. Desktop Applications (AppData)

2.2.1. Introduction

Every software center that exists allows the user to look at screenshots and a long description of the application before it is installed. For most users it allows them to answer the question Do I want to install this application?. Traditionally in Linux distributions, we have none of this data for the vast majority of our desktop user-installable applications. The packages-descriptions are describing all contents of a package, and not just a single application. They are also often written in a technical language and refer to other packages, which makes it hard for beginners to understand what the application they want to install really does. Additionally, if you are not using Debian or Ubuntu, the package descriptions are often untranslated. Also, packages do not provide some metadata users might be interested in before installing an application.
To solve this, we have defined a new data file, which the upstream project can optionally translate using the same technique as Desktop files or GSetting schemas. The AppData specification is a subset of the AppStream metadata (see Section 3.1, “AppStream XML files”) and extends the generic component metadata with fields specific for applications (see Section 2.1, “Generic Component”).
The AppData files override any values which are automatically fetched by the AppStream data generator. Applications can ship one or more files in /usr/share/appdata/%{id}.appdata.xml.
AppData files can - just likle all other metainfo files - be translated. See the section about translation for more information about that.

Note

All tags defined in the generic component specification are valid in AppData as well, an application is just defined as a specialized component, which has the additional benefit of being displayed in a software-center application. For a compact description of AppData, take a look at this AppData draft , which provides application developers with all information necessary to write good AppData files.

2.2.2. File specification

The file should contain something like this:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2013 First Lastname <your@email.com> -->
<component type="desktop">
  <id>gnome-power-statistics.desktop</id>
  <metadata_license>CC0</metadata_license>
  <name>Power Statistics</name>
  <summary>Observe power management</summary>

  <description>
    <p>
      Power Statistics is a program used to view historical and current battery
      information and will show programs running on your computer using power.
    </p>
    <p>Example list:</p>
    <ul>
      <li>First item</li>
      <li>Second item</li>
    </ul>
    <p>
      You probably only need to install this application if you are having problems
      with your laptop battery, or are trying to work out what programs are using
      significant amounts of power.
    </p>
  </description>

  <screenshots>
    <screenshot type="default" width="800" height="600">http://www.hughsie.com/en_US/main.png</screenshot>
    <screenshot width="800" height="600">http://www.hughsie.com/en_US/preferences.png</screenshot>
  </screenshots>

  <url type="homepage">http://www.gnome.org/projects/en_US/gnome-power-manager</url>
  <project_group>GNOME</project_group>

  <provides>
    <binary>gnome-power-statistics</binary>
  </provides>

  <release version="3.12.2" timestamp="20140414">
    <description>
      <p>Fixes issues X, Y and Z</p>
    </description>
  </release>
</component>

Note that the XML root must have the type property set to desktop, which in a generic component this property can be omitted. This clearly identified this metainfo document as describing an application.
<id/>
For applications, the %{id} is the same name as the installed .desktop file for the application.
<metadata_license/>
The <metadata_license/> tag is indicating the content licence that you are releasing the one AppData text file as. This is not typically the same as the project licence. By ommitting the licence value would probably mean your data would not be incorporated into the distribution metadata. Permissible licence codes include:
  • CC0
  • CC-BY
  • CC-BY-SA
  • GFDL
  • MIT
The licence codes correspond to the identifiers found at the SPDX OpenSource License Registry. For SPDX compatibility, versions with trailing dot-zeroes are considered to be equivalent to versions without (e.g., "2.0.0" is considered equal to "2.0" and "2"). For instance, CC-BY-SA corresponds to http://creativecommons.org/licenses/by-sa/3.0/
<name/>
While this tag is requited for a generic component, for an application metainfo file it is not necessary, but only recommended. You can omit this tag if you want the software center to have the same strings as defined in the XDG desktop file. In some cases it might be required to have a different name in the app-store, but most appdata.xml files will not need this.
<summary/>
While this tag is requited for a generic component, for an application metainfo file it is not necessary, but only recommended. You can omit this tag if you want the software center to have the same strings as defined in the XDG desktop file. In some cases it might be required to have a different name in the app-store, but most appdata.xml files will not need this.
<description/>
The long description is an important part of the file. Important things to consider when writing the application description:
  • Include 2-3 paragraphs of interesting easy to read prose.
  • Ensure you provide a description of what the application actually does.
  • Describe any important features.
  • Do not use possily trademarked product names when refering to competitors.
  • Break down each paragraph into easily translated paragraphs.
  • Use lists sparingly.
  • Never refer to installable items as packages.
  • Never start the first sentence with "This application..."
  • Try not use more than 100 words.
  • Do not be too geeky. Aim for an intelligent semi-technical reader.
  • Don't mention what language an application is written in, users don't care
  • Only mention what the application can do now, rather than what is planned
Do not assume the format is HTML. Only paragraph, ordered list and unordered list are supported at this time.
In metainfo files, this tag should be translated by-paragraph, meaning that in a translated file, each translated <p/> child has a language property.
<screenshots/>
A screenshot presents your application to the outside world, and could be seen by hundreds or thousands of people.
The <screenshots/> tag contains multiple <screenshot/> childrens, where at least one of them must have the property type="default" to indicate the application's primary screenshot. Additionally, the <screenshot/> tags should define the width and height of the referenced screenshot as properties. The value of these tags is a direct URL to a screenshot uploaded to a public location on the web.
Screenshots are an important part of how people choose which applications to install, so it's important to get them right. Consistent, good looking screenshots will make your application look more attractive and will expand your userbase. Consistent screenshots also provide a more predictable experience for people using the software center.
Screenshot size, shape and format:
  • All screenshots should have a 16:9 aspect ratio, and should have a width that is no smaller than 620px (software center applications will be able to fill in the screenshots in the space they provide for that more easily then).
    Ideally the window will be resized to a 16:9 aspect ratio, but screenshots can also be cropped if only a small area of the window needs to be shown.
  • Screenshots should be in PNG or JPEG format. PNG is the preferred format; JPEG should only be used when screenshots include large photographs or other images where a lossy format like JPEG may compress better.
  • Do not scale screenshots below their original size.
Basic guidelines for things to include (and not include) in your screenshots:
  • Use the default visual and theme settings, including the default font, icons, and window controls. Avoid including your own tweaks to the standard distribution offering.
  • Screenshots should be taken with English as the display language.
  • Your default screenshot should give an overview of your application, and should show an entire application window. It can be combined with screenshots which show specific aspects of the application.
  • Screenshots should not show anything outside the application's windows (including the background wallpaper). If you are taking a screenshot of the whole window, use your screenshot tool's "window" mode (including any window borders in the screenshot, and ensuring that the resulting image has an alpha mask for the rounded corners).
  • Some applications, such as games, primarily run full screen. Screenshots of these applications should be taken with the application running full screen - there should be no visible window controls in the screenshot.
  • Don't add shadows to your screenshots.
  • Do not include content that might be considered offensive or controversial, and avoid showing personal information. Remember that your screenshots will be visible to the internet at large.
Additional advice on how to take effective screenshots:
  • Each of your screenshots should focus on one thing and one thing only. Screenshot one window at a time, and avoid having overlapping windows or user interface elements. This will make it much easier for people to understand what you are showing them.
  • If a screenshot is demonstrating a single feature or aspect of the application, crop it to exclude irrelevant detail.
  • Screenshots often need to feature content, such as images, documents, web pages or videos. Don’t show your application in an ‘empty’ state, and try and use high quality content which has positive associations and broad appeal.
  • In general, you shouldn't include the mouse pointer in your screenshots.
<url/>
This is a recommended tag for links of type homepage. Links of type homepage should be a link to the upstream homepage for the application.
For other possible values, tage a look at the tag's description in Section 2.1.3, “XML Specification”.
<project_group/>
This tag is described for generic components at Section 2.1.3, “XML Specification”. You should use it for your application if appropriate.
<provides/>
This tag is described for generic components at Section 2.1, “Generic Component” in detail.
If your application ships a binary in a location in the default PATH, you should add at least a child of type <binary/> to make that new executable known to the distribution.
<releases/>
The application metainfo should at least provide one <releases/> tag, which has one or more <release/> childs to define the version and release date of this application. For details, see Section 2.1, “Generic Component” .
Additionally, the <release/> might be described in a short manner using the <description/> child tag, which should give brief information about what is new in the release, in a way which is understandable by non-technical users.