From d31fc171691fa8b48b786488e45e25597bc31a81 Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Sun, 21 Apr 2013 02:00:29 +0100 Subject: build: give a clearer error when not finding WIX env var (windows) Even if the README tells you to install WiX, it could happen that you run the javascript file from a command line shell that you had already open before you installed WiX, in which case it would fail. --- build/windows/build-installer.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build/windows/build-installer.js b/build/windows/build-installer.js index 9ae6716e1..df85aa3d0 100644 --- a/build/windows/build-installer.js +++ b/build/windows/build-installer.js @@ -10,7 +10,12 @@ var bin = '..\\..\\bin'; var sh = new ActiveXObject("WScript.Shell"); var fs = new ActiveXObject("Scripting.FileSystemObject"); var env = sh.Environment("Process"); -var heat = "\"" + env("WIX") + "bin\\heat.exe\""; +var wix_path = env("WIX"); +if (wix_path == "") { + WScript.Echo ('WIX environment variable not set, did you install WiX 3.5?'); + WScript.Quit (1); +} +var heat = "\"" + wix_path + "bin\\heat.exe\""; // Look for msbuild.exe if (fs.FileExists (env("windir") + "\\Microsoft.NET\\Framework\\v4.0.30319\\msbuild.exe") == 1) { -- cgit v1.2.3