aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2021-06-18 16:41:37 +0200
committerMitch Curtis <mitch.curtis@qt.io>2021-06-28 10:18:04 +0000
commit1e518097fa5ad72ccca9b1e47432501857cf77fc (patch)
tree6b009eb3177fe9ab1ecdd9d872b53e466a0b38ed /share
parent2a745bf0ff79c2a949d2ae4bd95c84e7f00ab302 (diff)
Account for more QML-related binaries being in libexec
This amends b69b569ff43299dec625d573b08fec642039afea. Task-number: QBS-1636 Change-Id: I9d113d735ad0f9d4e517a675d9af9d3f0a25b802 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share')
-rw-r--r--share/qbs/module-providers/Qt/setup-qt.js7
-rw-r--r--share/qbs/module-providers/Qt/templates/core.qbs3
-rw-r--r--share/qbs/module-providers/Qt/templates/qml.qbs2
-rw-r--r--share/qbs/module-providers/Qt/templates/qmlcache.qbs2
4 files changed, 10 insertions, 4 deletions
diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js
index 7785bc5dc..060ea7a0a 100644
--- a/share/qbs/module-providers/Qt/setup-qt.js
+++ b/share/qbs/module-providers/Qt/setup-qt.js
@@ -273,6 +273,10 @@ function getQtProperties(qmakeFilePath, qbs) {
|| pathQueryValue(queryResult, "QT_INSTALL_LIBEXECS");
}
+ // QML tools were only moved in Qt 6.2.
+ qtProps.qmlLibExecPath = Utilities.versionCompare(qtProps.qtVersion, "6.2") >= 0
+ ? qtProps.libExecPath : qtProps.binaryPath
+
if (!File.exists(qtProps.mkspecBasePath))
throw "Cannot extract the mkspecs directory.";
@@ -1355,6 +1359,7 @@ function replaceSpecialValues(content, module, qtProps, abi) {
installPath: ModUtils.toJSLiteral(qtProps.installPath),
libPath: ModUtils.toJSLiteral(qtProps.libraryPath),
libExecPath: ModUtils.toJSLiteral(qtProps.libExecPath),
+ qmlLibExecPath: ModUtils.toJSLiteral(qtProps.qmlLibExecPath),
pluginPath: ModUtils.toJSLiteral(qtProps.pluginPath),
incPath: ModUtils.toJSLiteral(qtProps.includePath),
docPath: ModUtils.toJSLiteral(qtProps.documentationPath),
@@ -1572,7 +1577,7 @@ function setupOneQt(qmakeFilePath, outputBaseDir, uniquify, location, qbs) {
copyTemplateFile("qml.js", qbsQtModuleDir, qtProps, androidAbis[a], location,
allFiles);
var qmlcacheStr = "qmlcache";
- if (File.exists(FileInfo.joinPaths(qtProps.binaryPath,
+ if (File.exists(FileInfo.joinPaths(qtProps.qmlLibExecPath,
"qmlcachegen" + exeSuffix(qbs)))) {
copyTemplateFile(qmlcacheStr + ".qbs",
FileInfo.joinPaths(qbsQtModuleBaseDir, qmlcacheStr), qtProps,
diff --git a/share/qbs/module-providers/Qt/templates/core.qbs b/share/qbs/module-providers/Qt/templates/core.qbs
index 2e810eeed..e34274cfd 100644
--- a/share/qbs/module-providers/Qt/templates/core.qbs
+++ b/share/qbs/module-providers/Qt/templates/core.qbs
@@ -30,7 +30,7 @@ Module {
// depend on qml. That's why the scannerName must be defined here and not in the
// qml module
property string qmlImportScannerName: "qmlimportscanner"
- property string qmlImportScannerFilePath: binPath + '/' + qmlImportScannerName
+ property string qmlImportScannerFilePath: qmlLibExecPath + '/' + qmlImportScannerName
version: @version@
property stringList architectures: @archs@
@@ -43,6 +43,7 @@ Module {
property path incPath: @incPath@
property path libPath: @libPath@
property path libExecPath: @libExecPath@
+ property path qmlLibExecPath: @qmlLibExecPath@
property path pluginPath: @pluginPath@
property string mkspecName: @mkspecName@
property path mkspecPath: @mkspecPath@
diff --git a/share/qbs/module-providers/Qt/templates/qml.qbs b/share/qbs/module-providers/Qt/templates/qml.qbs
index 104e6848f..9b4dfa36c 100644
--- a/share/qbs/module-providers/Qt/templates/qml.qbs
+++ b/share/qbs/module-providers/Qt/templates/qml.qbs
@@ -107,7 +107,7 @@ QtModule {
args.push("--foreign-types=" + foreignTypes.join(","));
args.push("-o", outputs.cpp[0].filePath);
args = args.concat(inputs["qt.core.metatypes"].map(filePathFromArtifact));
- var cmd = new Command(product.Qt.core.binPath + "/qmltyperegistrar", args);
+ var cmd = new Command(product.Qt.core.qmlLibExecPath + "/qmltyperegistrar", args);
cmd.description = "running qmltyperegistrar";
cmd.highlight = "codegen";
return cmd;
diff --git a/share/qbs/module-providers/Qt/templates/qmlcache.qbs b/share/qbs/module-providers/Qt/templates/qmlcache.qbs
index 9111eb500..38338d106 100644
--- a/share/qbs/module-providers/Qt/templates/qmlcache.qbs
+++ b/share/qbs/module-providers/Qt/templates/qmlcache.qbs
@@ -9,7 +9,7 @@ Module {
if (!qmlcachegenProbe.found)
throw "qmlcachegen unsupported for this target";
}
- property string qmlCacheGenPath: FileInfo.joinPaths(Qt.core.binPath, "qmlcachegen")
+ property string qmlCacheGenPath: FileInfo.joinPaths(Qt.core.qmlLibExecPath, "qmlcachegen")
+ (qbs.hostOS.contains("windows") ? ".exe" : "")
property bool supportsAllArchitectures: Utilities.versionCompare(Qt.core.version, "5.11") >= 0
property string installDir