qbs.targetOS is not available in this place need to use a property.

This commit is contained in:
Roman Telezhynskyi 2023-02-15 14:22:14 +02:00
parent d6dd3de8f1
commit 7a10fe8d80

View file

@ -211,14 +211,15 @@ Module {
readonly property string binPath: product.Qt.core.binPath
// TODO: If minimal qbs version is 1.23 replace with FileInfo.executableSuffix()
readonly property string executableSuffix: product.qbs.targetOS.contains("windows") ? ".exe" : ""
property string qtTranslationsPath
configure: {
var qmakeProcess = new Process();
try {
// TODO: If minimal qbs version is 1.23 replace with FileInfo.executableSuffix()
var suffix = qbs.targetOS.contains("windows") ? ".exe" : "";
var qmakePath = FileInfo.joinPaths(binPath, "qmake" + suffix);
var qmakePath = FileInfo.joinPaths(binPath, "qmake" + executableSuffix);
qmakeProcess.exec(qmakePath, ["-query"]);
if (qmakeProcess.exitCode() !== 0) {
throw "The qmake executable '" + FileInfo.toNativeSeparators(qmakePath) + "' failed with exit code " +