Skip to content

Commit

Permalink
address Bert's review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Zinkovsky committed Jun 13, 2012
1 parent ae3737a commit 3853654
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion configure
Expand Up @@ -287,7 +287,7 @@ def configure_node(o):
if sys.platform.startswith('win32'): if sys.platform.startswith('win32'):
o['variables']['node_use_etw'] = b(not options.without_etw); o['variables']['node_use_etw'] = b(not options.without_etw);
elif b(options.with_etw) == 'true': elif b(options.with_etw) == 'true':
raise Exception('EWT is only supported on Windows.') raise Exception('ETW is only supported on Windows.')
else: else:
o['variables']['node_use_etw'] = 'false' o['variables']['node_use_etw'] = 'false'


Expand Down
2 changes: 1 addition & 1 deletion src/node_win32_etw_provider-inl.h
Expand Up @@ -32,7 +32,7 @@ using namespace v8;
// From node_win32_etw_provider.cc // From node_win32_etw_provider.cc
extern REGHANDLE node_provider; extern REGHANDLE node_provider;
extern EventWriteFunc event_write; extern EventWriteFunc event_write;
extern volatile int events_enabled; extern int events_enabled;


#define ETW_WRITE_STRING_DATA(data_descriptor, data) \ #define ETW_WRITE_STRING_DATA(data_descriptor, data) \
EventDataDescCreate(data_descriptor, \ EventDataDescCreate(data_descriptor, \
Expand Down
6 changes: 3 additions & 3 deletions src/node_win32_etw_provider.cc
Expand Up @@ -32,7 +32,7 @@ REGHANDLE node_provider;
EventRegisterFunc event_register; EventRegisterFunc event_register;
EventUnregisterFunc event_unregister; EventUnregisterFunc event_unregister;
EventWriteFunc event_write; EventWriteFunc event_write;
volatile int events_enabled; int events_enabled;


// This callback is called by ETW when consumers of our provider // This callback is called by ETW when consumers of our provider
// are enabled or disabled. // are enabled or disabled.
Expand Down Expand Up @@ -81,11 +81,11 @@ void shutdown_etw() {
node_provider = 0; node_provider = 0;
} }


events_enabled = 0;

if (advapi) { if (advapi) {
FreeLibrary(advapi); FreeLibrary(advapi);
advapi = NULL; advapi = NULL;
} }

events_enabled = 0;
} }
} }
8 changes: 4 additions & 4 deletions tools/msvs/msi/nodemsi.wixproj
Expand Up @@ -16,22 +16,22 @@
<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);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants> <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);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);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants> <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);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);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants> <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants>
</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);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants> <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="product.wxs" /> <Compile Include="product.wxs" />
Expand Down
2 changes: 2 additions & 0 deletions tools/msvs/msi/product.wxs
Expand Up @@ -40,9 +40,11 @@
</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 ?>
<File Id="node_etw_provider_man" Name="node_etw_provider.man" Source="$(var.RepoDir)\tools\msvs\etw\node_etw_provider.man" > <File Id="node_etw_provider_man" Name="node_etw_provider.man" Source="$(var.RepoDir)\tools\msvs\etw\node_etw_provider.man" >
<util:EventManifest MessageFile="[APPLICATIONROOTDIRECTORY]node.exe" ResourceFile="[APPLICATIONROOTDIRECTORY]node.exe"/> <util:EventManifest MessageFile="[APPLICATIONROOTDIRECTORY]node.exe" ResourceFile="[APPLICATIONROOTDIRECTORY]node.exe"/>
</File> </File>
<?endif?>
<Environment Id="npm_env" <Environment Id="npm_env"
Action="set" Action="set"
Name="PATH" Name="PATH"
Expand Down
5 changes: 3 additions & 2 deletions vcbuild.bat
Expand Up @@ -30,6 +30,7 @@ set upload=
set jslint= set jslint=
set noetw= set noetw=
set noetw_arg= set noetw_arg=
set noetw_msi_arg=


:next-arg :next-arg
if "%1"=="" goto args-done if "%1"=="" goto args-done
Expand Down Expand Up @@ -68,7 +69,7 @@ if defined jslint goto jslint
if "%config%"=="Debug" set debug_arg=--debug if "%config%"=="Debug" set debug_arg=--debug
if "%target_arch%"=="x64" set msiplatform=x64 if "%target_arch%"=="x64" set msiplatform=x64
if defined nosnapshot set nosnapshot_arg=--without-snapshot if defined nosnapshot set nosnapshot_arg=--without-snapshot
if defined noetw set noetw_arg=--without-etw if defined noetw set noetw_arg=--without-etw& set noetw_msi_arg=/p:NoETW=1


:project-gen :project-gen
@rem Skip project generation if requested. @rem Skip project generation if requested.
Expand Down Expand Up @@ -120,7 +121,7 @@ if not defined msi goto run
python "%~dp0tools\getnodeversion.py" > "%temp%\node_version.txt" python "%~dp0tools\getnodeversion.py" > "%temp%\node_version.txt"
if not errorlevel 0 echo Cannot determine current version of node.js & goto exit 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 for /F "tokens=*" %%i in (%temp%\node_version.txt) do set NODE_VERSION=%%i
msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:Configuration=%config% /p:Platform=%msiplatform% /p:NodeVersion=%NODE_VERSION% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:Configuration=%config% /p:Platform=%msiplatform% /p:NodeVersion=%NODE_VERSION% %noetw_msi_arg% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
if errorlevel 1 goto exit if errorlevel 1 goto exit


if defined nosign goto run if defined nosign goto run
Expand Down

0 comments on commit 3853654

Please sign in to comment.