diff options
author | Raphael Cotty <raphael.cotty@gmail.com> | 2022-02-23 10:56:25 +0100 |
---|---|---|
committer | Raphaƫl Cotty <raphael.cotty@gmail.com> | 2022-08-08 14:12:30 +0000 |
commit | 4c47fbfb0812fc1ce90fd26411382e3c3bb7f839 (patch) | |
tree | d5ecfa7411d57604440d3152bbd5db9b66b47d33 /share/qbs/modules | |
parent | 410663de171a2db695bd17075042ee8a7372a890 (diff) |
Add executableSuffix to the FileInfo service
Change-Id: I86c24c6ad1ea0daf298b71501a6719c8b2650c1c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share/qbs/modules')
-rw-r--r-- | share/qbs/modules/cpp/CppModule.qbs | 4 | ||||
-rw-r--r-- | share/qbs/modules/typescript/TypeScriptModule.qbs | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/share/qbs/modules/cpp/CppModule.qbs b/share/qbs/modules/cpp/CppModule.qbs index 038de8617..bd1eaa242 100644 --- a/share/qbs/modules/cpp/CppModule.qbs +++ b/share/qbs/modules/cpp/CppModule.qbs @@ -29,7 +29,7 @@ ****************************************************************************/ // base for Cpp modules -import qbs.Host +import qbs.FileInfo import qbs.ModUtils import qbs.Utilities import qbs.WindowsUtils @@ -217,7 +217,7 @@ Module { property stringList knownArchitectures: [] property var toolchainDetails - property string compilerExtension: Host.os().contains("windows") ? ".exe" : "" + property string compilerExtension: FileInfo.executableSuffix() property string linkerMode: "automatic" PropertyOptions { diff --git a/share/qbs/modules/typescript/TypeScriptModule.qbs b/share/qbs/modules/typescript/TypeScriptModule.qbs index c8ca270e0..76df529c2 100644 --- a/share/qbs/modules/typescript/TypeScriptModule.qbs +++ b/share/qbs/modules/typescript/TypeScriptModule.qbs @@ -30,7 +30,6 @@ import qbs.File import qbs.FileInfo -import qbs.Host import qbs.ModUtils import qbs.Probes import qbs.Process @@ -130,7 +129,7 @@ Module { var preValidator = new ModUtils.PropertyValidator("nodejs"); preValidator.addCustomValidator("interpreterFileName", nodejs.interpreterFileName, function (value) { - return value === "node" + (Host.os().contains("windows") ? ".exe" : ""); + return value === "node" + FileInfo.executableSuffix(); }, interpreterMessage); preValidator.addCustomValidator("interpreterFilePath", nodejs.interpreterFilePath, function (value) { return value.endsWith(nodejs.interpreterFileName); |