aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2021-07-27 11:42:14 +0300
committerIvan Komissarov <abbapoh@gmail.com>2021-07-27 12:36:49 +0300
commit6b32f8194bb4cfc7ec54c30bdd7102ce30380e44 (patch)
treedd24b83661e3f2d08ce39ab3ab35174e790d490c
parentae1368529849bcad0d7d524ae9396c4205209322 (diff)
parentec85d5e1706dd3bead3cfaf5e09127a4798d90e2 (diff)
Merge branch '1.19' into 1.20
-rw-r--r--changelogs/changes-1.19.1.md12
-rw-r--r--changelogs/changes-1.19.2.md5
-rw-r--r--doc/reference/modules/codesign-module.qdoc16
-rw-r--r--doc/reference/modules/qbs-module.qdoc3
-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
-rw-r--r--tests/auto/blackbox/testdata-apple/codesign/codesign.qbs3
-rw-r--r--tests/auto/blackbox/testdata-windows/codesign/codesign.qbs2
-rw-r--r--tests/auto/blackbox/tst_blackboxapple.cpp3
10 files changed, 78 insertions, 18 deletions
diff --git a/changelogs/changes-1.19.1.md b/changelogs/changes-1.19.1.md
new file mode 100644
index 000000000..c4cab506f
--- /dev/null
+++ b/changelogs/changes-1.19.1.md
@@ -0,0 +1,12 @@
+# C/C++ Support
+
+* Fix system include support with MSVC >= 19.29.30037
+
+# Qt Support
+
+* Fix possible command line length issue with qmlimportscanner when cross-compiling (QBS-1633).
+
+# Apple platforms
+
+* Fix stripping debug symbols in multiplexed products when cpp.separateDebugInformation
+ is false (QBS-1647)
diff --git a/changelogs/changes-1.19.2.md b/changelogs/changes-1.19.2.md
new file mode 100644
index 000000000..8f76b5a38
--- /dev/null
+++ b/changelogs/changes-1.19.2.md
@@ -0,0 +1,5 @@
+# Important Bug Fixes
+
+* codesign: Fix checking if product is a framework (QBS-1649)
+* codesign: Add additional signing flags at end of command (QBS-1651)
+* codesign: Add new codesign.timestampAlgorithm property (QBS-1651)
diff --git a/doc/reference/modules/codesign-module.qdoc b/doc/reference/modules/codesign-module.qdoc
index d0aba4688..45e247a6a 100644
--- a/doc/reference/modules/codesign-module.qdoc
+++ b/doc/reference/modules/codesign-module.qdoc
@@ -343,6 +343,22 @@
*/
/*!
+ \qmlproperty string codesign::timestampAlgorithm
+
+ Specifies the default timestamp algorithm used together with the
+ \c signingTimestamp property. The possible values are \c sha1, \c sha256.
+
+ \note If this value is not set, then the default sha1 algorithm
+ will be used.
+
+ \since Qbs 1.19.2
+
+ \defaultvalue \c undefined
+
+ \windowsproperty
+*/
+
+/*!
\qmlproperty string codesign::certificatePath
Specifies the full path to the signing certificate file (*.pfx).
diff --git a/doc/reference/modules/qbs-module.qdoc b/doc/reference/modules/qbs-module.qdoc
index c02de65ab..82a9120cc 100644
--- a/doc/reference/modules/qbs-module.qdoc
+++ b/doc/reference/modules/qbs-module.qdoc
@@ -526,6 +526,9 @@
\li \c{"msvc"}
\li \c{["msvc"]}
\row
+ \li \c{"qcc"}
+ \li \c{["qcc"]}
+ \row
\li \c{"sdcc"}
\li \c{["sdcc"]}
\row
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.
diff --git a/tests/auto/blackbox/testdata-apple/codesign/codesign.qbs b/tests/auto/blackbox/testdata-apple/codesign/codesign.qbs
index eafb0be84..08c8f730b 100644
--- a/tests/auto/blackbox/testdata-apple/codesign/codesign.qbs
+++ b/tests/auto/blackbox/testdata-apple/codesign/codesign.qbs
@@ -9,6 +9,7 @@ Project {
CppApplication {
name: "A"
+ version: "1.0.0"
bundle.isBundle: project.isBundle
files: "app.cpp"
codesign.enableCodeSigning: project.enableSigning
@@ -23,6 +24,7 @@ Project {
DynamicLibrary {
Depends { name: "cpp" }
name: "B"
+ version: "1.0.0"
bundle.isBundle: project.isBundle
files: "app.cpp"
codesign.enableCodeSigning: project.enableSigning
@@ -36,6 +38,7 @@ Project {
LoadableModule {
Depends { name: "cpp" }
name: "C"
+ version: "1.0.0"
bundle.isBundle: project.isBundle
files: "app.cpp"
codesign.enableCodeSigning: project.enableSigning
diff --git a/tests/auto/blackbox/testdata-windows/codesign/codesign.qbs b/tests/auto/blackbox/testdata-windows/codesign/codesign.qbs
index ef6447ab7..f9f49e636 100644
--- a/tests/auto/blackbox/testdata-windows/codesign/codesign.qbs
+++ b/tests/auto/blackbox/testdata-windows/codesign/codesign.qbs
@@ -14,6 +14,7 @@ Project {
codesign.hashAlgorithm: project.hashAlgorithm
codesign.subjectName: project.subjectName
codesign.signingTimestamp: project.signingTimestamp
+ codesign.timestampAlgorithm: "sha256"
install: true
installDir: ""
property bool dummy: {
@@ -31,6 +32,7 @@ Project {
codesign.hashAlgorithm: project.hashAlgorithm
codesign.subjectName: project.subjectName
codesign.signingTimestamp: project.signingTimestamp
+ codesign.timestampAlgorithm: "sha256"
install: true
installDir: ""
property bool dummy: {
diff --git a/tests/auto/blackbox/tst_blackboxapple.cpp b/tests/auto/blackbox/tst_blackboxapple.cpp
index 8fdca3836..2744f907e 100644
--- a/tests/auto/blackbox/tst_blackboxapple.cpp
+++ b/tests/auto/blackbox/tst_blackboxapple.cpp
@@ -751,7 +751,8 @@ void TestBlackboxApple::codesign()
QCOMPARE(codeSignInfo.second.value(QByteArrayLiteral("Signature")), "adhoc");
}
- const auto libName = isBundle ? QStringLiteral("B.framework") : QStringLiteral("libB.dylib");
+ const auto libName =
+ isBundle ? QStringLiteral("B.framework") : QStringLiteral("libB.1.0.0.dylib");
const auto libPath = defaultInstallRoot + "/" + libName;
QVERIFY(QFileInfo(libPath).exists());
codeSignInfo = getCodeSignInfo(libPath);