diff options
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/engine.cpp | 1 | ||||
-rw-r--r-- | src/engine/engine.vcxproj | 174 | ||||
-rw-r--r-- | src/engine/packages.config | 6 | ||||
-rw-r--r-- | src/engine/precomp.cpp | 3 | ||||
-rw-r--r-- | src/engine/precomp.h | 7 | ||||
-rw-r--r-- | src/engine/variable.cpp | 1 |
6 files changed, 190 insertions, 2 deletions
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" | ||
148 | rc.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."); |