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
WIP. Support installing npm in the .msi
  • Loading branch information
ry committed Nov 23, 2011
1 parent 0ba78d5 commit 451d61c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -34,3 +34,5 @@ ipch/
*-nodegyp*
/gyp-mac-tool
/dist-osx
/npm.wxs
/tools/msvs/npm.wixobj
4 changes: 3 additions & 1 deletion tools/msvs/msi/nodemsi.wixproj
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>

<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand All @@ -24,6 +25,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="product.wxs" />
<Compile Include="..\..\..\npm.wxs" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUIExtension">
Expand All @@ -40,4 +42,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
2 changes: 2 additions & 0 deletions tools/msvs/msi/product.wxs
Expand Up @@ -17,6 +17,7 @@
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="NodeRoot" Name="nodejs">
<Directory Id="NodeModulesFolder" Name="node_modules" />
<Component Id="nodeexe" Guid="AEC0F08E-89B3-4C35-A286-8DB8598597F2">
<File Id="filenodeexe" KeyPath="yes" Source="$(var.sourcedir)\node.exe" />
<Environment Id="Environment"
Expand All @@ -37,6 +38,7 @@

<ComponentGroup Id="allfiles">
<ComponentRef Id="nodeexe"/>
<ComponentGroupRef Id="NPMFiles" />
<?if $(var.Configuration) = Debug ?>
<ComponentRef Id="nodepdb"/>
<?endif?>
Expand Down
1 change: 1 addition & 0 deletions vcbuild.bat
Expand Up @@ -83,6 +83,7 @@ if not defined msi goto run
python "%~dp0tools\getnodeversion.py" > "%temp%\node_version.txt"
if not errorlevel 0 echo Cannot determine current version of node.js & goto exit
for /F "tokens=*" %%i in (%temp%\node_version.txt) do set NODE_VERSION=%%i
heat dir ".\deps\npm" -var var.NPMSourceDir -dr NodeModulesFolder -cg NPMFiles -gg -template fragment -out npm.wxs
msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /t:Clean,Build /p:Configuration=%config% /p:NodeVersion=%NODE_VERSION% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
if errorlevel 1 goto exit

Expand Down

0 comments on commit 451d61c

Please sign in to comment.