aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Cpp.Build.props100
-rw-r--r--src/Directory.Build.props26
-rw-r--r--src/Directory.Build.targets48
-rw-r--r--src/engine/engine.cpp1
-rw-r--r--src/engine/engine.vcxproj174
-rw-r--r--src/engine/packages.config6
-rw-r--r--src/engine/precomp.cpp3
-rw-r--r--src/engine/precomp.h7
-rw-r--r--src/engine/variable.cpp1
-rw-r--r--src/stub/packages.config5
-rw-r--r--src/stub/precomp.cpp3
-rw-r--r--src/stub/runtime.win.WixToolset.Burn.nuspec20
-rw-r--r--src/stub/stub.rc11
-rw-r--r--src/stub/stub.vcxproj104
14 files changed, 496 insertions, 13 deletions
diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props
new file mode 100644
index 00000000..296b36ca
--- /dev/null
+++ b/src/Cpp.Build.props
@@ -0,0 +1,100 @@
1<?xml version="1.0" encoding="utf-8"?>
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>
5 <PropertyGroup>
6 <Platform Condition=" '$(Platform)' == '' OR '$(Platform)' == 'AnyCPU' ">Win32</Platform>
7 <IntDir>$(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\</IntDir>
8 <OutDir>$(OutputPath)$(Platform)\</OutDir>
9 </PropertyGroup>
10
11 <ItemDefinitionGroup>
12 <ClCompile>
13 <DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings>
14 <WarningLevel>Level4</WarningLevel>
15 <AdditionalIncludeDirectories>$(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
16 <PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
17 <PrecompiledHeader>Use</PrecompiledHeader>
18 <PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
19 <CallingConvention>StdCall</CallingConvention>
20 <TreatWarningAsError>true</TreatWarningAsError>
21 <ExceptionHandling>false</ExceptionHandling>
22 <AdditionalOptions>-YlprecompDefine</AdditionalOptions>
23 <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
24 <MultiProcessorCompilation Condition=" $(NUMBER_OF_PROCESSORS) &gt; 4 ">true</MultiProcessorCompilation>
25 </ClCompile>
26 <ResourceCompile>
27 <PreprocessorDefinitions>$(ArmPreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
28 <AdditionalIncludeDirectories>$(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
29 </ResourceCompile>
30 <Lib>
31 <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
32 </Lib>
33 <Link>
34 <SubSystem>$(ProjectSubSystem)</SubSystem>
35 <ModuleDefinitionFile>$(ProjectModuleDefinitionFile)</ModuleDefinitionFile>
36 <NoEntryPoint>$(ResourceOnlyDll)</NoEntryPoint>
37 <GenerateDebugInformation>true</GenerateDebugInformation>
38 <AdditionalDependencies>$(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
39 <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
40 <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/IGNORE:4099 %(AdditionalOptions)</AdditionalOptions>
41 </Link>
42 </ItemDefinitionGroup>
43
44 <ItemDefinitionGroup Condition=" '$(Platform)'=='Win32' and '$(PlatformToolset)'!='v100'">
45 <ClCompile>
46 <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
47 </ClCompile>
48 </ItemDefinitionGroup>
49 <ItemDefinitionGroup Condition=" '$(Platform)'=='arm' ">
50 <ClCompile>
51 <CallingConvention>CDecl</CallingConvention>
52 </ClCompile>
53 </ItemDefinitionGroup>
54 <ItemDefinitionGroup Condition=" '$(ConfigurationType)'=='StaticLibrary' ">
55 <ClCompile>
56 <DebugInformationFormat>OldStyle</DebugInformationFormat>
57 <OmitDefaultLibName>true</OmitDefaultLibName>
58 <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
59 </ClCompile>
60 </ItemDefinitionGroup>
61 <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' ">
62 <ClCompile>
63 <Optimization>Disabled</Optimization>
64 <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
65 <PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
66 <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
67 </ClCompile>
68 </ItemDefinitionGroup>
69 <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' ">
70 <ClCompile>
71 <BasicRuntimeChecks></BasicRuntimeChecks>
72 <RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
73 </ClCompile>
74 </ItemDefinitionGroup>
75 <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' ">
76 <ClCompile>
77 <Optimization>MinSpace</Optimization>
78 <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
79 <FunctionLevelLinking>true</FunctionLevelLinking>
80 <IntrinsicFunctions>true</IntrinsicFunctions>
81 <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
82 </ClCompile>
83 <Link>
84 <EnableCOMDATFolding>true</EnableCOMDATFolding>
85 <OptimizeReferences>true</OptimizeReferences>
86 </Link>
87 </ItemDefinitionGroup>
88 <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' ">
89 <ClCompile>
90 <BasicRuntimeChecks></BasicRuntimeChecks>
91 <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary>
92 </ClCompile>
93 </ItemDefinitionGroup>
94 <ItemDefinitionGroup Condition=" '$(CLRSupport)'=='true' ">
95 <Link>
96 <KeyFile>$(LinkKeyFile)</KeyFile>
97 <DelaySign>$(LinkDelaySign)</DelaySign>
98 </Link>
99 </ItemDefinitionGroup>
100</Project>
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
new file mode 100644
index 00000000..e853e22d
--- /dev/null
+++ b/src/Directory.Build.props
@@ -0,0 +1,26 @@
1<?xml version="1.0" encoding="utf-8"?>
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 Do NOT modify this file. Update the canonical version in Home\repo-template\src\Directory.Build.props
5 then update all of the repos.
6-->
7<Project>
8 <PropertyGroup>
9 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
10 <EnableSourceLink Condition=" '$(NCrunch)' == '1' ">false</EnableSourceLink>
11
12 <ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
13 <BaseOutputPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\))</BaseOutputPath>
14 <BaseIntermediateOutputPath>$(BaseOutputPath)obj\$(ProjectName)\</BaseIntermediateOutputPath>
15 <OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath>
16
17 <Authors>WiX Toolset Team</Authors>
18 <Company>WiX Toolset</Company>
19 <Copyright>Copyright (c) .NET Foundation and contributors. All rights reserved.</Copyright>
20 <PackageLicenseExpression>MS-RL</PackageLicenseExpression>
21 <Product>WiX Toolset</Product>
22 </PropertyGroup>
23
24 <Import Project="Cpp.Build.props" Condition=" '$(MSBuildProjectExtension)'=='.vcxproj' " />
25 <Import Project="Custom.Build.props" Condition=" Exists('Custom.Build.props') " />
26</Project>
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
new file mode 100644
index 00000000..dac7452a
--- /dev/null
+++ b/src/Directory.Build.targets
@@ -0,0 +1,48 @@
1<?xml version="1.0" encoding="utf-8"?>
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 Do NOT modify this file. Update the canonical version in Home\repo-template\src\Directory.Build.targets
5 then update all of the repos.
6-->
7<!--
8 Replace PackageReferences with ProjectReferences when the projects can be found in .sln.
9 See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284
10-->
11<Project>
12 <PropertyGroup>
13 <ReplacePackageReferences>true</ReplacePackageReferences>
14 <TheSolutionPath Condition=" '$(NCrunch)'=='' ">$(SolutionPath)</TheSolutionPath>
15 <TheSolutionPath Condition=" '$(NCrunch)'=='1' ">$(NCrunchOriginalSolutionPath)</TheSolutionPath>
16 </PropertyGroup>
17
18 <Choose>
19 <When Condition="$(ReplacePackageReferences) AND '$(TheSolutionPath)' != '' AND '$(TheSolutionPath)' != '*undefined*' AND Exists('$(TheSolutionPath)')">
20
21 <PropertyGroup>
22 <SolutionFileContent>$([System.IO.File]::ReadAllText($(TheSolutionPath)))</SolutionFileContent>
23 <SmartSolutionDir>$([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) ))</SmartSolutionDir>
24 <RegexPattern>(?&lt;="[PackageName]", ")(.*)(?=", ")</RegexPattern>
25 </PropertyGroup>
26
27 <ItemGroup>
28 <!-- Keep the identity of the PackageReference -->
29 <SmartPackageReference Include="@(PackageReference)">
30 <PackageName>%(Identity)</PackageName>
31 <InSolution>$(SolutionFileContent.Contains('\%(Identity).csproj'))</InSolution>
32 </SmartPackageReference>
33
34 <!-- Filter them by mapping them to another ItemGroup using the WithMetadataValue item function -->
35 <PackageInSolution Include="@(SmartPackageReference->WithMetadataValue('InSolution', True))">
36 <Pattern>$(RegexPattern.Replace('[PackageName]','%(PackageName)') )</Pattern>
37 <SmartPath>$([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)'))</SmartPath>
38 </PackageInSolution>
39
40 <ProjectReference Include="@(PackageInSolution->'$(SmartSolutionDir)\%(SmartPath)' )"/>
41
42 <!-- Remove the package references that are now referenced as projects -->
43 <PackageReference Remove="@(PackageInSolution->'%(PackageName)' )"/>
44 </ItemGroup>
45
46 </When>
47 </Choose>
48</Project>
diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp
index 3c0f09c9..190c327f 100644
--- a/src/engine/engine.cpp
+++ b/src/engine/engine.cpp
@@ -144,6 +144,7 @@ extern "C" HRESULT EngineRun(
144 fXmlInitialized = TRUE; 144 fXmlInitialized = TRUE;
145 145
146 ovix.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW); 146 ovix.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW);
147 #pragma warning(suppress: 4996)
147 if (!::GetVersionExW((LPOSVERSIONINFOW)&ovix)) 148 if (!::GetVersionExW((LPOSVERSIONINFOW)&ovix))
148 { 149 {
149 ExitWithLastError(hr, "Failed to get OS info."); 150 ExitWithLastError(hr, "Failed to get OS info.");
diff --git a/src/engine/engine.vcxproj b/src/engine/engine.vcxproj
new file mode 100644
index 00000000..169c47fa
--- /dev/null
+++ b/src/engine/engine.vcxproj
@@ -0,0 +1,174 @@
1<?xml version="1.0" encoding="utf-8"?>
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.BootstrapperCore.4.0.1\build\WixToolset.BootstrapperCore.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.4.0.1\build\WixToolset.BootstrapperCore.props')" />
6 <Import Project="..\..\packages\WixToolset.DUtil.4.0.13\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.13\build\WixToolset.DUtil.props')" />
7
8 <ItemGroup Label="ProjectConfigurations">
9 <ProjectConfiguration Include="Debug|Win32">
10 <Configuration>Debug</Configuration>
11 <Platform>Win32</Platform>
12 </ProjectConfiguration>
13 <ProjectConfiguration Include="Release|Win32">
14 <Configuration>Release</Configuration>
15 <Platform>Win32</Platform>
16 </ProjectConfiguration>
17 <ProjectConfiguration Include="Debug|x64">
18 <Configuration>Debug</Configuration>
19 <Platform>x64</Platform>
20 </ProjectConfiguration>
21 <ProjectConfiguration Include="Release|x64">
22 <Configuration>Release</Configuration>
23 <Platform>x64</Platform>
24 </ProjectConfiguration>
25 </ItemGroup>
26
27 <PropertyGroup Label="Globals">
28 <ProjectGuid>{8119537D-E1D9-6591-D51A-49768A2F9C37}</ProjectGuid>
29 <ConfigurationType>StaticLibrary</ConfigurationType>
30 <TargetName>engine</TargetName>
31 <PlatformToolset>v141</PlatformToolset>
32 <CharacterSet>Unicode</CharacterSet>
33 <Description>Native component of WixToolset.Burn</Description>
34 </PropertyGroup>
35
36 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
37 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
38
39 <ImportGroup Label="ExtensionSettings">
40 </ImportGroup>
41
42 <ImportGroup Label="Shared">
43 </ImportGroup>
44
45 <PropertyGroup>
46 <ProjectAdditionalIncludeDirectories>$(ProjectDir)..\inc</ProjectAdditionalIncludeDirectories>
47 </PropertyGroup>
48
49 <ItemGroup>
50 <ClCompile Include="apply.cpp" />
51 <ClCompile Include="approvedexe.cpp" />
52 <ClCompile Include="bitsengine.cpp" />
53 <ClCompile Include="catalog.cpp" />
54 <ClCompile Include="detect.cpp" />
55 <ClCompile Include="embedded.cpp" />
56 <ClCompile Include="EngineForApplication.cpp" />
57 <ClCompile Include="cabextract.cpp" />
58 <ClCompile Include="cache.cpp" />
59 <ClCompile Include="condition.cpp" />
60 <ClCompile Include="container.cpp" />
61 <ClCompile Include="core.cpp" />
62 <ClCompile Include="dependency.cpp" />
63 <ClCompile Include="elevation.cpp" />
64 <ClCompile Include="engine.cpp" />
65 <ClCompile Include="exeengine.cpp" />
66 <ClCompile Include="logging.cpp" />
67 <ClCompile Include="manifest.cpp" />
68 <ClCompile Include="msiengine.cpp" />
69 <ClCompile Include="mspengine.cpp" />
70 <ClCompile Include="msuengine.cpp" />
71 <ClCompile Include="NetFxChainer.cpp" />
72 <ClCompile Include="package.cpp" />
73 <ClCompile Include="payload.cpp" />
74 <ClCompile Include="pipe.cpp" />
75 <ClCompile Include="plan.cpp" />
76 <ClCompile Include="platform.cpp" />
77 <ClCompile Include="precomp.cpp">
78 <PrecompiledHeader>Create</PrecompiledHeader>
79 </ClCompile>
80 <ClCompile Include="pseudobundle.cpp" />
81 <ClCompile Include="registration.cpp" />
82 <ClCompile Include="relatedbundle.cpp" />
83 <ClCompile Include="search.cpp" />
84 <ClCompile Include="section.cpp" />
85 <ClCompile Include="splashscreen.cpp" />
86 <ClCompile Include="uithread.cpp" />
87 <ClCompile Include="update.cpp" />
88 <ClCompile Include="userexperience.cpp" />
89 <ClCompile Include="variable.cpp" />
90 <ClCompile Include="variant.cpp" />
91 </ItemGroup>
92
93 <ItemGroup>
94 <ClInclude Include="..\inc\BootstrapperApplication.h" />
95 <ClInclude Include="..\inc\BootstrapperEngine.h" />
96 </ItemGroup>
97
98 <ItemGroup>
99 <ClInclude Include="apply.h" />
100 <ClInclude Include="approvedexe.h" />
101 <ClInclude Include="bitsengine.h" />
102 <ClInclude Include="cabextract.h" />
103 <ClInclude Include="cache.h" />
104 <ClInclude Include="catalog.h" />
105 <ClInclude Include="condition.h" />
106 <ClInclude Include="container.h" />
107 <ClInclude Include="core.h" />
108 <ClInclude Include="dependency.h" />
109 <ClInclude Include="detect.h" />
110 <ClInclude Include="elevation.h" />
111 <ClInclude Include="embedded.h" />
112 <ClInclude Include="EngineForApplication.h" />
113 <ClInclude Include="exeengine.h" />
114 <ClInclude Include="inc\engine.h" />
115 <ClInclude Include="logging.h" />
116 <ClInclude Include="manifest.h" />
117 <ClInclude Include="msiengine.h" />
118 <ClInclude Include="mspengine.h" />
119 <ClInclude Include="msuengine.h" />
120 <ClInclude Include="netfxchainer.h" />
121 <ClInclude Include="package.h" />
122 <ClInclude Include="payload.h" />
123 <ClInclude Include="pipe.h" />
124 <ClInclude Include="plan.h" />
125 <ClInclude Include="platform.h" />
126 <ClInclude Include="precomp.h" />
127 <ClInclude Include="pseudobundle.h" />
128 <ClInclude Include="registration.h" />
129 <ClInclude Include="relatedbundle.h" />
130 <ClInclude Include="search.h" />
131 <ClInclude Include="section.h" />
132 <ClInclude Include="splashscreen.h" />
133 <ClInclude Include="uithread.h" />
134 <ClInclude Include="update.h" />
135 <ClInclude Include="userexperience.h" />
136 <ClInclude Include="variable.h" />
137 <ClInclude Include="variant.h" />
138 </ItemGroup>
139
140 <ItemGroup>
141 <None Include="packages.config" />
142 </ItemGroup>
143
144 <ItemGroup>
145 <CustomBuild Include="engine.mc">
146 <Message>Compiling message file...</Message>
147 <Command>mc.exe -h "$(IntDir)." -r "$(IntDir)." -A -c -z engine.messages "$(InputDir)engine.mc"
148rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command>
149 <Outputs>$(IntDir)engine.messages.h;$(OutDir)engine.messages.rc</Outputs>
150 </CustomBuild>
151 </ItemGroup>
152
153 <Target Name="SetWixVersion"
154 DependsOnTargets="GetBuildVersion"
155 BeforeTargets="ClCompile">
156 <ItemGroup>
157 <ClCompile>
158 <!-- TODO: get rmj and rmm dynamically -->
159 <PreprocessorDefinitions>rmj=4;rmm=0;rup=$(BuildNumber);szVerMajorMinorBuild="$(BuildVersion)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
160 </ClCompile>
161 </ItemGroup>
162 </Target>
163
164 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
165 <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
166 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
167 <PropertyGroup>
168 <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>
169 </PropertyGroup>
170 <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.4.0.1\build\WixToolset.BootstrapperCore.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.4.0.1\build\WixToolset.BootstrapperCore.props'))" />
171 <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.13\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.13\build\WixToolset.DUtil.props'))" />
172 <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'))" />
173 </Target>
174</Project>
diff --git a/src/engine/packages.config b/src/engine/packages.config
new file mode 100644
index 00000000..52c84cf0
--- /dev/null
+++ b/src/engine/packages.config
@@ -0,0 +1,6 @@
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.BootstrapperCore" version="4.0.1" targetFramework="native" />
5 <package id="WixToolset.DUtil" version="4.0.13" targetFramework="native" />
6</packages> \ No newline at end of file
diff --git a/src/engine/precomp.cpp b/src/engine/precomp.cpp
new file mode 100644
index 00000000..37664a1c
--- /dev/null
+++ b/src/engine/precomp.cpp
@@ -0,0 +1,3 @@
1// 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.
2
3#include "precomp.h"
diff --git a/src/engine/precomp.h b/src/engine/precomp.h
index d3ebe354..477dc310 100644
--- a/src/engine/precomp.h
+++ b/src/engine/precomp.h
@@ -4,12 +4,15 @@
4 4
5#define ExitTrace LogErrorString 5#define ExitTrace LogErrorString
6 6
7#include <wixver.h>
8
9#include <windows.h> 7#include <windows.h>
10#include <aclapi.h> 8#include <aclapi.h>
11#include <Bits.h> 9#include <Bits.h>
10
11#pragma warning(push)
12#pragma warning(disable:4458) // declaration of 'xxx' hides class member
12#include <gdiplus.h> 13#include <gdiplus.h>
14#pragma warning(pop)
15
13#include <math.h> 16#include <math.h>
14#include <msiquery.h> 17#include <msiquery.h>
15#include <sddl.h> 18#include <sddl.h>
diff --git a/src/engine/variable.cpp b/src/engine/variable.cpp
index ed4abea2..7377b116 100644
--- a/src/engine/variable.cpp
+++ b/src/engine/variable.cpp
@@ -1698,6 +1698,7 @@ static HRESULT InitializeVariableOsInfo(
1698 BURN_VARIANT value = { }; 1698 BURN_VARIANT value = { };
1699 1699
1700 ovix.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW); 1700 ovix.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW);
1701 #pragma warning(suppress: 4996)
1701 if (!::GetVersionExW((LPOSVERSIONINFOW)&ovix)) 1702 if (!::GetVersionExW((LPOSVERSIONINFOW)&ovix))
1702 { 1703 {
1703 ExitWithLastError(hr, "Failed to get OS info."); 1704 ExitWithLastError(hr, "Failed to get OS info.");
diff --git a/src/stub/packages.config b/src/stub/packages.config
new file mode 100644
index 00000000..883e8d91
--- /dev/null
+++ b/src/stub/packages.config
@@ -0,0 +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.13" targetFramework="native" />
5</packages> \ No newline at end of file
diff --git a/src/stub/precomp.cpp b/src/stub/precomp.cpp
new file mode 100644
index 00000000..37664a1c
--- /dev/null
+++ b/src/stub/precomp.cpp
@@ -0,0 +1,3 @@
1// 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.
2
3#include "precomp.h"
diff --git a/src/stub/runtime.win.WixToolset.Burn.nuspec b/src/stub/runtime.win.WixToolset.Burn.nuspec
new file mode 100644
index 00000000..e296bf8f
--- /dev/null
+++ b/src/stub/runtime.win.WixToolset.Burn.nuspec
@@ -0,0 +1,20 @@
1<?xml version="1.0"?>
2<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3 <metadata minClientVersion="4.0">
4 <id>$id$</id>
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>
10 <projectUrl>https://github.com/wixtoolset/burn</projectUrl>
11 <requireLicenseAcceptance>false</requireLicenseAcceptance>
12 <description>$description$</description>
13 <copyright>$copyright$</copyright>
14 </metadata>
15
16 <files>
17 <file src="Win32\burn.x86.exe" target="runtimes\win-x86\native" />
18 <file src="Win32\burn.x86.pdb" target="runtimes\win-x86\native" />
19 </files>
20</package>
diff --git a/src/stub/stub.rc b/src/stub/stub.rc
index 5601703d..80e1aac4 100644
--- a/src/stub/stub.rc
+++ b/src/stub/stub.rc
@@ -1,14 +1,3 @@
1// 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. 1// 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.
2 2
3#define VER_APP
4#define VER_ORIGINAL_FILENAME "setup.exe"
5#define VER_INTERNAL_NAME "setup"
6#define VER_FILE_DESCRIPTION "WiX Toolset Bootstrapper"
7#include "wix.rc"
8
91 ICON "stub.ico" 31 ICON "stub.ico"
10
11//#define MANIFEST_RESOURCE_ID 1
12#ifndef ARM // the ARM manifest is automatically injected but other platforms need it done manually.
13//MANIFEST_RESOURCE_ID RT_MANIFEST "stub.manifest"
14#endif
diff --git a/src/stub/stub.vcxproj b/src/stub/stub.vcxproj
new file mode 100644
index 00000000..89b811ca
--- /dev/null
+++ b/src/stub/stub.vcxproj
@@ -0,0 +1,104 @@
1<?xml version="1.0" encoding="utf-8"?>
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.13\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.13\build\WixToolset.DUtil.props')" />
6
7 <ItemGroup Label="ProjectConfigurations">
8 <ProjectConfiguration Include="Debug|Win32">
9 <Configuration>Debug</Configuration>
10 <Platform>Win32</Platform>
11 </ProjectConfiguration>
12 <ProjectConfiguration Include="Release|Win32">
13 <Configuration>Release</Configuration>
14 <Platform>Win32</Platform>
15 </ProjectConfiguration>
16 <ProjectConfiguration Include="Debug|x64">
17 <Configuration>Debug</Configuration>
18 <Platform>x64</Platform>
19 </ProjectConfiguration>
20 <ProjectConfiguration Include="Release|x64">
21 <Configuration>Release</Configuration>
22 <Platform>x64</Platform>
23 </ProjectConfiguration>
24 </ItemGroup>
25
26 <PropertyGroup>
27 <NameSuffix Condition=" '$(Platform)'=='Win32' ">x86</NameSuffix>
28 <NameSuffix Condition=" '$(Platform)'=='x64' ">amd64</NameSuffix>
29 </PropertyGroup>
30
31 <PropertyGroup Label="Globals">
32 <ProjectGuid>{C38373AA-882F-4F55-B03F-2AAB4BFBE3F1}</ProjectGuid>
33 <ConfigurationType>Application</ConfigurationType>
34 <ProjectSubSystem>Windows</ProjectSubSystem>
35 <TargetName>burn.$(NameSuffix)</TargetName>
36 <PlatformToolset>v141</PlatformToolset>
37 <CharacterSet>Unicode</CharacterSet>
38 <Description>Native component of WixToolset.Burn</Description>
39 </PropertyGroup>
40
41 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
42 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
43
44 <ImportGroup Label="ExtensionSettings">
45 </ImportGroup>
46
47 <ImportGroup Label="Shared">
48 <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
49 </ImportGroup>
50
51 <PropertyGroup>
52 <ProjectAdditionalIncludeDirectories>$(ProjectDir)..\engine\inc</ProjectAdditionalIncludeDirectories>
53 <ProjectAdditionalLinkLibraries>cabinet.lib;crypt32.lib;gdiplus.lib;msi.lib;rpcrt4.lib;shlwapi.lib;wininet.lib;wintrust.lib;wuguid.lib;engine.lib;engine.res</ProjectAdditionalLinkLibraries>
54 </PropertyGroup>
55
56 <ItemDefinitionGroup>
57 <Link>
58 <SwapRunFromCD>true</SwapRunFromCD>
59 <SwapRunFromNET>true</SwapRunFromNET>
60 <DelayLoadDLLs>cabinet.dll;crypt32.dll;gdiplus.dll;msi.dll;shlwapi.dll;version.dll;wininet.dll;wintrust.dll</DelayLoadDLLs>
61 </Link>
62 </ItemDefinitionGroup>
63
64 <ItemGroup>
65 <ClInclude Include="precomp.h" />
66 </ItemGroup>
67 <ItemGroup>
68 <ClCompile Include="precomp.cpp">
69 <PrecompiledHeader>Create</PrecompiledHeader>
70 </ClCompile>
71 <ClCompile Include="stub.cpp" />
72 <ClCompile Include="StubSection.cpp">
73 <!-- Workaround for VS2015 behavior change that omits the .wixburn section. -->
74 <RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
75 </ClCompile>
76 </ItemGroup>
77 <ItemGroup>
78 <Manifest Include="stub.manifest" />
79 </ItemGroup>
80 <ItemGroup>
81 <ResourceCompile Include="stub.rc" />
82 </ItemGroup>
83
84 <ItemGroup>
85 <ProjectReference Include="..\engine\engine.vcxproj" />
86 </ItemGroup>
87
88 <ItemGroup>
89 <None Include="packages.config" />
90 </ItemGroup>
91
92 <Target Name="Pack" DependsOnTargets="GetBuildVersion">
93 <Exec Command='nuget pack runtime.win.WixToolset.Burn.nuspec -BasePath "$(BaseOutputPath)$(Configuration)" -OutputDirectory "$(BaseOutputPath)$(Configuration)" -NoPackageAnalysis -Properties Configuration=$(Configuration);Id=runtime.win.WixToolset.Burn;Version="$(BuildVersionSimple)";Platform=$(PlatformTarget);Authors="$(Authors)";Copyright="$(Copyright)";Description="$(Description)";Title="$(Title)"' />
94 </Target>
95
96 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
97 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
98 <PropertyGroup>
99 <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>
100 </PropertyGroup>
101 <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'))" />
102 <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.13\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.13\build\WixToolset.DUtil.props'))" />
103 </Target>
104</Project>