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 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616
|
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "AppStream.ent">
%BOOK_ENTITIES;
]>
<section id="sect-Quickstart-DesktopApps">
<title>For GUI application upstream maintainers</title>
<section id="qsr-app-introduction">
<title>Introduction</title>
<para>
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 <quote>Do I want to install this application?</quote>.
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.
</para>
<para>
To solve this, we have defined a new data file, which the upstream project can optionally translate using the same technique as
<ulink url="https://specifications.freedesktop.org/desktop-entry-spec/latest/">Desktop Entry files</ulink> or GSetting schemas.
The application metainfo specification is a subset of the AppStream metadata (see <xref linkend="sect-AppStream-XML"/>) and extends
the generic component metadata with fields specific for applications (see <xref linkend="sect-Metadata-GenericComponent"/>).
</para>
<para>
The application-metainfo files override any values which are automatically fetched by the AppStream data generator.
Applications can ship one or more files in <filename>/usr/share/metainfo/%{id}.metainfo.xml</filename>.
</para>
<para>
Application metainfo files can - just like all other metainfo files - be translated. See the section about translation for more information about that.
</para>
<note>
<para>
All tags defined in the generic component specification are valid for components of type <literal>desktop-application</literal> as well,
an application is just defined as a specialized component, which has the additional benefit of being displayed in a software-center application.
</para>
</note>
<tip>
<para>
To get you started quickly, the AppStream project provides a web-based form to quickly generate valid metainfo XML for some of the most
common use cases. Check it out on <ulink url="https://www.freedesktop.org/software/appstream/metainfocreator/#/">freedesktop.org/software/appstream/metainfocreator</ulink>.
</para>
</tip>
</section>
<section id="qsr-app-example">
<title>Example file</title>
<para>
The file should contain something like this:
</para>
<programlisting language="XML">
<![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2013 First Lastname <your@email.com> -->
<component type="desktop-application">
<id>org.gnome.gnome-power-statistics</id>
<metadata_license>FSFAP</metadata_license>
<project_license>GPL-2.0+</project_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>
<launchable type="desktop-id">org.gnome.gnome-power-statistics.desktop</launchable>
<screenshots>
<screenshot type="default">
<caption>The options dialog</caption>
<image>http://www.hughsie.com/en_US/main.png</image>
</screenshot>
<screenshot>
<image>http://www.hughsie.com/en_US/preferences.png</image>
</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>
<releases>
<release version="3.12.2" date="2013-04-12">
<description>
<p>Fixes issues X, Y and Z</p>
</description>
</release>
</releases>
</component>]]></programlisting>
</section>
<section id="qsr-app-contents">
<title>Recommended metadata file contents</title>
<para>
This is a list of tags you might want to define for your application. For a full list of all possible tags, take a look at
the definition of a generic component (<xref linkend="spec-component-filespec"/>) and an application-component (<xref linkend="spec-appdata-filespec"/>).
</para>
<variablelist>
<varlistentry>
<term><id/></term>
<listitem>
<para>
The <code><id/></code> tag value contains the unique identifier for this application. It is usually modeled after the .desktop filename
and follows a reverse-DNS scheme. For the full naming guidelines see <xref linkend="tag-id-generic"/>.
</para>
<para>
Example: If your application's <filename>.desktop</filename> file is named <filename>org.example.FooBar.desktop</filename>, a good component-id would be
<code>org.example.FooBar</code>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><metadata_license/></term>
<listitem>
<para>
The <code><metadata_license/></code> tag is indicating the content license that you are releasing the one
metainfo file under. This is not typically the same as the project license. Omitting the license value can result
in your data not being incorporated into the distribution metadata (so this is a required tag).
</para>
<para>
A <ulink url="https://en.wikipedia.org/wiki/Permissive_software_licence">permissive</ulink> license ensures your data can
be combined with arbitrary other data in one file, without license conflics (this means copyleft licenses like the GPL are
not suitable as metadata license).
Possible license identifiers include:
</para>
<itemizedlist>
<listitem>
<para>FSFAP</para>
</listitem>
<listitem>
<para>CC0-1.0</para>
</listitem>
<listitem>
<para>CC-BY-3.0</para>
</listitem>
<listitem>
<para>CC-BY-SA-3.0</para>
</listitem>
<listitem>
<para>GFDL-1.3</para>
</listitem>
<listitem>
<para>MIT</para>
</listitem>
</itemizedlist>
<para>
The license codes correspond to the identifiers found at the <ulink url="http://spdx.org/licenses/">SPDX OpenSource License Registry</ulink>.
Take a look at <xref linkend="tag-metadata_license"/> for more details about this tag.
</para>
<para>
If you are unsure about which license to pick, the <ulink url="https://spdx.org/licenses/FSFAP.html">FSFAP</ulink> or FSFUL license statement is usually
a good choice, as it is short and safe to combine with other licenses.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><project_license/></term>
<listitem>
<para>
The <literal><project_license/></literal> tag is indicating the license(s) this application is released under.
Take a look at the specification of the <xref linkend="tag-project_license"/> tag for details on how to properly use it.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><name/></term>
<listitem>
<para>
It is highly recommended to have this tag present and contain a name of your application as value.
</para>
<para>
In theory you can omit this tag and have the AppStream generator of a Linux distribution automatically use the <literal>Name</literal> field
of the associated <filename>.desktop</filename> file (In which case one <xref linkend="qsr-app-launchable-info"/> tag must be present).
However, a large amount of tools expect the metainfo file to be complete and self-sufficient now, which is why omitting this tag will render it
invalid for tools like Flatpak and others use cases which do not involve a metadata preprocessing step.
</para>
<para>
If no <literal>name</literal> tag (and no <literal>Name</literal> desktop-entry field) is present, the metadata
is considered invalid and will be ignored by the AppStream generator.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><summary/></term>
<listitem>
<para>
It is highly recommended to have this tag present and contain a brief summary of what your application is about.
</para>
<para>
In theory you can omit this tag and have the AppStream generator of a Linux distribution automatically use the <literal>Comment</literal> field
of the associated <filename>.desktop</filename> file (In which case one <xref linkend="qsr-app-launchable-info"/> tag must be present).
However, a large amount of tools expect the metainfo file to be complete and self-sufficient now, which is why omitting this tag will render it
invalid for tools like Flatpak and others use cases which do not involve a metadata preprocessing step.
</para>
<para>
If no <literal>summary</literal> tag (and no <literal>Comment</literal> desktop-entry field) is present, the metadata
is considered invalid and will be ignored by the AppStream generator.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><description/></term>
<listitem>
<para>
The long description is an important part of the file. Important things to consider when writing the application description:
</para>
<itemizedlist>
<listitem>
<para>Include 2-3 paragraphs of interesting easy to read prose.</para>
</listitem>
<listitem>
<para>Ensure you provide a description of what the application actually does.</para>
</listitem>
<listitem>
<para>Describe any important features.</para>
</listitem>
<listitem>
<para>Do not use possily trademarked product names when refering to competitors.</para>
</listitem>
<listitem>
<para>Break down each paragraph into easily translated paragraphs.</para>
</listitem>
<listitem>
<para>Use lists sparingly.</para>
</listitem>
<listitem>
<para>Never refer to installable items as packages.</para>
</listitem>
<listitem>
<para>Never start the first sentence with "This application..."</para>
</listitem>
<listitem>
<para>Try not use more than 100 words.</para>
</listitem>
<listitem>
<para>Do not be too geeky. Aim for an intelligent semi-technical reader.</para>
</listitem>
<listitem>
<para>Don't mention what language an application is written in, users don't care</para>
</listitem>
<listitem>
<para>Only mention what the application can do now, rather than what is planned</para>
</listitem>
</itemizedlist>
<para>
Do not assume the format is HTML. Only paragraph, ordered list and unordered list are supported at this time, as well as emphasis and inline code.
See <xref linkend="tag-description"/> for more information.
</para>
<para>
In metainfo files, this tag should be translated by-paragraph, meaning that in a translated file, each translated <literal><p/></literal> child
has a language property.
</para>
</listitem>
</varlistentry>
<varlistentry id="qsr-app-launchable-info">
<term><launchable/></term>
<listitem>
<para>
This tag indicates a possible method to launch the software. Usually you want the application to be launchable by its .desktop file ID.
</para>
<para>
The tag makes it possible for software centers to offer launching an application immediately after installation. It also connects the metainfo file
with a .desktop file, so AppStream metadata generators and the distribution can absorb its metadata into the final AppStream output.
</para>
<para>
See <xref linkend="tag-launchable"/> for a detailed description of the tag.
Example:
</para>
<programlisting language="XML"><![CDATA[<launchable type="desktop-id">org.gnome.Sysprof2.desktop</launchable>]]></programlisting>
</listitem>
</varlistentry>
<varlistentry id="qsr-app-screenshots-info">
<term><screenshots/></term>
<listitem>
<para>
A screenshot presents your application to the outside world, and could be seen by hundreds or thousands of people.
</para>
<para>
The <code><screenshots/></code> tag contains multiple <code><screenshot/></code> children, where at least one of them must have the property
<code>type="default"</code> to indicate the application's primary screenshot. Every <code><screenshot/></code> tag must have at least
one <code><image/></code> child, which may define the width and height of the referenced image in it's properties.
The value of the <code><image/></code> tag is a direct URL to a screenshot uploaded to a public location on the web.
</para>
<para>
Optionally, a <code><screenshot/></code> tag may have a <code><caption/></code> child, defining a short (not more than 180 characters!)
description of what the user can see on the referenced screenshot.
</para>
<para>
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.
</para>
<para>
Screenshot size, shape and format:
</para>
<itemizedlist>
<listitem>
<para>
Use an aspect ratio that works for the applications's UI, use 16:9 as long as that is sensible.
</para>
</listitem>
<listitem>
<para>
Screenshots should ideally be in the PNG format, but JPEG and WebP images are also fine. Keep in mind though that the images are converted into PNG
in any case by the distributor of a software collection.
</para>
</listitem>
<listitem>
<para>
Do not scale screenshots below their original size.
</para>
</listitem>
<listitem>
<para>
Generally try to keep any window size small to make the content more visible when it is scaled down in software center frontends
</para>
</listitem>
</itemizedlist>
<para>
Basic guidelines for things to include (and not include) in your screenshots:
</para>
<itemizedlist>
<listitem>
<para>
Use the default theme, icon set, font, and window decorations of your desktop environment. Avoid including your own tweaks to the standard distribution offering.
</para>
</listitem>
<listitem>
<para>Screenshots should be taken with English as the display language.</para>
</listitem>
<listitem>
<para>
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.
</para>
</listitem>
<listitem>
<para>
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).
</para>
</listitem>
<listitem>
<para>
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.
</para>
</listitem>
<listitem>
<para>
Use window screenshots with baked-in default shadows
</para>
</listitem>
<listitem>
<para>
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.
</para>
</listitem>
</itemizedlist>
<para>
Additional advice on how to take effective screenshots:
</para>
<itemizedlist>
<listitem>
<para>
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.
</para>
</listitem>
<listitem>
<para>If a screenshot is demonstrating a single feature or aspect of the application, crop it to exclude irrelevant detail.</para>
</listitem>
<listitem>
<para>
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.
</para>
</listitem>
<listitem>
<para>
In general, you shouldn't include the mouse pointer in your screenshots.
</para>
</listitem>
</itemizedlist>
<para>
Some advice for a good screenshot caption:
</para>
<itemizedlist>
<listitem>
<para>The caption should be short. Try not to use more than a few words to describe the image.</para>
</listitem>
<listitem>
<para>Try not to state the obvious: "Main window displaying an image" is something the user can see on the screenshot already.</para>
</listitem>
<listitem>
<para>Try not to repeat the application's name in the caption.</para>
</listitem>
<listitem>
<para>Do not end your caption with a fullstop.</para>
</listitem>
</itemizedlist>
<para>
Some examples of good and bad screenshot choices:
</para>
<informaltable frame='none' colsep="0">
<tgroup cols='2'>
<colspec colwidth='0.5in'/>
<colspec colwidth='0.5in'/>
<tbody>
<row>
<entry>
<mediaobject>
<imageobject>
<imagedata fileref="screxample_xterm-bad.png" width="450px" />
</imageobject>
<caption>
<para>
<emphasis role="bold">BAD:</emphasis> Not on Linux
</para>
</caption>
</mediaobject>
</entry>
<entry>
<mediaobject>
<imageobject>
<imagedata fileref="screxample_geany-good.png" width="450px" />
</imageobject>
<caption>
<para><emphasis role="bold">GOOD</emphasis></para>
</caption>
</mediaobject>
</entry>
</row>
<row>
<entry>
<mediaobject>
<imageobject>
<imagedata fileref="screxample_xmedcon-bad.png" width="450px" />
</imageobject>
<caption>
<para>
<emphasis role="bold">BAD:</emphasis> Not 16:9, shows the whole desktop and too many small windows
</para>
</caption>
</mediaobject>
</entry>
<entry>
<mediaobject>
<imageobject>
<imagedata fileref="screxample_xonotic-good.png" width="450px" />
</imageobject>
<caption>
<para>
<emphasis role="bold">GOOD:</emphasis> No window border required for fullscreen game
</para>
</caption>
</mediaobject>
</entry>
</row>
<row>
<entry>
<mediaobject>
<imageobject>
<imagedata fileref="screxample_gameconqueror-bad.png" width="450px" />
</imageobject>
<caption>
<para>
<emphasis role="bold">BAD:</emphasis> Uses custom font, custom color theme and is not 16:9
</para>
</caption>
</mediaobject>
</entry>
<entry>
<mediaobject>
<imageobject>
<imagedata fileref="screxample_wireshark-good.png" width="450px" />
</imageobject>
<caption>
<para><emphasis role="bold">GOOD</emphasis></para>
</caption>
</mediaobject>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</listitem>
</varlistentry>
<varlistentry>
<term><url/></term>
<listitem>
<para>
This is a recommended tag for links of type <code>homepage</code>.
Links of type <code>homepage</code> should be a link to the upstream homepage for the application.
</para>
<para>
For other possible values, tage a look at the tag's description at <xref linkend="tag-url"/>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><project_group/></term>
<listitem>
<para>
This tag is described for generic components at <xref linkend="tag-project_group"/>. You should use it for your application if appropriate.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><developer/></term>
<listitem>
<para>
The <code><developer/></code> tag is designed to represent the developers or project responsible for development of the project described in the metadata.
</para>
<para>
See <xref linkend="tag-developer"/> for its detailed generic description.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><update_contact/></term>
<listitem>
<para>
The <code><update_contact/></code> tag is an optional tag which can be added to provide an email address distributors can use to contact the project
about invalid or incomplete metadata, or in case the specification has changed, about old metadata. It can also be used to ask general questions in case of
an update of the component described in the metadata file. Spam protection using <code>_AT_</code> is valid.
</para>
<para>
Example:
</para>
<programlisting language="XML"><![CDATA[<update_contact>developer_AT_example.com</update_contact>]]></programlisting>
</listitem>
</varlistentry>
</variablelist>
</section>
<section id="qsr-app-contents-suggestions">
<title>Suggested metadata file contents</title>
<para>
It is useful to add these tags as well if they make sense for the described application.
They are not strictly required to be present though.
</para>
<variablelist>
<varlistentry>
<term><releases/></term>
<listitem>
<para>
The application metainfo may include one <code><releases/></code> tag, which
has one or multiple <code><release/></code> subnodes to define the version and release date of this
application. For details, see <xref linkend="tag-releases"/> .
</para>
<para>
It is very useful to attach short release-notes to a <code><release/></code> using the <code><description/></code>
subnode. These release-notes should contain brief information about what is new in the release, in a way which is understandable by non-technical users.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><provides/></term>
<listitem>
<para>
This tag is described in detail for generic components at <xref linkend="tag-provides"/>.
</para>
<para>
If your application ships a binary in a location in the default <envar>PATH</envar>, it is useful to add at least a child of type
<code><binary/></code> to make it easily possible to find your application's metadata using the name of its binary.
</para>
</listitem>
</varlistentry>
</variablelist>
</section>
</section>
|