Permalink
Browse files

windows/msi: add node.js prompt to startmenu

  • Loading branch information...
1 parent 04e484c commit 01432403afc81b727083034dcb5126e4350e9c45 @japj japj committed with piscisaureus Jun 4, 2012
Showing with 28 additions and 0 deletions.
  1. +9 −0 tools/msvs/msi/product.wxs
  2. +19 −0 tools/msvs/nodejsvars.bat
@@ -64,6 +64,9 @@
<File Id="filenodepdb" KeyPath="yes" Source="$(var.sourcedir)\node.pdb" />
</Component>
<?endif?>
+ <Component Id="nodejsvars" Guid="*">
+ <File Id="filenodejsvars" KeyPath="yes" Source="$(var.repoDir)\tools\msvs\nodejsvars.bat" />
+ </Component>
</Directory>
</Directory>
@@ -85,6 +88,11 @@
<Shortcut Id="ApplicationStartMenuShortcut" Name="Node.js"
Description="$(var.ProductDescription)" Target="[APPLICATIONROOTDIRECTORY]node.exe"
WorkingDirectory="APPLICATIONROOTDIRECTORY"/>
+ <Shortcut Id="NodePromptStartMenuShortcut" Name="Node.js ($(var.Platform)) Command Prompt"
+ Description="Node.js Command Prompt" Target="[%ComSpec]"
+ Arguments='/k "[APPLICATIONROOTDIRECTORY]nodejsvars.bat" $(var.Platform)'
+ Show="normal"
+ WorkingDirectory="APPLICATIONROOTDIRECTORY"/>
<util:InternetShortcut Id="OnlineWebsiteShortcut"
Name="Node.js website"
Target="http://nodejs.org"/>
@@ -113,6 +121,7 @@
<ComponentRef Id="nodepdb"/>
<?endif?>
<ComponentRef Id="ApplicationShortcut" />
+ <ComponentRef Id="nodejsvars" />
</ComponentGroup>
<Feature Id="nodejs" Title="node.js engine" Level="1" Description="$(var.ProductDescription)">
View
@@ -0,0 +1,19 @@
+@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`.
+
+:arg-ok
+shift
+goto next-arg
+:args-done
+
+@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%

0 comments on commit 0143240

Please sign in to comment.