diff options
author | Jake Petroules <jake.petroules@petroules.com> | 2013-03-15 21:42:54 -0400 |
---|---|---|
committer | Jake Petroules <jake.petroules@petroules.com> | 2013-03-19 13:57:25 +0100 |
commit | 9217f2ff0250e9a5dbf0abbc45726d07f578bbe8 (patch) | |
tree | 5d93ccc537eda1a746282c72930beb38a8f7aa66 /share | |
parent | 44c38f2721c5e1f302e8930fbb5ce6f2d9d2702a (diff) |
Place the executable in the application bundle directly.
As a side effect, this fixes installation of application bundles
(the entire .app directory is copied, not just the executable).
The prepare command remains in the applicationbundle Rule to let
the user know that an application bundle has been generated,
though it performs no actions other than printing that message.
Task-number: QBS-186
Change-Id: I61c5d5c3fb6e64251026a346a688563546426dbb
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'share')
-rw-r--r-- | share/qbs/modules/cpp/GenericGCC.qbs | 4 | ||||
-rw-r--r-- | share/qbs/modules/cpp/mac-gcc.qbs | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs index fdc236ed4..43f4abe24 100644 --- a/share/qbs/modules/cpp/GenericGCC.qbs +++ b/share/qbs/modules/cpp/GenericGCC.qbs @@ -161,7 +161,9 @@ CppModule { usings: ['dynamiclibrary', 'staticlibrary'] Artifact { - fileName: product.destinationDirectory + "/" + ModUtils.moduleProperty(product, "executablePrefix") + fileName: product.destinationDirectory + "/" + + (product.type === "applicationbundle" ? product.targetName + ".app/Contents/MacOS/" : "") + + ModUtils.moduleProperty(product, "executablePrefix") + product.targetName + ModUtils.moduleProperty(product, "executableSuffix") fileTags: ["application"] } diff --git a/share/qbs/modules/cpp/mac-gcc.qbs b/share/qbs/modules/cpp/mac-gcc.qbs index 32fa8ab3c..85807b693 100644 --- a/share/qbs/modules/cpp/mac-gcc.qbs +++ b/share/qbs/modules/cpp/mac-gcc.qbs @@ -94,18 +94,15 @@ UnixGCC { inputs: ["application", "infoplist", "pkginfo"] Artifact { - fileName: product.targetName + ".app/Contents/MacOS/" + product.targetName + fileName: product.targetName + ".app" fileTags: ["applicationbundle"] } prepare: { + // This command is intentionally empty; it just lets the user know a bundle has been made var cmd = new JavaScriptCommand(); - cmd.description = "generating app bundle"; + cmd.description = "creating app bundle"; cmd.highlight = "codegen"; - cmd.sourceCode = function() { - File.remove(outputs.applicationbundle[0].fileName); - File.copy(inputs.application[0].fileName, outputs.applicationbundle[0].fileName); - } return cmd; } } |