aboutsummaryrefslogtreecommitdiffstats
path: root/dist
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2016-06-15 02:18:24 -0700
committerJake Petroules <jake.petroules@qt.io>2016-06-16 11:50:19 +0000
commit071e04c18f1218a01a88f0dffe8be83301f74f7a (patch)
tree93f8e676e090b86a6d205f7670015d985f586b6b /dist
parentded5fe2c0cb9489f4201d8468d8a4a21e972b903 (diff)
Generate a proper install tree for the dist target.
Now adds Incredibuild files and Windows import libraries, and removes some unnecessary files which bloat the distribution. Change-Id: I5ec15b0bc5ae29fa1f6a5ecca314fc083756eb17 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'dist')
-rw-r--r--dist/dist.qbs39
1 files changed, 36 insertions, 3 deletions
diff --git a/dist/dist.qbs b/dist/dist.qbs
index 3278cd2c3..94f25fbce 100644
--- a/dist/dist.qbs
+++ b/dist/dist.qbs
@@ -23,6 +23,23 @@ Product {
Depends { name: "archiver" }
Depends { name: "Qt.core" }
+ property stringList windeployqtArgs: [
+ "--no-svg",
+ "--no-system-d3d-compiler",
+ "--no-angle",
+ "--no-opengl-sw",
+ "--no-compiler-runtime",
+ ]
+
+ // List of path prefixes to be excluded from the generated archive
+ property stringList excludedPathPrefixes: [
+ "bin/icudt",
+ "bin/icuin",
+ "bin/icuuc",
+ "bin/iconengines/",
+ "bin/imageformats/",
+ ]
+
condition: qbs.targetOS.contains("windows")
builtByDefault: false
type: ["archiver.archive"]
@@ -46,10 +63,14 @@ Product {
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.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;
@@ -57,7 +78,7 @@ Product {
process = new Process();
process.exec(FileInfo.joinPaths(product.moduleProperty("Qt.core", "binPath"),
"windeployqt"), ["--json"]
- .concat(binaryFilePaths), true);
+ .concat(windeployqtArgs).concat(binaryFilePaths), true);
out = process.readStdOut();
} finally {
if (process)
@@ -90,6 +111,7 @@ Product {
prepare: {
var cmd = new JavaScriptCommand();
cmd.silent = true;
+ cmd.excludedPathPrefixes = product.excludedPathPrefixes;
cmd.inputFilePaths = inputs.installable.map(function(a) {
return ModUtils.artifactInstalledFilePath(a);
});
@@ -119,8 +141,19 @@ Product {
try {
tf = new TextFile(outputFilePath, TextFile.ReadWrite);
- for (var i = 0; i < inputFilePaths.length; ++i)
- tf.writeLine(FileInfo.relativePath(installRoot, inputFilePaths[i]));
+ for (var i = 0; i < inputFilePaths.length; ++i) {
+ var ignore = false;
+ var relativePath = FileInfo.relativePath(installRoot, inputFilePaths[i]);
+ for (var j = 0; j < excludedPathPrefixes.length; ++j) {
+ if (relativePath.startsWith(excludedPathPrefixes[j])) {
+ ignore = true;
+ break;
+ }
+ }
+
+ if (!ignore)
+ tf.writeLine(relativePath);
+ }
} finally {
if (tf)
tf.close();