From 4f6882e8982aeee8065803e93acb2c6f0dff8d1d Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Mon, 4 Jun 2012 21:39:23 +0200 Subject: [PATCH] windows/msi: minor installer tweaks --- tools/msvs/msi/product.wxs | 48 +++++++++++++++++++------------------- tools/msvs/nodejsvars.bat | 24 +++++++------------ 2 files changed, 33 insertions(+), 39 deletions(-) diff --git a/tools/msvs/msi/product.wxs b/tools/msvs/msi/product.wxs index bf2763456e..94eeed25c7 100755 --- a/tools/msvs/msi/product.wxs +++ b/tools/msvs/msi/product.wxs @@ -2,12 +2,12 @@ - - + + - - + + - - + - + @@ -34,23 +34,23 @@ - + - + @@ -61,11 +61,11 @@ - + - + @@ -88,9 +88,9 @@ - - + @@ -159,14 +159,14 @@ 1 - + - + diff --git a/tools/msvs/nodejsvars.bat b/tools/msvs/nodejsvars.bat index 68be31399a..fd4d451c9a 100644 --- a/tools/msvs/nodejsvars.bat +++ b/tools/msvs/nodejsvars.bat @@ -1,19 +1,13 @@ @echo off -@rem Process arguments. -set target_arch=x86 -:next-arg -if "%1"=="" goto args-done -if /i "%1"=="x86" set target_arch=x86&goto arg-ok -if /i "%1"=="x64" set target_arch=x64&goto arg-ok - -echo Warning: ignoring invalid command line option `%1`. +@rem Ensure this Node.js is first in the PATH +set PATH=%~dp0;%PATH% -:arg-ok -shift -goto next-arg -:args-done +@rem Figure out architecture and print it. +setlocal +for /F "usebackq delims=" %%v in (`"%~dp0"node.exe -p -e process.arch`) do set arch=%%v +echo Your environment has been set up for using Node.js (%arch%) and NPM +endlocal -@rem Ensure this Node.js is first in the PATH -echo Your environment has been set up for using Node.js (%target_arch%) and NPM -set PATH=%~dp0;%PATH% \ No newline at end of file +@rem Go to the user's home directory +cd /d %HOMEDRIVE%"%HOMEPATH%"