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

build: install node and static library headers #6332

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions tools/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,20 @@ def subdir_files(path, dest, action):
action(files, subdir + '/')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not move dest + there ?


def files(action):
action(['out/Release/node'], 'bin/node')
if 'win32' not in sys.platform:
action(['out/Release/node'], 'bin/node')

# install unconditionally, checking if the platform supports dtrace doesn't
# work when cross-compiling and besides, there's at least one linux flavor
# with dtrace support now (oracle's "unbreakable" linux)
action(['src/node.d'], 'lib/dtrace/')
# install unconditionally, checking if the platform supports dtrace doesn't
# work when cross-compiling and besides, there's at least one linux flavor
# with dtrace support now (oracle's "unbreakable" linux)
action(['src/node.d'], 'lib/dtrace/')

if 'freebsd' in sys.platform or 'openbsd' in sys.platform:
action(['doc/node.1'], 'man/man1/')
else:
action(['doc/node.1'], 'share/man/man1/')
if 'freebsd' in sys.platform or 'openbsd' in sys.platform:
action(['doc/node.1'], 'man/man1/')
else:
action(['doc/node.1'], 'share/man/man1/')

if 'true' == variables.get('node_install_npm'): npm_files(action)
if 'true' == variables.get('node_install_npm'): npm_files(action)

action([
'config.gypi',
Expand Down
15 changes: 8 additions & 7 deletions tools/msvs/msi/nodemsi.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>..\..\..\$(Configuration)\</OutputPath>
<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\;IncludeSourceDir=..\..\..\out\prefix\include\node\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>..\..\..\$(Configuration)\</OutputPath>
<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\;IncludeSourceDir=..\..\..\out\prefix\include\node\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<OutputPath>..\..\..\$(Configuration)\</OutputPath>
<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\;IncludeSourceDir=..\..\..\out\prefix\include\node\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants>
<Cultures>en-US</Cultures>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>..\..\..\$(Configuration)\</OutputPath>
<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\;IncludeSourceDir=..\..\..\out\prefix\include\node\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<EnableProjectHarvesting>True</EnableProjectHarvesting>
Expand All @@ -42,6 +42,7 @@
<Compile Include="..\..\..\npm.wxs">
<Link>npm.wxs</Link>
</Compile>
<Compile Include="..\..\..\headers.wxs" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUIExtension">
Expand All @@ -58,11 +59,11 @@
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<Target Name="BeforeBuild">
<HeatDirectory ToolPath="$(WixToolPath)" Directory="..\..\..\deps\npm" PreprocessorVariable="var.NpmSourceDir" DirectoryRefId="NodeModulesFolder" ComponentGroupName="NpmSourceFiles" GenerateGuidsNow="true" SuppressFragments="false" OutputFile="..\..\..\npm.wxs">
</HeatDirectory>
<HeatDirectory ToolPath="$(WixToolPath)" Directory="..\..\..\deps\npm" PreprocessorVariable="var.NpmSourceDir" DirectoryRefId="NodeModulesFolder" ComponentGroupName="NpmSourceFiles" GenerateGuidsNow="true" SuppressFragments="false" OutputFile="..\..\..\npm.wxs" />
<HeatDirectory ToolPath="$(WixToolPath)" Directory="..\..\..\out\prefix\include\node" PreprocessorVariable="var.IncludeSourceDir" DirectoryRefId="IncludeFolder" ComponentGroupName="HeaderSourceFiles" GenerateGuidsNow="true" SuppressFragments="false" OutputFile="..\..\..\headers.wxs" />
</Target>
<PropertyGroup>
<PostBuildEvent>move "!(TargetPath)" "$(TargetDir)\$(TargetFileName)"
move "!(TargetPdbPath)" "$(TargetDir)\$(TargetPdbName)"</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>
10 changes: 10 additions & 0 deletions tools/msvs/msi/product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@
<ComponentGroupRef Id="NpmSourceFiles"/>
</Feature>

<Feature Id="headers"
Level="1"
Title="Development headers"
Description="Headers used for compiling and linking against node">
<ComponentGroupRef Id="HeaderSourceFiles"/>
</Feature>

<Feature Level="1"
Id="DocumentationShortcuts"
Title="Online documentation shortcuts"
Expand Down Expand Up @@ -184,6 +191,9 @@
</Component>
</Directory>
</Directory>

<Directory Id="IncludeFolder" Name="include">
</Directory>
</DirectoryRef>

<DirectoryRef Id="ApplicationProgramsFolder">
Expand Down
6 changes: 5 additions & 1 deletion vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,12 @@ if defined noprojgen goto msbuild

if defined NIGHTLY set TAG=nightly-%NIGHTLY%

if defined msi set PREFIX=.

@rem Generate the VS project.
SETLOCAL
if defined VS100COMNTOOLS call "%VS100COMNTOOLS%\VCVarsQueryRegistry.bat"
python configure %debug_arg% %nosnapshot_arg% %noetw_arg% %noperfctr_arg% --dest-cpu=%target_arch% --tag=%TAG%
python configure %debug_arg% %nosnapshot_arg% %noetw_arg% %noperfctr_arg% --dest-cpu=%target_arch% --tag=%TAG% --prefix=%PREFIX%
if errorlevel 1 goto create-msvs-files-failed
if not exist node.sln goto create-msvs-files-failed
echo Project files generated.
Expand Down Expand Up @@ -145,6 +147,8 @@ if not defined NIGHTLY goto msibuild
set NODE_VERSION=%NODE_VERSION%.%NIGHTLY%

:msibuild
echo Installing artifacts
python tools/install.py install ./out/prefix
echo Building node-%NODE_VERSION%
msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:Configuration=%config% /p:Platform=%msiplatform% /p:NodeVersion=%NODE_VERSION% %noetw_msi_arg% %noperfctr_msi_arg% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
if errorlevel 1 goto exit
Expand Down