aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/imports/qbs/Probes/NodeJsProbe.qbs
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2015-08-05 15:55:42 -0700
committerJake Petroules <jake.petroules@petroules.com>2015-08-06 07:38:53 +0000
commite9023dd3c90fdbce31438c6228689bfbd6b0dadb (patch)
treeb914c4a1dbf032a9ae04c8d724dbfa95fd613008 /share/qbs/imports/qbs/Probes/NodeJsProbe.qbs
parent1a5707e6fb7bedaff83ac5db088c343afce155ff (diff)
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>
Diffstat (limited to 'share/qbs/imports/qbs/Probes/NodeJsProbe.qbs')
-rw-r--r--share/qbs/imports/qbs/Probes/NodeJsProbe.qbs7
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")]
+ : [])
}