Optimize preparing pdftops tool.
This commit is contained in:
parent
3af79ccfcc
commit
e05527d7ea
|
@ -40,16 +40,6 @@ CppApplication {
|
|||
cpp.cxxLanguageVersion: "c++17"
|
||||
}
|
||||
|
||||
Group {
|
||||
condition: qbs.targetOS.contains("windows") && (qbs.architecture.contains("x86_64") || qbs.architecture.contains("x86"))
|
||||
name: "pdftops"
|
||||
prefix: FileInfo.joinPaths(project.sourceDirectory, "dist", "win", FileInfo.pathSeparator())
|
||||
files: ["pdftops.exe"]
|
||||
fileTags: ["pdftops_dist"]
|
||||
qbs.install: true
|
||||
qbs.installDir: buildconfig.installBinaryPath
|
||||
}
|
||||
|
||||
Group {
|
||||
// See question on StackOwerflow "QSslSocket error when SSL is NOT used" (http://stackoverflow.com/a/31277055/3045403)
|
||||
// Copy of answer:
|
||||
|
@ -103,16 +93,13 @@ CppApplication {
|
|||
multiplex: true
|
||||
alwaysRun: true
|
||||
condition: qbs.targetOS.contains("windows") && (qbs.architecture.contains("x86_64") || qbs.architecture.contains("x86"))
|
||||
inputs: ["openssl_dist", "pdftops_dist"]
|
||||
inputs: ["openssl_dist"]
|
||||
outputFileTags: ["testSuit"]
|
||||
outputArtifacts: {
|
||||
var artifactNames = inputs["openssl_dist"].map(function(file){
|
||||
return FileInfo.joinPaths(product.buildDirectory, file.fileName);
|
||||
});
|
||||
|
||||
artifactNames = artifactNames.concat(inputs["pdftops_dist"].map(function(file){
|
||||
return FileInfo.joinPaths(product.buildDirectory, file.fileName);
|
||||
}));
|
||||
var artifacts = artifactNames.map(function(art){
|
||||
var a = {
|
||||
filePath: art,
|
||||
|
@ -130,10 +117,6 @@ CppApplication {
|
|||
return artifact.filePath;
|
||||
});
|
||||
|
||||
sources = sources.concat(inputs["pdftops_dist"].map(function(artifact) {
|
||||
return artifact.filePath;
|
||||
}));
|
||||
|
||||
cmd.sources = sources;
|
||||
cmd.destination = outputs["testSuit"].map(function(artifact) {
|
||||
return artifact.filePath;
|
||||
|
|
|
@ -171,4 +171,110 @@ VApp {
|
|||
return defines;
|
||||
}
|
||||
}
|
||||
|
||||
Group {
|
||||
condition: qbs.targetOS.contains("windows") && (qbs.architecture.contains("x86_64") || qbs.architecture.contains("x86"))
|
||||
name: "pdftops Windows"
|
||||
prefix: FileInfo.joinPaths(project.sourceDirectory, "dist", "win", FileInfo.pathSeparator())
|
||||
files: ["pdftops.exe"]
|
||||
fileTags: ["pdftops_dist_win"]
|
||||
qbs.install: true
|
||||
qbs.installDir: buildconfig.installBinaryPath
|
||||
}
|
||||
|
||||
Rule {
|
||||
multiplex: true
|
||||
alwaysRun: true
|
||||
condition: qbs.targetOS.contains("windows") && (qbs.architecture.contains("x86_64") || qbs.architecture.contains("x86"))
|
||||
inputs: ["pdftops_dist_win"]
|
||||
outputFileTags: ["testSuit"]
|
||||
outputArtifacts: {
|
||||
var artifactNames = inputs["pdftops_dist_win"].map(function(file){
|
||||
return FileInfo.joinPaths(product.buildDirectory, file.fileName);
|
||||
});
|
||||
|
||||
var artifacts = artifactNames.map(function(art){
|
||||
var a = {
|
||||
filePath: art,
|
||||
fileTags: ["testSuit"]
|
||||
}
|
||||
return a;
|
||||
});
|
||||
return artifacts;
|
||||
}
|
||||
prepare: {
|
||||
var cmd = new JavaScriptCommand();
|
||||
cmd.description = "Preparing test suit";
|
||||
|
||||
var sources = inputs["pdftops_dist_win"].map(function(artifact) {
|
||||
return artifact.filePath;
|
||||
});
|
||||
|
||||
cmd.sources = sources;
|
||||
|
||||
var destination = inputs["pdftops_dist_win"].map(function(artifact) {
|
||||
return FileInfo.joinPaths(product.buildDirectory, file.fileName);
|
||||
});
|
||||
cmd.destination = destination;
|
||||
cmd.sourceCode = function() {
|
||||
for (var i in sources) {
|
||||
File.copy(sources[i], destination[i]);
|
||||
}
|
||||
};
|
||||
return [cmd];
|
||||
}
|
||||
}
|
||||
|
||||
Group {
|
||||
condition: qbs.targetOS.contains("macos") && qbs.architecture.contains("x86_64")
|
||||
name: "pdftops MacOS"
|
||||
prefix: FileInfo.joinPaths(project.sourceDirectory, "dist", "macx", "bin64", FileInfo.pathSeparator())
|
||||
files: ["pdftops"]
|
||||
fileTags: ["pdftops_dist_macx"]
|
||||
qbs.install: true
|
||||
qbs.installDir: buildconfig.installBinaryPath
|
||||
}
|
||||
|
||||
Rule {
|
||||
multiplex: true
|
||||
alwaysRun: true
|
||||
condition: qbs.targetOS.contains("windows") && qbs.architecture.contains("x86_64") && qbs.buildVariant === "debug"
|
||||
inputs: ["pdftops_dist_macx"]
|
||||
outputFileTags: ["testSuit"]
|
||||
outputArtifacts: {
|
||||
var artifactNames = inputs["pdftops_dist_macx"].map(function(file){
|
||||
return FileInfo.joinPaths(product.buildDirectory, file.fileName);
|
||||
});
|
||||
|
||||
var artifacts = artifactNames.map(function(art){
|
||||
var a = {
|
||||
filePath: art,
|
||||
fileTags: ["testSuit"]
|
||||
}
|
||||
return a;
|
||||
});
|
||||
return artifacts;
|
||||
}
|
||||
prepare: {
|
||||
var cmd = new JavaScriptCommand();
|
||||
cmd.description = "Preparing test suit";
|
||||
|
||||
var sources = inputs["pdftops_dist_macx"].map(function(artifact) {
|
||||
return artifact.filePath;
|
||||
});
|
||||
|
||||
cmd.sources = sources;
|
||||
|
||||
var destination = inputs["pdftops_dist_macx"].map(function(artifact) {
|
||||
return FileInfo.joinPaths(product.buildDirectory, file.fileName);
|
||||
});
|
||||
cmd.destination = destination;
|
||||
cmd.sourceCode = function() {
|
||||
for (var i in sources) {
|
||||
File.copy(sources[i], destination[i]);
|
||||
}
|
||||
};
|
||||
return [cmd];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -294,4 +294,110 @@ VApp {
|
|||
qbs.install: true
|
||||
qbs.installDir: buildconfig.installDataPath + FileInfo.pathSeparator() + "tables" + FileInfo.pathSeparator() + "templates"
|
||||
}
|
||||
|
||||
Group {
|
||||
condition: qbs.targetOS.contains("windows") && (qbs.architecture.contains("x86_64") || qbs.architecture.contains("x86"))
|
||||
name: "pdftops Windows"
|
||||
prefix: FileInfo.joinPaths(project.sourceDirectory, "dist", "win", FileInfo.pathSeparator())
|
||||
files: ["pdftops.exe"]
|
||||
fileTags: ["pdftops_dist_win"]
|
||||
qbs.install: true
|
||||
qbs.installDir: buildconfig.installBinaryPath
|
||||
}
|
||||
|
||||
Rule {
|
||||
multiplex: true
|
||||
alwaysRun: true
|
||||
condition: qbs.targetOS.contains("windows") && (qbs.architecture.contains("x86_64") || qbs.architecture.contains("x86"))
|
||||
inputs: ["pdftops_dist_win"]
|
||||
outputFileTags: ["testSuit"]
|
||||
outputArtifacts: {
|
||||
var artifactNames = inputs["pdftops_dist_win"].map(function(file){
|
||||
return FileInfo.joinPaths(product.buildDirectory, file.fileName);
|
||||
});
|
||||
|
||||
var artifacts = artifactNames.map(function(art){
|
||||
var a = {
|
||||
filePath: art,
|
||||
fileTags: ["testSuit"]
|
||||
}
|
||||
return a;
|
||||
});
|
||||
return artifacts;
|
||||
}
|
||||
prepare: {
|
||||
var cmd = new JavaScriptCommand();
|
||||
cmd.description = "Preparing test suit";
|
||||
|
||||
var sources = inputs["pdftops_dist_win"].map(function(artifact) {
|
||||
return artifact.filePath;
|
||||
});
|
||||
|
||||
cmd.sources = sources;
|
||||
|
||||
var destination = inputs["pdftops_dist_win"].map(function(artifact) {
|
||||
return FileInfo.joinPaths(product.buildDirectory, file.fileName);
|
||||
});
|
||||
cmd.destination = destination;
|
||||
cmd.sourceCode = function() {
|
||||
for (var i in sources) {
|
||||
File.copy(sources[i], destination[i]);
|
||||
}
|
||||
};
|
||||
return [cmd];
|
||||
}
|
||||
}
|
||||
|
||||
Group {
|
||||
condition: qbs.targetOS.contains("macos") && qbs.architecture.contains("x86_64")
|
||||
name: "pdftops MacOS"
|
||||
prefix: FileInfo.joinPaths(project.sourceDirectory, "dist", "macx", "bin64", FileInfo.pathSeparator())
|
||||
files: ["pdftops"]
|
||||
fileTags: ["pdftops_dist_macx"]
|
||||
qbs.install: true
|
||||
qbs.installDir: buildconfig.installBinaryPath
|
||||
}
|
||||
|
||||
Rule {
|
||||
multiplex: true
|
||||
alwaysRun: true
|
||||
condition: qbs.targetOS.contains("windows") && qbs.architecture.contains("x86_64") && qbs.buildVariant === "debug"
|
||||
inputs: ["pdftops_dist_macx"]
|
||||
outputFileTags: ["testSuit"]
|
||||
outputArtifacts: {
|
||||
var artifactNames = inputs["pdftops_dist_macx"].map(function(file){
|
||||
return FileInfo.joinPaths(product.buildDirectory, file.fileName);
|
||||
});
|
||||
|
||||
var artifacts = artifactNames.map(function(art){
|
||||
var a = {
|
||||
filePath: art,
|
||||
fileTags: ["testSuit"]
|
||||
}
|
||||
return a;
|
||||
});
|
||||
return artifacts;
|
||||
}
|
||||
prepare: {
|
||||
var cmd = new JavaScriptCommand();
|
||||
cmd.description = "Preparing test suit";
|
||||
|
||||
var sources = inputs["pdftops_dist_macx"].map(function(artifact) {
|
||||
return artifact.filePath;
|
||||
});
|
||||
|
||||
cmd.sources = sources;
|
||||
|
||||
var destination = inputs["pdftops_dist_macx"].map(function(artifact) {
|
||||
return FileInfo.joinPaths(product.buildDirectory, file.fileName);
|
||||
});
|
||||
cmd.destination = destination;
|
||||
cmd.sourceCode = function() {
|
||||
for (var i in sources) {
|
||||
File.copy(sources[i], destination[i]);
|
||||
}
|
||||
};
|
||||
return [cmd];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user