AppleApplicationDiskImage

Apple application drag 'n' drop disk image installer. More...

Since: Qbs 1.9
Inherits:

AppleDiskImage

Properties

Detailed Description

An AppleApplicationDiskImage item is a product of the type "dmg.dmg" that has a dependency on the dmg module. In addition, it has rules and properties specific to building drag 'n' drop disk image installers with an application bundle and symbolic link to the /Applications directory.

Any artifacts of product dependencies that are tagged "installable" will be copied into the disk image, provided their file paths are relative to the path specified by the sourceBase property (that is, are located in that directory). Any artifacts tagged "installable" that are not relative to sourceBase will be ignored.

Here is what the project file could look like for a simple DMG installer:

AppleApplicationDiskImage {
    Depends { name: "myapp" }
    name: "My App"
    dmg.volumeName: name
    dmg.iconSize: 128
    dmg.windowWidth: 640
    dmg.windowHeight: 280
    dmg.iconPositions: [
        {"path": "Applications", "x": 128, "y": 128},
        {"path": "My App.app", "x": 256, "y": 128}
    ]
    files: ["background.tiff", "volume-icon.icns"]
    Group {
        files: ["*.lproj/**"] // licenses
        fileTags: ["dmg.license.input"]
    }
}

For plain disk images whose contents are not a single application bundle, consider the base AppleDiskImage item instead.

Property Documentation

sourceBase : string

The base directory from which artifacts installed into the disk image will be copied. This directory is always considered to be relative to qbs.installRoot/qbs.installPrefix. For example, if the application Example.app exists at qbs.installRoot/qbs.installPrefix/Applications/Example.app, and the value of this property is "/Applications", the application will be located at /Example.app relative to the disk image root. Therefore, its full path when the disk image is mounted would be something like /Volumes/Example-1.0/Example.app.

Default: "/Applications"


List of symlinks to create in the disk image. This is specified as a list of strings, each string containing two file paths separated by a colon. The first path is the symlink target, and the second path is the name of the symlink relative to the root of the disk image.

Default: ["/Applications:Applications"]


© 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.