diff options
Diffstat (limited to 'src/packages')
-rw-r--r-- | src/packages/archive/archive.qbs | 99 | ||||
-rw-r--r-- | src/packages/archive/qt.conf | 2 | ||||
-rw-r--r-- | src/packages/packages.qbs | 9 |
3 files changed, 86 insertions, 24 deletions
diff --git a/src/packages/archive/archive.qbs b/src/packages/archive/archive.qbs index 589f39875..166ecdd27 100644 --- a/src/packages/archive/archive.qbs +++ b/src/packages/archive/archive.qbs @@ -4,7 +4,7 @@ import qbs.ModUtils import qbs.Process import qbs.TextFile -Product { +QbsProduct { Depends { name: "qbs-config" } Depends { name: "qbs-config-ui" } Depends { name: "qbs-qmltypes" } @@ -13,7 +13,6 @@ Product { Depends { name: "qbs-setup-toolchains" } Depends { name: "qbs_app" } Depends { name: "qbs_processlauncher" } - Depends { name: "qbsversion" } Depends { name: "qbscore" } Depends { name: "qbsqtprofilesetup" } Depends { name: "qbs_cpp_scanner" } @@ -22,20 +21,14 @@ Product { Depends { name: "qbs resources" } Depends { name: "archiver" } - Depends { name: "Qt.core" } - - readonly property bool hasQt56: { - if (Qt.core.versionMajor === 5) - return Qt.core.versionMinor >= 6; - return Qt.core.versionMajor > 5; - } property stringList windeployqtArgs: [ "--no-svg", "--no-system-d3d-compiler", "--no-angle", "--no-compiler-runtime", - ].concat(hasQt56 ? ["--no-opengl-sw"] : []) + "--no-opengl-sw", + ] // List of path prefixes to be excluded from the generated archive property stringList excludedPathPrefixes: [ @@ -47,21 +40,97 @@ Product { ] 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 { + name: "Licenses" + prefix: "../../../" + files: [ + "LGPL_EXCEPTION.txt", + "LICENSE.LGPLv3", + "LICENSE.LGPLv21", + ] + qbs.install: true + qbs.installDir: "share/doc/qbs" + } + + 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"] @@ -112,7 +181,7 @@ Product { Rule { multiplex: true - inputs: ["dependencies.json"] + inputs: ["dependencies.json", "installable"] inputsFromDependencies: ["installable"] Artifact { @@ -131,7 +200,7 @@ Product { 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 = .. diff --git a/src/packages/packages.qbs b/src/packages/packages.qbs index 3b3a7bd1d..12ca8b041 100644 --- a/src/packages/packages.qbs +++ b/src/packages/packages.qbs @@ -12,14 +12,5 @@ Project { Depends { name: "qbs chocolatey"; required: false } name: "dist" builtByDefault: false - - Group { - name: "Scripts" - prefix: "../../scripts/" - files: [ - "make-release-archives.sh", - "make-release-archives.bat", - ] - } } } |