FileInfo.executableSuffix() available only since qbs 1.23.

This commit is contained in:
Roman Telezhynskyi 2023-02-15 11:25:35 +02:00
parent c8cee2f47f
commit 75e3e5b7b8
4 changed files with 5 additions and 1 deletions

View File

@ -216,7 +216,8 @@ Module {
configure: {
var qmakeProcess = new Process();
try {
var suffix = FileInfo.executableSuffix();
// 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);
qmakeProcess.exec(qmakePath, ["-query"]);
if (qmakeProcess.exitCode() !== 0) {

View File

@ -161,6 +161,7 @@ VToolApp {
Depends { name: "cpp" }
cpp.defines: {
var defines = [];
// TODO: If minimal qbs version is 1.23 replace with FileInfo.executableSuffix()
var extension = qbs.targetOS.contains("windows") ? ".exe" : "";
defines.push('PUZZLE_BUILDDIR="' + FileInfo.joinPaths(exportingProduct.buildDirectory, exportingProduct.targetName + extension) +'"');
return defines;

View File

@ -86,6 +86,7 @@ VToolApp {
Depends { name: "cpp" }
cpp.defines: {
var defines = [];
// TODO: If minimal qbs version is 1.23 replace with FileInfo.executableSuffix(
var extension = qbs.targetOS.contains("windows") ? ".exe" : "";
defines.push('TAPE_BUILDDIR="' + FileInfo.joinPaths(exportingProduct.buildDirectory, exportingProduct.targetName + extension) +'"');
return defines;

View File

@ -154,6 +154,7 @@ VToolApp {
Depends { name: "cpp" }
cpp.defines: {
var defines = [];
// TODO: If minimal qbs version is 1.23 replace with FileInfo.executableSuffix(
var extension = qbs.targetOS.contains("windows") ? ".exe" : "";
defines.push('VALENTINA_BUILDDIR="' + FileInfo.joinPaths(exportingProduct.buildDirectory, exportingProduct.targetName + extension) +'"');
defines.push('TRANSLATIONS_DIR="' + FileInfo.joinPaths(exportingProduct.buildDirectory, 'translations') +'"');