Browse Source

win/msi: make npm a feature separate from the runtime

v0.10.0-release
Bert Belder 12 years ago
parent
commit
51e3a59946
  1. 10
      tools/msvs/msi/nodemsi.wixproj
  2. 45
      tools/msvs/msi/product.wxs

10
tools/msvs/msi/nodemsi.wixproj

@ -16,23 +16,23 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>..\..\..\$(Configuration)\</OutputPath> <OutputPath>..\..\..\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NoPerfCtr=$(NoPerfCtr);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants> <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NoPerfCtr=$(NoPerfCtr);NpmSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>..\..\..\$(Configuration)\</OutputPath> <OutputPath>..\..\..\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NoPerfCtr=$(NoPerfCtr);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants> <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NoPerfCtr=$(NoPerfCtr);NpmSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<OutputPath>..\..\..\$(Configuration)\</OutputPath> <OutputPath>..\..\..\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NoPerfCtr=$(NoPerfCtr);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants> <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NoPerfCtr=$(NoPerfCtr);NpmSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants>
<Cultures>en-US</Cultures> <Cultures>en-US</Cultures>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>..\..\..\$(Configuration)\</OutputPath> <OutputPath>..\..\..\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NoPerfCtr=$(NoPerfCtr);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants> <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NoPerfCtr=$(NoPerfCtr);NpmSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<EnableProjectHarvesting>True</EnableProjectHarvesting> <EnableProjectHarvesting>True</EnableProjectHarvesting>
@ -58,7 +58,7 @@
</ItemGroup> </ItemGroup>
<Import Project="$(WixTargetsPath)" /> <Import Project="$(WixTargetsPath)" />
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">
<HeatDirectory ToolPath="$(WixToolPath)" Directory="..\..\..\deps\npm" PreprocessorVariable="var.NPMSourceDir" DirectoryRefId="NodeModulesFolder" ComponentGroupName="NPMFiles" GenerateGuidsNow="true" SuppressFragments="false" OutputFile="..\..\..\npm.wxs"> <HeatDirectory ToolPath="$(WixToolPath)" Directory="..\..\..\deps\npm" PreprocessorVariable="var.NpmSourceDir" DirectoryRefId="NodeModulesFolder" ComponentGroupName="NpmSourceFiles" GenerateGuidsNow="true" SuppressFragments="false" OutputFile="..\..\..\npm.wxs">
</HeatDirectory> </HeatDirectory>
</Target> </Target>
<PropertyGroup> <PropertyGroup>

45
tools/msvs/msi/product.wxs

@ -43,6 +43,16 @@
<ComponentGroupRef Id="Product.Generated" /> <ComponentGroupRef Id="Product.Generated" />
</Feature> </Feature>
<Feature Id="npm"
Level="1"
Title="NPM package manager"
Description="Install NPM, the recommended package manager for Node.js.">
<ComponentRef Id="NpmCmdScript"/>
<ComponentRef Id="NpmBashScript"/>
<ComponentRef Id="NpmConfigurationFile"/>
<ComponentGroupRef Id="NpmSourceFiles"/>
</Feature>
<Feature Id="nodejs.shortcuts" Title="node.js shortcuts" Level="1" Description="$(var.ProductDescription) Shortcuts"> <Feature Id="nodejs.shortcuts" Title="node.js shortcuts" Level="1" Description="$(var.ProductDescription) Shortcuts">
<Feature Id="nodejs.shortcuts.application" Title="Application Shortcuts" Level="1" Description="$(var.ProductDescription) standard application shortcuts"> <Feature Id="nodejs.shortcuts.application" Title="Application Shortcuts" Level="1" Description="$(var.ProductDescription) standard application shortcuts">
<ComponentGroupRef Id="application.shortcuts"/> <ComponentGroupRef Id="application.shortcuts"/>
@ -60,13 +70,6 @@
<Directory Id="$(var.ProgramFilesFolderId)"> <Directory Id="$(var.ProgramFilesFolderId)">
<Directory Id="INSTALLDIR" Name="nodejs"> <Directory Id="INSTALLDIR" Name="nodejs">
<Directory Id="NodeModulesFolder" Name="node_modules">
<Directory Id="NPMFolder" Name="npm">
<Component Id="npmrc" Guid="55B2B03F-8F32-4D62-A54A-FA428615591D">
<File Id="filenpmrc" KeyPath="yes" Source="$(var.RepoDir)\tools\msvs\npm\npmrc" />
</Component>
</Directory>
</Directory>
<Component Id="nodeexe" Guid="AEC0F08E-89B3-4C35-A286-8DB8598597F2"> <Component Id="nodeexe" Guid="AEC0F08E-89B3-4C35-A286-8DB8598597F2">
<File Id="filenodeexe" KeyPath="yes" Source="$(var.SourceDir)\node.exe" /> <File Id="filenodeexe" KeyPath="yes" Source="$(var.SourceDir)\node.exe" />
<?if $(var.NoETW) != 1 ?> <?if $(var.NoETW) != 1 ?>
@ -92,12 +95,6 @@
System="yes" System="yes"
Value="[INSTALLDIR]" /> Value="[INSTALLDIR]" />
</Component> </Component>
<Component Id="npmcmd" Guid="31e9986d-74cd-44e1-878c-194d3e997d32">
<File Id="filenpmcmd" KeyPath="yes" Source="$(var.NPMSourceDir)\bin\npm.cmd" />
</Component>
<Component Id="npmsh" Guid="57754e12-9269-4198-a38c-2c098bf5276e">
<File Id="filenpmsh" KeyPath="yes" Source="$(var.NPMSourceDir)\bin\npm" />
</Component>
<Component Id="nodejsvars" Guid="*"> <Component Id="nodejsvars" Guid="*">
<File Id="filenodejsvars" KeyPath="yes" Source="$(var.RepoDir)\tools\msvs\nodejsvars.bat" /> <File Id="filenodejsvars" KeyPath="yes" Source="$(var.RepoDir)\tools\msvs\nodejsvars.bat" />
</Component> </Component>
@ -111,6 +108,24 @@
</Directory> </Directory>
</Directory> </Directory>
<DirectoryRef Id="INSTALLDIR">
<Component Id="NpmCmdScript">
<File Id="npm.cmd" KeyPath="yes" Source="$(var.NpmSourceDir)\bin\npm.cmd"/>
</Component>
<Component Id="NpmBashScript">
<File Id="npm.sh" KeyPath="yes" Source="$(var.NpmSourceDir)\bin\npm"/>
</Component>
<Directory Id="NodeModulesFolder" Name="node_modules">
<Directory Id="NpmFolder" Name="npm">
<Component Id="NpmConfigurationFile">
<File Id="npm.rc" KeyPath="yes" Source="$(var.RepoDir)\tools\msvs\npm\npmrc"/>
</Component>
</Directory>
</Directory>
</DirectoryRef>
<DirectoryRef Id="ApplicationProgramsFolder"> <DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="9b1ab94a-8f54-4f19-a5c4-b890de474162"> <Component Id="ApplicationShortcut" Guid="9b1ab94a-8f54-4f19-a5c4-b890de474162">
<Shortcut Id="ApplicationStartMenuShortcut" Name="Node.js" <Shortcut Id="ApplicationStartMenuShortcut" Name="Node.js"
@ -144,10 +159,6 @@
<ComponentGroup Id="allfiles"> <ComponentGroup Id="allfiles">
<ComponentRef Id="nodeexe"/> <ComponentRef Id="nodeexe"/>
<ComponentRef Id="npmcmd"/>
<ComponentRef Id="npmsh"/>
<ComponentRef Id="npmrc" />
<ComponentGroupRef Id="NPMFiles" />
<ComponentRef Id="nodejsvars" /> <ComponentRef Id="nodejsvars" />
<ComponentRef Id="noderegistry" /> <ComponentRef Id="noderegistry" />
</ComponentGroup> </ComponentGroup>

Loading…
Cancel
Save