freedesktop

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

Since: Qbs 1.16

Properties

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:

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

TagAuto-tagged File NamesSinceDescription
"freedesktop.desktopfile_source"*.desktop1.16A 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.16Attached to the output artifacts of the rule that produces the merged .desktop file.
"freedesktop.appstream"*.metainfo.xml, *.appdata.xml1.16Source files with this tag are AppStream metadata files which will be installed under installPrefix/share/metainfo
"freedesktop.appIcon"-1.16Source files with this tag are application icons and will be installed under installPrefix/share/icons/hicolor/scalable/apps

Property Documentation

appName : string

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

Default: product.name


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


© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.