diff options
author | Jake Petroules <jake.petroules@petroules.com> | 2015-01-06 18:35:35 -0800 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-02-09 16:09:28 +0000 |
commit | d2f431f74a4f7983dbd684c519ca75e6d88ed886 (patch) | |
tree | fc388fc2311fb7c9793dca667e11ce5b22f0d6eb /share | |
parent | 4b9248c8e3724f9758931d40a7163ee5cb7e3cc5 (diff) |
Add support for building OS X and iOS App Extensions.
Change-Id: I92ca00b8741098a292578d12a027fa24a6ed577f
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'share')
-rw-r--r-- | share/qbs/imports/qbs/base/ApplicationExtension.qbs | 24 | ||||
-rw-r--r-- | share/qbs/modules/bundle/BundleModule.qbs | 2 |
2 files changed, 26 insertions, 0 deletions
diff --git a/share/qbs/imports/qbs/base/ApplicationExtension.qbs b/share/qbs/imports/qbs/base/ApplicationExtension.qbs new file mode 100644 index 000000000..ddc191be3 --- /dev/null +++ b/share/qbs/imports/qbs/base/ApplicationExtension.qbs @@ -0,0 +1,24 @@ +import qbs + +XPCService { + type: base.concat(["applicationextension"]) + + cpp.entryPoint: "_NSExtensionMain" + cpp.frameworks: base.concat(["/System/Library/PrivateFrameworks/PlugInKit.framework"]) + cpp.requireAppExtensionSafeApi: true + + xpcServiceType: undefined + property var extensionAttributes + property string extensionPointIdentifier + property string extensionPrincipalClass + + bundle.infoPlist: { + var infoPlist = base; + infoPlist["NSExtension"] = { + "NSExtensionAttributes": extensionAttributes || {}, + "NSExtensionPointIdentifier": extensionPointIdentifier, + "NSExtensionPrincipalClass": extensionPrincipalClass + }; + return infoPlist; + } +} diff --git a/share/qbs/modules/bundle/BundleModule.qbs b/share/qbs/modules/bundle/BundleModule.qbs index 319f5e8a2..ea0a6ec96 100644 --- a/share/qbs/modules/bundle/BundleModule.qbs +++ b/share/qbs/modules/bundle/BundleModule.qbs @@ -34,6 +34,8 @@ Module { } else if (packageType === "APPL") { return "app"; } else if (packageType === "XPC!") { + if (product.type.contains("applicationextension")) + return "appex"; return "xpc"; } else if (packageType === "FMWK") { return "framework"; |