diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-08-09 00:28:18 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-08-10 07:44:30 +0000 |
commit | ed99a39fd9bb38163d81cef5011f7bb4401a9eef (patch) | |
tree | 86fd4408389bb338b3d0e16f176450e01cbdda39 /src/packages | |
parent | 090157243c14e9dae1bd84dbae68d1cdb29379cb (diff) |
Port the archive product to macOS
Unlike Windows, we don't use the equivalent deployqt tool here, because
it is designed to work only on application bundles and not loose
collections of executables and libraries.
Change-Id: I6da952a746b162d5c26d6a6642ceb9da6e9ecb14
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/packages')
-rw-r--r-- | src/packages/archive/archive.qbs | 74 | ||||
-rw-r--r-- | src/packages/archive/qt.conf | 2 |
2 files changed, 71 insertions, 5 deletions
diff --git a/src/packages/archive/archive.qbs b/src/packages/archive/archive.qbs index 1ce23147e..86f547ee0 100644 --- a/src/packages/archive/archive.qbs +++ b/src/packages/archive/archive.qbs @@ -40,21 +40,85 @@ QbsProduct { ] property bool includeTopLevelDir: false - condition: qbs.targetOS.contains("windows") + condition: qbs.targetOS.containsAny(["windows", "macos"]) builtByDefault: false name: "qbs archive" type: ["archiver.archive"] - targetName: "qbs-windows-" + qbs.architecture + "-" + qbsversion.version + targetName: "qbs-" + qbs.targetOS[0] + "-" + qbs.architecture + "-" + qbsversion.version destinationDirectory: project.buildDirectory - archiver.type: "zip" + archiver.type: qbs.targetOS.contains("windows") ? "zip" : "tar" Properties { condition: includeTopLevelDir archiver.workingDirectory: qbs.installRoot + "/.." } archiver.workingDirectory: qbs.installRoot + Group { + name: "qt.conf" + files: ["qt.conf"] + qbs.install: true + qbs.installDir: qbsbuildconfig.appInstallDir + } + + Group { + condition: qbs.targetOS.contains("macos") + prefix: Qt.core.libPath + "/" + name: "Qt libraries" + files: { + if (Qt.core.frameworkBuild) { + return [ + "QtCore.framework/**", + "QtGui.framework/**", + "QtNetwork.framework/**", + "QtPrintSupport.framework/**", + "QtScript.framework/**", + "QtWidgets.framework/**", + "QtXml.framework/**", + ]; + } else if (!Qt.core.staticBuild) { + return [ + "libQt5Core*.dylib", + "libQt5Gui*.dylib", + "libQt5Network*.dylib", + "libQt5PrintSupport*.dylib", + "libQt5Script*.dylib", + "libQt5Widgets*.dylib", + "libQt5Xml*.dylib", + ]; + } + return []; + } + + excludeFiles: [ + "**/*.prl", + "**/*_debug*", + ].concat(!qbsbuildconfig.installApiHeaders ? ["**/Headers", "**/Headers/**"] : []) + + qbs.install: true + qbs.installDir: qbsbuildconfig.libInstallDir + qbs.installSourceBase: prefix + } + + Group { + condition: qbs.targetOS.contains("macos") + prefix: Qt.core.pluginPath + "/" + name: "Qt platform plugins" + files: [ + "platforms/libq*.dylib", + ] + + excludeFiles: [ + "**/*_debug.dylib", + ] + + qbs.install: true + qbs.installDir: "plugins" + qbs.installSourceBase: prefix + } + Rule { + condition: qbs.targetOS.contains("windows") multiplex: true inputsFromDependencies: ["installable"] @@ -105,7 +169,7 @@ QbsProduct { Rule { multiplex: true - inputs: ["dependencies.json"] + inputs: ["dependencies.json", "installable"] inputsFromDependencies: ["installable"] Artifact { @@ -124,7 +188,7 @@ QbsProduct { cmd.baseDirectory = product.moduleProperty("archiver", "workingDirectory"); cmd.sourceCode = function() { var tf; - for (var i = 0; i < inputs["dependencies.json"].length; ++i) { + for (var i = 0; i < (inputs["dependencies.json"] || []).length; ++i) { try { tf = new TextFile(inputs["dependencies.json"][i].filePath, TextFile.ReadOnly); diff --git a/src/packages/archive/qt.conf b/src/packages/archive/qt.conf new file mode 100644 index 000000000..7963d6644 --- /dev/null +++ b/src/packages/archive/qt.conf @@ -0,0 +1,2 @@ +[Paths] +Prefix = .. |