summaryrefslogtreecommitdiff
path: root/share/qbs
diff options
context:
space:
mode:
Diffstat (limited to 'share/qbs')
-rw-r--r--share/qbs/modules/codesign/codesign.js19
-rw-r--r--share/qbs/modules/codesign/signtool.qbs7
-rw-r--r--share/qbs/modules/cpp/keil.js26
3 files changed, 35 insertions, 17 deletions
diff --git a/share/qbs/modules/codesign/codesign.js b/share/qbs/modules/codesign/codesign.js
index 5aa303c9c..463e7cbb7 100644
--- a/share/qbs/modules/codesign/codesign.js
+++ b/share/qbs/modules/codesign/codesign.js
@@ -301,16 +301,14 @@ function prepareSign(project, product, inputs, outputs, input, output) {
// If this is a framework, we need to sign its versioned directory
var subpath = "";
if (isBundle) {
- var frameworkVersion = product.bundle.frameworkVersion;
- if (frameworkVersion) {
+ var isFramework = product.bundle.packageType === "FMWK";
+ if (isFramework) {
subpath = product.bundle.contentsFolderPath;
subpath = subpath.substring(product.bundle.bundleName.length);
}
}
- var args = product.codesign.codesignFlags || [];
- args.push("--force");
- args.push("--sign", actualSigningIdentity.SHA1);
+ var args = ["--force", "--sign", actualSigningIdentity.SHA1];
// If signingTimestamp is undefined or empty, do not specify the flag at all -
// this uses the system-specific default behavior
@@ -328,6 +326,9 @@ function prepareSign(project, product, inputs, outputs, input, output) {
args.push("--entitlements", inputs["codesign.xcent"][j].filePath);
break; // there should only be one
}
+
+ args = args.concat(product.codesign.codesignFlags || []);
+
args.push(outputFilePath + subpath);
cmd = new Command(product.codesign.codesignPath, args);
cmd.description = "codesign " + outputFileName
@@ -425,7 +426,7 @@ function prepareSigntool(project, product, inputs, outputs, input, output) {
if (!product.codesign.enableCodeSigning)
return cmds;
- var args = ["sign"].concat(product.codesign.codesignFlags || []);
+ var args = ["sign"];
var subjectName = product.codesign.subjectName;
if (subjectName)
@@ -443,6 +444,10 @@ function prepareSigntool(project, product, inputs, outputs, input, output) {
if (signingTimestamp)
args.push("/tr", signingTimestamp);
+ var timestampAlgorithm = product.codesign.timestampAlgorithm;
+ if (timestampAlgorithm)
+ args.push("/td", timestampAlgorithm);
+
var certificatePath = product.codesign.certificatePath;
if (certificatePath)
args.push("/f", certificatePath);
@@ -455,6 +460,8 @@ function prepareSigntool(project, product, inputs, outputs, input, output) {
if (crossCertificatePath)
args.push("/ac", crossCertificatePath);
+ args = args.concat(product.codesign.codesignFlags || []);
+
var outputArtifact = outputs["codesign.signed_artifact"][0];
args.push(outputArtifact.filePath);
diff --git a/share/qbs/modules/codesign/signtool.qbs b/share/qbs/modules/codesign/signtool.qbs
index 02a2c978e..d0dda3a31 100644
--- a/share/qbs/modules/codesign/signtool.qbs
+++ b/share/qbs/modules/codesign/signtool.qbs
@@ -70,6 +70,13 @@ CodeSignModule {
allowedValues: ["sha1", "sha256", "sha384", "sha512"]
}
+ property string timestampAlgorithm
+ PropertyOptions {
+ name: "timestampAlgorithm"
+ description: "Name of the timestamp algorithm."
+ allowedValues: ["sha1", "sha256"]
+ }
+
property path certificatePath
PropertyOptions {
name: "certificatePath"
diff --git a/share/qbs/modules/cpp/keil.js b/share/qbs/modules/cpp/keil.js
index 86fbb153c..5a5e165c8 100644
--- a/share/qbs/modules/cpp/keil.js
+++ b/share/qbs/modules/cpp/keil.js
@@ -476,7 +476,7 @@ function compilerFlags(project, product, input, outputs, explicitlyDependsOn) {
args.push(input.filePath);
// Output.
- args.push("OBJECT (" + outputs.obj[0].filePath + ")");
+ args.push("OBJECT(" + FileInfo.toWindowsSeparators(outputs.obj[0].filePath) + ")");
// Defines.
var defines = Cpp.collectDefines(input);
@@ -487,7 +487,8 @@ function compilerFlags(project, product, input, outputs, explicitlyDependsOn) {
var allIncludePaths = [].concat(Cpp.collectIncludePaths(input),
Cpp.collectSystemIncludePaths(input));
if (allIncludePaths.length > 0)
- args = args.concat("INCDIR (" + allIncludePaths.join(";") + ")");
+ args = args.concat("INCDIR(" + allIncludePaths.map(function(path) {
+ return FileInfo.toWindowsSeparators(path); }).join(";") + ")");
// Debug information flags.
if (input.cpp.debugInformation)
@@ -522,7 +523,7 @@ function compilerFlags(project, product, input, outputs, explicitlyDependsOn) {
if (!input.cpp.generateCompilerListingFiles)
args.push("NOPRINT");
else
- args.push("PRINT(" + outputs.lst[0].filePath + ")");
+ args.push("PRINT(" + FileInfo.toWindowsSeparators(outputs.lst[0].filePath) + ")");
} else if (isArmArchitecture(architecture)) {
// Input.
args.push("-c", input.filePath);
@@ -690,13 +691,14 @@ function assemblerFlags(project, product, input, outputs, explicitlyDependsOn) {
args.push(input.filePath);
// Output.
- args.push("OBJECT (" + outputs.obj[0].filePath + ")");
+ args.push("OBJECT(" + FileInfo.toWindowsSeparators(outputs.obj[0].filePath) + ")");
// Includes.
var allIncludePaths = [].concat(Cpp.collectIncludePaths(input),
Cpp.collectSystemIncludePaths(input));
if (allIncludePaths.length > 0)
- args = args.concat("INCDIR (" + allIncludePaths.join(";") + ")");
+ args = args.concat("INCDIR(" + allIncludePaths.map(function(path) {
+ return FileInfo.toWindowsSeparators(path); }).join(";") + ")");
// Debug information flags.
if (input.cpp.debugInformation)
@@ -709,7 +711,7 @@ function assemblerFlags(project, product, input, outputs, explicitlyDependsOn) {
if (!input.cpp.generateAssemblerListingFiles)
args.push("NOPRINT");
else
- args.push("PRINT(" + outputs.lst[0].filePath + ")");
+ args.push("PRINT(" + FileInfo.toWindowsSeparators(outputs.lst[0].filePath) + ")");
} else if (isArmArchitecture(architecture)) {
// Input.
args.push(input.filePath);
@@ -790,16 +792,17 @@ function linkerFlags(project, product, inputs, outputs) {
// Add all input objects as arguments (application and library object files).
var allObjectPaths = collectAllObjectPathsArguments(product, inputs);
if (allObjectPaths.length > 0)
- args = args.concat(allObjectPaths.join(","));
+ args = args.concat(allObjectPaths.map(function(path) {
+ return FileInfo.toWindowsSeparators(path); }).join(","));
// Output.
- args.push("TO", outputs.application[0].filePath);
+ args.push("TO", FileInfo.toWindowsSeparators(outputs.application[0].filePath));
// Map file generation flag.
if (!product.cpp.generateLinkerMapFile)
args.push("NOPRINT");
else
- args.push("PRINT(" + outputs.mem_map[0].filePath + ")");
+ args.push("PRINT(" + FileInfo.toWindowsSeparators(outputs.mem_map[0].filePath) + ")");
} else if (isArmArchitecture(architecture)) {
// Inputs.
args = args.concat(Cpp.collectLinkerObjectPaths(inputs));
@@ -851,10 +854,11 @@ function archiverFlags(project, product, inputs, outputs) {
// Inputs.
if (objectPaths.length > 0)
- args = args.concat(objectPaths.join(","));
+ args = args.concat(objectPaths.map(function(path) {
+ return FileInfo.toWindowsSeparators(path); }).join(","));
// Output.
- args.push("TO", outputs.staticlibrary[0].filePath);
+ args.push("TO", FileInfo.toWindowsSeparators(outputs.staticlibrary[0].filePath));
} else if (isArmArchitecture(architecture)) {
// Note: The ARM archiver command line expect the output file
// first, and then a set of input objects.