Update to latest dutil.
Sean Hall committed
Jun 24, 2020 at 09:20 UTC
453bec104676c7dd808a20eaf30db9c918bed1e7
9 files changed
+45
-13
src/engine/engine.vcxproj
+2
-2
@@ -3,7 +3,7 @@
3
4
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5
<Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" />
6
- <Import Project="..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props')" />
6
+ <Import Project="..\..\packages\WixToolset.DUtil.4.0.30\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.30\build\WixToolset.DUtil.props')" />
7
8
<ItemGroup Label="ProjectConfigurations">
9
<ProjectConfiguration Include="Debug|Win32">
@@ -167,7 +167,7 @@ rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command>
167
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
168
</PropertyGroup>
169
<Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props'))" />
170
- <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props'))" />
170
+ <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.30\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.30\build\WixToolset.DUtil.props'))" />
171
<Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" />
172
</Target>
173
</Project>
src/engine/packages.config
+1
-1
@@ -2,5 +2,5 @@
2
<packages>
3
<package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" />
4
<package id="WixToolset.BootstrapperCore.Native" version="4.0.16" targetFramework="native" />
5
- <package id="WixToolset.DUtil" version="4.0.23" targetFramework="native" />
5
+ <package id="WixToolset.DUtil" version="4.0.30" targetFramework="native" />
6
</packages>
\ No newline at end of file
src/engine/precomp.h
+4
-2
@@ -2,8 +2,6 @@
2
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3
4
5
-#define ExitTrace LogErrorString
6
-
5
#include <windows.h>
6
#include <aclapi.h>
7
#include <Bits.h>
@@ -26,6 +24,10 @@
24
#include <wininet.h>
25
#include <stddef.h>
26
27
+#include <dutilsources.h>
28
+
29
+#define DUTIL_SOURCE_DEFAULT DUTIL_SOURCE_EXTERNAL
30
+
31
#include <dutil.h>
32
#include <aclutil.h>
33
#include <apputil.h>
src/engine/registration.cpp
+1
-1
@@ -893,7 +893,7 @@ extern "C" HRESULT RegistrationSessionEnd(
893
894
if (FAILED(hr))
895
{
896
- ExitTrace(hr, "Failed to write volatile reboot required registry key.");
896
+ ExitTraceSource(DUTIL_SOURCE_DEFAULT, hr, "Failed to write volatile reboot required registry key.");
897
hr = S_OK;
898
}
899
}
src/stub/WixToolset.Burn.nuspec
+1
-2
@@ -5,8 +5,7 @@
5
<version>$version$</version>
6
<authors>$authors$</authors>
7
<owners>$authors$</owners>
8
- <!-- <license type="expression">MS-RL</license> -->
9
- <licenseUrl>https://licenses.nuget.org/MS-RL</licenseUrl>
8
+ <license type="expression">MS-RL</license>
9
<projectUrl>https://github.com/wixtoolset/burn</projectUrl>
10
<requireLicenseAcceptance>false</requireLicenseAcceptance>
11
<description>$description$</description>
src/stub/packages.config
+1
-1
@@ -1,5 +1,5 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<packages>
3
<package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" />
4
- <package id="WixToolset.DUtil" version="4.0.23" targetFramework="native" />
4
+ <package id="WixToolset.DUtil" version="4.0.30" targetFramework="native" />
5
</packages>
\ No newline at end of file
src/stub/precomp.h
+1
@@ -9,5 +9,6 @@
9
#include <strutil.h>
10
#include <fileutil.h>
11
#include <pathutil.h>
12
+#include <logutil.h>
13
14
#include "engine.h"
src/stub/stub.cpp
+30
@@ -3,6 +3,16 @@
3
#include "precomp.h"
4
5
6
+static void CALLBACK BurnTraceError(
7
+ __in_z LPCSTR szFile,
8
+ __in int iLine,
9
+ __in REPORT_LEVEL rl,
10
+ __in UINT source,
11
+ __in HRESULT hrError,
12
+ __in_z __format_string LPCSTR szFormat,
13
+ __in va_list args
14
+ );
15
+
16
int WINAPI wWinMain(
17
__in HINSTANCE hInstance,
18
__in_opt HINSTANCE /* hPrevInstance */,
@@ -30,6 +40,8 @@ int WINAPI wWinMain(
40
L"feclient.dll", // unsafely loaded by DecryptFile().
41
};
42
43
+ DutilInitialize(&BurnTraceError);
44
+
45
// Best effort attempt to get our file handle as soon as possible.
46
hr = PathForCurrentProcess(&sczPath, NULL);
47
if (SUCCEEDED(hr))
@@ -60,5 +72,23 @@ LExit:
72
ReleaseFileHandle(hEngineFile);
73
ReleaseStr(sczPath);
74
75
+ DutilUninitialize();
76
+
77
return FAILED(hr) ? (int)hr : (int)dwExitCode;
78
}
79
+
80
+static void CALLBACK BurnTraceError(
81
+ __in_z LPCSTR /*szFile*/,
82
+ __in int /*iLine*/,
83
+ __in REPORT_LEVEL /*rl*/,
84
+ __in UINT source,
85
+ __in HRESULT hrError,
86
+ __in_z __format_string LPCSTR szFormat,
87
+ __in va_list args
88
+ )
89
+{
90
+ if (DUTIL_SOURCE_DEFAULT == source)
91
+ {
92
+ LogErrorStringArgs(hrError, szFormat, args);
93
+ }
94
+}
src/stub/stub.vcxproj
+4
-4
@@ -2,7 +2,7 @@
2
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5
- <Import Project="..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props')" />
5
+ <Import Project="..\..\packages\WixToolset.DUtil.4.0.30\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.30\build\WixToolset.DUtil.props')" />
6
7
<ItemGroup Label="ProjectConfigurations">
8
<ProjectConfiguration Include="Debug|Win32">
@@ -28,7 +28,7 @@
28
<ConfigurationType>Application</ConfigurationType>
29
<ProjectSubSystem>Windows</ProjectSubSystem>
30
<TargetName>burn</TargetName>
31
- <PlatformToolset>v141</PlatformToolset>
31
+ <PlatformToolset>v142</PlatformToolset>
32
<CharacterSet>Unicode</CharacterSet>
33
<Description>Native component of WixToolset.Burn</Description>
34
</PropertyGroup>
@@ -85,7 +85,7 @@
85
</ItemGroup>
86
87
<Target Name="Pack" DependsOnTargets="GetBuildVersion">
88
- <Exec Command='nuget pack WixToolset.Burn.nuspec -BasePath "$(BaseOutputPath)$(Configuration)" -OutputDirectory "$(BaseOutputPath)$(Configuration)" -NoPackageAnalysis -Properties Configuration=$(Configuration);Id=WixToolset.Burn;Version="$(BuildVersionSimple)";ProjectFolder=$(MSBuildThisFileDirectory);Platform=$(PlatformTarget);Authors="$(Authors)";Copyright="$(Copyright)";Description="$(Description)";Title="$(Title)"' />
88
+ <Exec Command='nuget pack WixToolset.Burn.nuspec -BasePath "$(BaseOutputPath)$(Configuration)" -OutputDirectory "$(BaseOutputPath)$(Configuration)" -NoPackageAnalysis -Properties Configuration=$(Configuration);Id=WixToolset.Burn;Version="$(BuildVersionSimple)";ProjectFolder=$(MSBuildThisFileDirectory);Platform=$(PlatformTarget);Authors="$(Authors)";Copyright="$(Copyright)";Description="$(Description)"' />
89
</Target>
90
91
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
@@ -94,6 +94,6 @@
94
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
95
</PropertyGroup>
96
<Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" />
97
- <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props'))" />
97
+ <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.30\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.30\build\WixToolset.DUtil.props'))" />
98
</Target>
99
</Project>