Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
windows/msi: add node.js prompt to startmenu
  • Loading branch information
japj authored and piscisaureus committed Jun 4, 2012
1 parent 04e484c commit 0143240
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/msvs/msi/product.wxs
Expand Up @@ -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>

Expand All @@ -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"/>
Expand Down Expand Up @@ -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)">
Expand Down
19 changes: 19 additions & 0 deletions tools/msvs/nodejsvars.bat
@@ -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.