- Qbs Manual
- Qbs 1.18.1

# freedesktop

Provides support for some freedesktop.org specifications. More...

Since: | Qbs 1.16

- List of all members, including inherited members

## Properties

- desktopKeys : var
- name : string

## Detailed Description

The `freedesktop` module contains properties and rules for building and working with applications compliant to freedesktop.org specifications on UNIX platforms. The areas in which this module can be of use include:

- Creation or post-processing of `.desktop` files
- Installation of AppStream metadata
- Defining the location for application icons

This module is available on all platforms but is currently only useful on UNIX platforms.

### Example usage

     Application {
         ...
         Depends { name: "freedesktop" }

         Group {
             files: [
                 ...

                 // Declare the desktop and appstream files
                 "data/my-app.desktop",
                 "data/my-app.metainfo.xml",
             ]
         }

         // Add/change some fields in the desktop file
         freedesktop.desktopKeys: ({
             'Exec': FileInfo.joinPaths(qbs.installPrefix,
                                        product.installDir,
                                        product.targetName) + ' --argument',
             'X-Application-Version': product.version,
         })

         // Declare the application icon
         Group {
             files: "icons/my-application.svg"
             fileTags: "freedesktop.appIcon"
         }
     }

### Relevant File Tags

Tag | Auto-tagged File Names | Since | Description
--- | --- | --- | ---
`"freedesktop.desktopfile_source"` | `*.desktop` | 1.16 | A source file with this tag is a `.desktop` file or fragment that will be merged into the application's final `.desktop` file.
`"freedesktop.desktopfile"` | - | 1.16 | Attached to the output artifacts of the rule that produces the merged `.desktop` file.
`"freedesktop.appstream"` | `*.metainfo.xml`, `*.appdata.xml` | 1.16 | Source files with this tag are AppStream metadata files which will be installed under installPrefix`/share/metainfo`
`"freedesktop.appIcon"` | - | 1.16 | Source files with this tag are application icons and will be installed under installPrefix`/share/icons/hicolor/scalable/apps`

## Property Documentation

desktopKeys : var

A dictionary of key-value pairs to add to the application's `.desktop` file.

The contents of this property will be aggregated with the values from any `.desktop` file. If this property and any `.desktop` files contain the same key, this property will take precedence.

Default: Undefined

name : string

The display name of the application which will be stored in the `.desktop` file.

Default: product.name