diff options
Diffstat (limited to 'src/packages/archive/archive.qbs')
-rw-r--r-- | src/packages/archive/archive.qbs | 115 |
1 files changed, 4 insertions, 111 deletions
diff --git a/src/packages/archive/archive.qbs b/src/packages/archive/archive.qbs index 0e0663090..468606368 100644 --- a/src/packages/archive/archive.qbs +++ b/src/packages/archive/archive.qbs @@ -7,7 +7,7 @@ import qbs.TextFile QbsProduct { Depends { name: "qbs_processlauncher" } Depends { name: "qbscore" } - Depends { name: "bundledqt" } + Depends { name: "bundledqt"; required: false } Depends { name: "qbs documentation"; condition: project.withDocumentation } Depends { name: "qbs resources" } Depends { @@ -18,25 +18,8 @@ QbsProduct { Depends { name: "archiver" } - property stringList windeployqtArgs: [ - "--no-svg", - "--no-system-d3d-compiler", - "--no-angle", - "--no-compiler-runtime", - "--no-opengl-sw", - ] - - // List of path prefixes to be excluded from the generated archive - property stringList excludedPathPrefixes: [ - "bin/icudt", - "bin/icuin", - "bin/icuuc", - "bin/iconengines/", - "bin/imageformats/", - ] property bool includeTopLevelDir: false - condition: qbs.targetOS.containsAny(["windows", "macos"]) builtByDefault: false name: "qbs archive" type: ["archiver.archive"] @@ -64,65 +47,8 @@ QbsProduct { } Rule { - condition: qbs.targetOS.contains("windows") multiplex: true - inputsFromDependencies: ["installable"] - - Artifact { - filePath: "windeployqt.json" - fileTags: ["dependencies.json"] - } - - prepare: { - var cmd = new JavaScriptCommand(); - cmd.description = "windeployqt"; - cmd.outputFilePath = output.filePath; - cmd.installRoot = product.moduleProperty("qbs", "installRoot"); - cmd.windeployqtArgs = product.windeployqtArgs; - cmd.binaryFilePaths = inputs.installable.filter(function (artifact) { - return artifact.fileTags.contains("application") - || artifact.fileTags.contains("dynamiclibrary"); - }).map(function(a) { return ModUtils.artifactInstalledFilePath(a); }); - cmd.binaryFilePaths.sort(function(a1, a2) { - if (a1.contains("qbs.exe")) - return -1; - if (a2.contains("qbs.exe")) - return 1; - return 0; - }); - cmd.extendedDescription = FileInfo.joinPaths( - product.moduleProperty("Qt.core", "binPath"), "windeployqt") + ".exe " + - ["--json"].concat(cmd.windeployqtArgs).concat(cmd.binaryFilePaths).join(" "); - cmd.sourceCode = function () { - var out; - var process; - try { - process = new Process(); - process.exec(FileInfo.joinPaths(product.moduleProperty("Qt.core", "binPath"), - "windeployqt"), ["--json"] - .concat(windeployqtArgs).concat(binaryFilePaths), true); - out = process.readStdOut(); - } finally { - if (process) - process.close(); - } - - var tf; - try { - tf = new TextFile(outputFilePath, TextFile.WriteOnly); - tf.write(out); - } finally { - if (tf) - tf.close(); - } - }; - return [cmd]; - } - } - - Rule { - multiplex: true - inputs: ["dependencies.json", "installable"] + inputs: ["installable"] inputsFromDependencies: ["installable"] Artifact { @@ -140,46 +66,13 @@ QbsProduct { cmd.outputFilePath = output.filePath; cmd.baseDirectory = product.moduleProperty("archiver", "workingDirectory"); cmd.sourceCode = function() { - var tf; - for (var i = 0; i < (inputs["dependencies.json"] || []).length; ++i) { - try { - tf = new TextFile(inputs["dependencies.json"][i].filePath, - TextFile.ReadOnly); - inputFilePaths = inputFilePaths.concat( - JSON.parse(tf.readAll())["files"].map(function (obj) { - return FileInfo.joinPaths( - FileInfo.fromWindowsSeparators(obj.target), - FileInfo.fileName( - FileInfo.fromWindowsSeparators( - obj.source))); - })); - } finally { - if (tf) - tf.close(); - } - } - inputFilePaths.sort(); - + var tf; try { tf = new TextFile(outputFilePath, TextFile.ReadWrite); for (var i = 0; i < inputFilePaths.length; ++i) { - var ignore = false; var relativePath = FileInfo.relativePath(baseDirectory, inputFilePaths[i]); - for (var j = 0; j < excludedPathPrefixes.length; ++j) { - if (relativePath.startsWith(excludedPathPrefixes[j])) { - ignore = true; - break; - } - } - - // QTBUG-65916 - var fileName = FileInfo.fileName(inputFilePaths[i]); - if (fileName.endsWith(".qm") && !fileName.startsWith("qt_")) - ignore = true; - - if (!ignore) - tf.writeLine(relativePath); + tf.writeLine(relativePath); } } finally { if (tf) |