Optimize preparing pdftops tool.
This commit is contained in:
parent
3af79ccfcc
commit
e05527d7ea
|
@ -40,16 +40,6 @@ CppApplication {
|
||||||
cpp.cxxLanguageVersion: "c++17"
|
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 {
|
Group {
|
||||||
// See question on StackOwerflow "QSslSocket error when SSL is NOT used" (http://stackoverflow.com/a/31277055/3045403)
|
// See question on StackOwerflow "QSslSocket error when SSL is NOT used" (http://stackoverflow.com/a/31277055/3045403)
|
||||||
// Copy of answer:
|
// Copy of answer:
|
||||||
|
@ -103,16 +93,13 @@ CppApplication {
|
||||||
multiplex: true
|
multiplex: true
|
||||||
alwaysRun: true
|
alwaysRun: true
|
||||||
condition: qbs.targetOS.contains("windows") && (qbs.architecture.contains("x86_64") || qbs.architecture.contains("x86"))
|
condition: qbs.targetOS.contains("windows") && (qbs.architecture.contains("x86_64") || qbs.architecture.contains("x86"))
|
||||||
inputs: ["openssl_dist", "pdftops_dist"]
|
inputs: ["openssl_dist"]
|
||||||
outputFileTags: ["testSuit"]
|
outputFileTags: ["testSuit"]
|
||||||
outputArtifacts: {
|
outputArtifacts: {
|
||||||
var artifactNames = inputs["openssl_dist"].map(function(file){
|
var artifactNames = inputs["openssl_dist"].map(function(file){
|
||||||
return FileInfo.joinPaths(product.buildDirectory, file.fileName);
|
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 artifacts = artifactNames.map(function(art){
|
||||||
var a = {
|
var a = {
|
||||||
filePath: art,
|
filePath: art,
|
||||||
|
@ -130,10 +117,6 @@ CppApplication {
|
||||||
return artifact.filePath;
|
return artifact.filePath;
|
||||||
});
|
});
|
||||||
|
|
||||||
sources = sources.concat(inputs["pdftops_dist"].map(function(artifact) {
|
|
||||||
return artifact.filePath;
|
|
||||||
}));
|
|
||||||
|
|
||||||
cmd.sources = sources;
|
cmd.sources = sources;
|
||||||
cmd.destination = outputs["testSuit"].map(function(artifact) {
|
cmd.destination = outputs["testSuit"].map(function(artifact) {
|
||||||
return artifact.filePath;
|
return artifact.filePath;
|
||||||
|
|
|
@ -171,4 +171,110 @@ VApp {
|
||||||
return defines;
|
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.install: true
|
||||||
qbs.installDir: buildconfig.installDataPath + FileInfo.pathSeparator() + "tables" + FileInfo.pathSeparator() + "templates"
|
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