bundle

Provides Core Foundation bundle support. More...

Since: Qbs 1.4

Properties

Detailed Description

The bundle module contains properties and rules for building and working with Core Foundation bundles on Apple platforms (commonly known as CFBundles or simply bundles), directories with a standardized hierarchical structure that hold executable code and resources. Examples include applications, frameworks, and plugins.

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

Note: Core Foundation bundles are not to be confused with Mach-O loadable modules, which are also referred to as (loadable) bundles in Apple parlance. In Qbs, Core Foundation bundles are referred to as bundles, while Mach-O loadable bundles are referred to as loadable modules.

Relevant File Tags

TagAuto-tagged File NamesSinceDescription
"bundle.content"-1.8Attached to the output artifacts of the rule that produces the bundle.
"infoplist"Info.plist, *-Info.plist1.5Source files with this tag are Info property lists files or fragments that are merged into the bundle's final Info.plist.

Property Documentation

bundleName : string

The file name of the bundle's wrapper directory.

This property should not normally need to be changed.

Default: A combination of the product's targetName and bundle's extension.


[read-only] contentsFolderPath : string

The path of the bundle's Contents subdirectory.

The path is relative to the directory that contains the bundle.


[read-only, since Qbs 1.5] documentationFolderPath : string

The path of the directory where documentation will be written.

The path is relative to the directory that contains the bundle.

This property was introduced in Qbs 1.5.


embedInfoPlist : bool

Whether to create a __TEXT section in the product's executable containing the processed Info.plist.

Only applies to command line applications.

Default: true if the product is a command line tool, otherwise false.


[read-only] executableFolderPath : string

The path of the directory where the main exectuable will be written.

The path is relative to the directory that contains the bundle.

Not to be confused with executablesFolderPath.


[read-only] executablePath : string

The path that the main executable file will be written to.

The path is relative to the directory that contains the bundle.


[read-only] executablesFolderPath : string

The path of the directory where auxiliary executables will be copied.

The path is relative to the directory that contains the bundle.

Not to be confused with executableFolderPath.


extension : string

The extension of the bundle's wrapper directory, without the leading period (.).

This property should not normally need to be set unless creating a custom bundle type.

Default: "app" for "APPL" packages, "framework" for "FMWK" packages, and "bundle" for "BNDL" and custom packages.


frameworkVersion : string

For framework bundles, the version of the framework. Not used for other package types.

Default: "A"


[read-only] frameworksFolderPath : string

The path of the directory where internal frameworks will be copied.

The path is relative to the directory that contains the bundle.


[since Qbs 1.5] generatePackageInfo : bool

Whether to generate a PkgInfo file for the bundle.

This property should almost never need to be changed, even though enabling it when specifying an alternative package type for custom bundles using packageType is allowed.

Default: true for applications, otherwise false.

This property was introduced in Qbs 1.5.


identifier : string

The bundle's identifier. If left unset, the bundle identifier will be a concatenation of the identifierPrefix value and the Product.targetName propertyy formatted as an RFC-1034 identifier, separated by a period (.).

Default: A combination of identifierPrefix and the product's target name formatted as an RFC-1034 identifier.


identifierPrefix : string

A prefix for the product's bundle identifier. If identifier is left unset, the bundle identifier will be a concatenation of this value and the Product.targetName property formatted as an RFC-1034 identifier, separated by a period (.). This corresponds to the organization identifier in Xcode.

Default: org.example


infoPlist : var

A dictionary of key-value pairs to add to the bundle's Info.plist.

The contents of this property will be aggregated with the values from any plist files. If this property and any plist files contain the same key, this property will take precedence. However, it might be overridden during postprocessing (see processInfoPlist).

If undefined, will not be taken into account.

Default: Undefined


infoPlistFormat : string

The file format to write the product's resulting Info.plist in.

Possible values are:

  • "binary1"
  • "json"
  • "same-as-input"
  • "xml1"

Default: "binary1" for iOS, "same-as-input" or "xml1" for macOS depending on whether a plist file is used, and undefined for all other operating systems.


[read-only] infoPlistPath : string

The path that the Info.plist file will be written to.

The path is relative to the directory that contains the bundle.


[read-only, since Qbs 1.5] infoStringsPath : string

The path that the InfoPlist.strings file will be written to.

The path is relative to the directory that contains the bundle.

This property was introduced in Qbs 1.5.


isBundle : bool

Whether the product should actually be packaged as a bundle as opposed to a flat file. This allows a product indirectly dependent on the bundle module to retain control of whether it should actually be built as a bundle.

Default: true for applications and dynamic libraries on Apple platforms, false otherwise.


[read-only] isShallow : bool

Whether the bundle directory tree is shallow. That is, whether it lacks a Contents subdirectory. This is the default on all platforms other than macOS.

Default: false on macOS, otherwise true.


[read-only, since Qbs 1.5] javaFolderPath : string

The path of the directory where Java content will be written.

The path is relative to the directory that contains the bundle.

This property was introduced in Qbs 1.5.


[read-only, since Qbs 1.5] localizedResourcesFolderPath : string

The path of the directory where localized resource files will be copied.

The path is relative to the directory that contains the bundle.

This property was introduced in Qbs 1.5.


packageType : string

The four-letter file type code of the bundle, specified in the bundle's PkgInfo file and in the bundle's Info.plist as the value for the CFBundlePackageType key.

This property should almost never need to be changed, even though specifying an alternative package type for custom bundles is allowed.

Default: "APPL" for applications, "FMWK" for frameworks, and "BNDL" for custom bundles.


[read-only] pkgInfoPath : string

The path that the PkgInfo file will be written to.

The path is relative to the directory that contains the bundle.


[read-only] pluginsFolderPath : string

The path of the directory where plugins will be copied.

The path is relative to the directory that contains the bundle.


privateHeaders : pathList

A list of private header files to copy to a framework bundle's PrivateHeaders subdirectory

Default: Undefined


[read-only] privateHeadersFolderPath : string

The path of the directory where private header files will be copied.

The path is relative to the directory that contains the bundle.


processInfoPlist : bool

Whether to perform post-processing on the aggregated Info.plist contents.

If this property is true, various post-processing operations will be applied to the bundle's property list dictionary after it has been aggregated from the contents of any plist files on disk, and the infoPlist property.

First, values from a list of defaults will be added to the dictionary if they were not already present. Second, values from the AdditionalInfo key of the platform SDK's Info.plist file will be added to the dictionary if they were not already present, as well as some other miscellaneous keys, such as BuildMachineOSBuild and UIDeviceFamily (on iOS). Finally, variable expansions will be performed such that substrings of the form $(VAR) or ${VAR} will be replaced with their corresponding environment variables.

Default: true


publicHeaders : pathList

A list of public header files to copy to a framework bundle's Headers subdirectory.

Default: Undefined


[read-only] publicHeadersFolderPath : string

The path of the directory where public headers files will be copied.

The path is relative to the directory that contains the bundle.


resources : pathList

A list of resources to copy to a bundle's Resources subdirectory. Files will automatically be copied into lproj subdirectories corresponding to the input files' paths.

Default: Undefined


[read-only] scriptsFolderPath : string

The path of the directory where script files will be copied.

The path is relative to the directory that contains the bundle.


[read-only] sharedFrameworksFolderPath : string

The path of the directory where shared frameworks will be copied.

The path is relative to the directory that contains the bundle.


[read-only] sharedSupportFolderPath : string

The path of the directory where shared support files will be copied.

The path is relative to the directory that contains the bundle.


signature : string

The four-letter signature specific to the bundle, also known as the creator code, specified in the bundle's PkgInfo file and in the bundle's Info.plist as the value for the CFBundleSignature key.

This property should normally never need to be set.

Default: "????"


[read-only] unlocalizedResourcesFolderPath : string

The path of the directory where non-localized resource files will be copied.

The path is relative to the directory that contains the bundle.

This is the same as the base resources path.


[default: false] useBuiltinXcodeBuildSpecs : bool

Set this property to true to use Xcode .xcspec files shipped with Qbs.

This property can be used as a workaround when using a new Xcode version that is not supported by Qbs yet.


[read-only] versionPlistPath : string

The path that the version.plist file will be written to.

The path is relative to the directory that contains the bundle.


[read-only, since Qbs 1.5] versionsFolderPath : string

The path of the bundle's Versions subdirectory.

The path is relative to the directory that contains the bundle.

This is only relevant for (non-shallow) framework bundles.

This property was introduced in Qbs 1.5.


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