[banshee] build: give a clearer error when not finding WIX env var (windows)



commit d31fc171691fa8b48b786488e45e25597bc31a81
Author: Andres G. Aragoneses <knocte gmail com>
Date:   Sun Apr 21 02:00:29 2013 +0100

    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 9ae6716..df85aa3 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) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]