diff options
author | Jake Petroules <jake.petroules@petroules.com> | 2015-08-05 15:55:42 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@petroules.com> | 2015-08-06 07:38:53 +0000 |
commit | e9023dd3c90fdbce31438c6228689bfbd6b0dadb (patch) | |
tree | b914c4a1dbf032a9ae04c8d724dbfa95fd613008 | |
parent | 1a5707e6fb7bedaff83ac5db088c343afce155ff (diff) | |
download | qbs-e9023dd3c90fdbce31438c6228689bfbd6b0dadb.tar.gz |
Fix/improve probing of node.js on Windows.
"Fix" by adding the .exe extension, and "improve" by adding the standard
install locations to the search path if node.exe is not in the PATH.
Change-Id: Icff5f1d733a663737e9d5fbddaa00b72d8d3620c
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
-rw-r--r-- | share/qbs/imports/qbs/Probes/NodeJsProbe.qbs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/share/qbs/imports/qbs/Probes/NodeJsProbe.qbs b/share/qbs/imports/qbs/Probes/NodeJsProbe.qbs index db648fab4..cc2287a21 100644 --- a/share/qbs/imports/qbs/Probes/NodeJsProbe.qbs +++ b/share/qbs/imports/qbs/Probes/NodeJsProbe.qbs @@ -29,7 +29,12 @@ ****************************************************************************/ import qbs +import qbs.FileInfo BinaryProbe { - names: ["nodejs", "node"] + names: ["nodejs", "node" + (qbs.hostOS.contains("windows") ? ".exe" : "")] + platformPaths: base.concat(qbs.hostOS.contains("windows") + ? [FileInfo.joinPaths(qbs.getEnv("PROGRAMFILES"), "nodejs"), + FileInfo.joinPaths(qbs.getEnv("PROGRAMFILES(X86)"), "nodejs")] + : []) } |