diff options
author | Bob Arnson <bob@firegiant.com> | 2020-07-04 19:02:15 -0400 |
---|---|---|
committer | Bob Arnson <bob@firegiant.com> | 2020-07-04 19:06:16 -0400 |
commit | ecb774445b177c739864cbd0f6ad441c7864e3be (patch) | |
tree | 410717cb3b17e154b2056772b68a2e89b87ab136 | |
parent | cd0d556f06a220c3406d3a42a4e4628ee1cb7cd6 (diff) | |
download | wix-ecb774445b177c739864cbd0f6ad441c7864e3be.tar.gz wix-ecb774445b177c739864cbd0f6ad441c7864e3be.tar.bz2 wix-ecb774445b177c739864cbd0f6ad441c7864e3be.zip |
Add per-platform custom action support.
-rw-r--r-- | Http.wixext.sln | 4 | ||||
-rw-r--r-- | src/ca/caDecor.h | 13 | ||||
-rw-r--r-- | src/ca/httpca.vcxproj | 50 | ||||
-rw-r--r-- | src/ca/httpca.vcxproj.filters | 4 | ||||
-rw-r--r-- | src/ca/precomp.h | 2 | ||||
-rw-r--r-- | src/ca/wixhttpca.cpp | 9 | ||||
-rw-r--r-- | src/wixext/HttpCompiler.cs | 15 | ||||
-rw-r--r-- | src/wixlib/HttpExtension_Platform.wxi | 32 | ||||
-rw-r--r-- | src/wixlib/HttpExtension_arm.wxs | 8 | ||||
-rw-r--r-- | src/wixlib/HttpExtension_arm64.wxs | 8 | ||||
-rw-r--r-- | src/wixlib/HttpExtension_x64.wxs | 8 | ||||
-rw-r--r-- | src/wixlib/caDecor.wxi | 40 | ||||
-rw-r--r-- | src/wixlib/caSuffix.wxi | 28 | ||||
-rw-r--r-- | src/wixlib/http.wixproj | 13 |
14 files changed, 151 insertions, 83 deletions
diff --git a/Http.wixext.sln b/Http.wixext.sln index 1e17caf7..fe5c52e9 100644 --- a/Http.wixext.sln +++ b/Http.wixext.sln | |||
@@ -1,7 +1,7 @@ | |||
1 | | 1 | |
2 | Microsoft Visual Studio Solution File, Format Version 12.00 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 |
3 | # Visual Studio 15 | 3 | # Visual Studio Version 16 |
4 | VisualStudioVersion = 15.0.28010.2016 | 4 | VisualStudioVersion = 16.0.30204.135 |
5 | MinimumVisualStudioVersion = 10.0.40219.1 | 5 | MinimumVisualStudioVersion = 10.0.40219.1 |
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "httpca", "src\ca\httpca.vcxproj", "{90743805-C043-47C7-B5FF-8F5EE5C8A2DE}" | 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "httpca", "src\ca\httpca.vcxproj", "{90743805-C043-47C7-B5FF-8F5EE5C8A2DE}" |
7 | EndProject | 7 | EndProject |
diff --git a/src/ca/caDecor.h b/src/ca/caDecor.h new file mode 100644 index 00000000..da274650 --- /dev/null +++ b/src/ca/caDecor.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #pragma once | ||
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 | #if defined(_M_ARM64) | ||
6 | #define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64" | ||
7 | #elif defined(_M_AMD64) | ||
8 | #define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64" | ||
9 | #elif defined(_M_ARM) | ||
10 | #define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM" | ||
11 | #else | ||
12 | #define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86" | ||
13 | #endif | ||
diff --git a/src/ca/httpca.vcxproj b/src/ca/httpca.vcxproj index aa88d62e..608224c2 100644 --- a/src/ca/httpca.vcxproj +++ b/src/ca/httpca.vcxproj | |||
@@ -1,10 +1,9 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 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. --> | 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"> | 3 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
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')" /> | 4 | <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 | <Import Project="..\..\packages\WixToolset.WcaUtil.4.0.16\build\WixToolset.WcaUtil.props" Condition="Exists('..\..\packages\WixToolset.WcaUtil.4.0.16\build\WixToolset.WcaUtil.props')" /> | 5 | <Import Project="..\..\packages\WixToolset.WcaUtil.4.0.16\build\WixToolset.WcaUtil.props" Condition="Exists('..\..\packages\WixToolset.WcaUtil.4.0.16\build\WixToolset.WcaUtil.props')" /> |
7 | 6 | ||
8 | <ItemGroup Label="ProjectConfigurations"> | 7 | <ItemGroup Label="ProjectConfigurations"> |
9 | <ProjectConfiguration Include="Debug|Win32"> | 8 | <ProjectConfiguration Include="Debug|Win32"> |
10 | <Configuration>Debug</Configuration> | 9 | <Configuration>Debug</Configuration> |
@@ -14,44 +13,63 @@ | |||
14 | <Configuration>Release</Configuration> | 13 | <Configuration>Release</Configuration> |
15 | <Platform>Win32</Platform> | 14 | <Platform>Win32</Platform> |
16 | </ProjectConfiguration> | 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 | <ProjectConfiguration Include="Debug|ARM"> | ||
25 | <Configuration>Debug</Configuration> | ||
26 | <Platform>ARM</Platform> | ||
27 | </ProjectConfiguration> | ||
28 | <ProjectConfiguration Include="Release|ARM"> | ||
29 | <Configuration>Release</Configuration> | ||
30 | <Platform>ARM</Platform> | ||
31 | </ProjectConfiguration> | ||
32 | <ProjectConfiguration Include="Debug|ARM64"> | ||
33 | <Configuration>Debug</Configuration> | ||
34 | <Platform>ARM64</Platform> | ||
35 | </ProjectConfiguration> | ||
36 | <ProjectConfiguration Include="Release|ARM64"> | ||
37 | <Configuration>Release</Configuration> | ||
38 | <Platform>ARM64</Platform> | ||
39 | </ProjectConfiguration> | ||
17 | </ItemGroup> | 40 | </ItemGroup> |
18 | 41 | ||
19 | <PropertyGroup Label="Globals"> | 42 | <PropertyGroup Label="Globals"> |
20 | <ProjectGuid>{90743805-C043-47C7-B5FF-8F5EE5C8A2DE}</ProjectGuid> | 43 | <ProjectGuid>{90743805-C043-47C7-B5FF-8F5EE5C8A2DE}</ProjectGuid> |
21 | <ConfigurationType>DynamicLibrary</ConfigurationType> | 44 | <ConfigurationType>DynamicLibrary</ConfigurationType> |
22 | <PlatformToolset>v141</PlatformToolset> | 45 | <PlatformToolset>v142</PlatformToolset> |
23 | <CharacterSet>Unicode</CharacterSet> | 46 | <CharacterSet>Unicode</CharacterSet> |
24 | <TargetName>httpca</TargetName> | 47 | <TargetName>httpca</TargetName> |
25 | <ProjectModuleDefinitionFile>wixhttpca.def</ProjectModuleDefinitionFile> | 48 | <ProjectModuleDefinitionFile>wixhttpca.def</ProjectModuleDefinitionFile> |
26 | <Description>WiX Toolset Http CustomAction</Description> | 49 | <Description>WiX Toolset Http CustomAction</Description> |
50 | <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> | ||
27 | </PropertyGroup> | 51 | </PropertyGroup> |
28 | 52 | ||
29 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | 53 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
30 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 54 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
31 | 55 | ||
32 | <PropertyGroup> | 56 | <PropertyGroup> |
33 | <ProjectAdditionalLinkLibraries>crypt32.lib;httpapi.lib;msi.lib</ProjectAdditionalLinkLibraries> | 57 | <ProjectAdditionalLinkLibraries>crypt32.lib;httpapi.lib;msi.lib</ProjectAdditionalLinkLibraries> |
34 | </PropertyGroup> | 58 | </PropertyGroup> |
35 | 59 | ||
36 | <ItemGroup> | 60 | <ItemGroup> |
37 | <ClCompile Include="dllmain.cpp"> | 61 | <ClCompile Include="dllmain.cpp"> |
38 | <PrecompiledHeader>Create</PrecompiledHeader> | 62 | <PrecompiledHeader>Create</PrecompiledHeader> |
39 | </ClCompile> | 63 | </ClCompile> |
40 | <ClCompile Include="wixhttpca.cpp" /> | 64 | <ClCompile Include="wixhttpca.cpp" /> |
41 | </ItemGroup> | ||
42 | |||
43 | <ItemGroup> | ||
44 | <ClInclude Include="cost.h" /> | 65 | <ClInclude Include="cost.h" /> |
45 | <ClInclude Include="precomp.h" /> | 66 | <ClInclude Include="precomp.h" /> |
46 | </ItemGroup> | ||
47 | |||
48 | <ItemGroup> | ||
49 | <None Include="packages.config" /> | 67 | <None Include="packages.config" /> |
50 | <None Include="wixhttpca.def" /> | 68 | <None Include="wixhttpca.def" /> |
51 | </ItemGroup> | 69 | </ItemGroup> |
52 | 70 | ||
53 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 71 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
54 | 72 | ||
55 | <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | 73 | <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
56 | <PropertyGroup> | 74 | <PropertyGroup> |
57 | <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> | 75 | <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> |
@@ -59,4 +77,4 @@ | |||
59 | <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'))" /> | 77 | <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'))" /> |
60 | <Error Condition="!Exists('..\..\packages\WixToolset.WcaUtil.4.0.16\build\WixToolset.WcaUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.WcaUtil.4.0.16\build\WixToolset.WcaUtil.props'))" /> | 78 | <Error Condition="!Exists('..\..\packages\WixToolset.WcaUtil.4.0.16\build\WixToolset.WcaUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.WcaUtil.4.0.16\build\WixToolset.WcaUtil.props'))" /> |
61 | </Target> | 79 | </Target> |
62 | </Project> | 80 | </Project> \ No newline at end of file |
diff --git a/src/ca/httpca.vcxproj.filters b/src/ca/httpca.vcxproj.filters index d2ab3287..979b9ef3 100644 --- a/src/ca/httpca.vcxproj.filters +++ b/src/ca/httpca.vcxproj.filters | |||
@@ -26,10 +26,14 @@ | |||
26 | <ClInclude Include="precomp.h"> | 26 | <ClInclude Include="precomp.h"> |
27 | <Filter>Header Files</Filter> | 27 | <Filter>Header Files</Filter> |
28 | </ClInclude> | 28 | </ClInclude> |
29 | <ClInclude Include="cost.h"> | ||
30 | <Filter>Header Files</Filter> | ||
31 | </ClInclude> | ||
29 | </ItemGroup> | 32 | </ItemGroup> |
30 | <ItemGroup> | 33 | <ItemGroup> |
31 | <None Include="wixhttpca.def"> | 34 | <None Include="wixhttpca.def"> |
32 | <Filter>Source Files</Filter> | 35 | <Filter>Source Files</Filter> |
33 | </None> | 36 | </None> |
37 | <None Include="packages.config" /> | ||
34 | </ItemGroup> | 38 | </ItemGroup> |
35 | </Project> \ No newline at end of file | 39 | </Project> \ No newline at end of file |
diff --git a/src/ca/precomp.h b/src/ca/precomp.h index 85aeb70e..d5143dac 100644 --- a/src/ca/precomp.h +++ b/src/ca/precomp.h | |||
@@ -14,3 +14,5 @@ | |||
14 | #include "aclutil.h" | 14 | #include "aclutil.h" |
15 | 15 | ||
16 | #include "cost.h" | 16 | #include "cost.h" |
17 | |||
18 | #include "caDecor.h" | ||
diff --git a/src/ca/wixhttpca.cpp b/src/ca/wixhttpca.cpp index 58b46c0f..3c091192 100644 --- a/src/ca/wixhttpca.cpp +++ b/src/ca/wixhttpca.cpp | |||
@@ -193,16 +193,16 @@ static UINT SchedHttpUrlReservations( | |||
193 | 193 | ||
194 | if (WCA_TODO_INSTALL == todoSched) | 194 | if (WCA_TODO_INSTALL == todoSched) |
195 | { | 195 | { |
196 | hr = WcaDoDeferredAction(L"WixRollbackHttpUrlReservationsInstall", sczRollbackCustomActionData, cUrlReservations * COST_HTTP_URL_ACL); | 196 | hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixRollbackHttpUrlReservationsInstall"), sczRollbackCustomActionData, cUrlReservations * COST_HTTP_URL_ACL); |
197 | ExitOnFailure(hr, "Failed to schedule install URL reservations rollback."); | 197 | ExitOnFailure(hr, "Failed to schedule install URL reservations rollback."); |
198 | hr = WcaDoDeferredAction(L"WixExecHttpUrlReservationsInstall", sczCustomActionData, cUrlReservations * COST_HTTP_URL_ACL); | 198 | hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixExecHttpUrlReservationsInstall"), sczCustomActionData, cUrlReservations * COST_HTTP_URL_ACL); |
199 | ExitOnFailure(hr, "Failed to schedule install URL reservations execution."); | 199 | ExitOnFailure(hr, "Failed to schedule install URL reservations execution."); |
200 | } | 200 | } |
201 | else | 201 | else |
202 | { | 202 | { |
203 | hr = WcaDoDeferredAction(L"WixRollbackHttpUrlReservationsUninstall", sczRollbackCustomActionData, cUrlReservations * COST_HTTP_URL_ACL); | 203 | hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixRollbackHttpUrlReservationsUninstall"), sczRollbackCustomActionData, cUrlReservations * COST_HTTP_URL_ACL); |
204 | ExitOnFailure(hr, "Failed to schedule uninstall URL reservations rollback."); | 204 | ExitOnFailure(hr, "Failed to schedule uninstall URL reservations rollback."); |
205 | hr = WcaDoDeferredAction(L"WixExecHttpUrlReservationsUninstall", sczCustomActionData, cUrlReservations * COST_HTTP_URL_ACL); | 205 | hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WixExecHttpUrlReservationsUninstall"), sczCustomActionData, cUrlReservations * COST_HTTP_URL_ACL); |
206 | ExitOnFailure(hr, "Failed to schedule uninstall URL reservations execution."); | 206 | ExitOnFailure(hr, "Failed to schedule uninstall URL reservations execution."); |
207 | } | 207 | } |
208 | } | 208 | } |
@@ -210,6 +210,7 @@ static UINT SchedHttpUrlReservations( | |||
210 | { | 210 | { |
211 | WcaLog(LOGMSG_STANDARD, "No URL reservations scheduled."); | 211 | WcaLog(LOGMSG_STANDARD, "No URL reservations scheduled."); |
212 | } | 212 | } |
213 | |||
213 | LExit: | 214 | LExit: |
214 | ReleaseStr(sczSDDL); | 215 | ReleaseStr(sczSDDL); |
215 | ReleaseStr(sczExistingSDDL); | 216 | ReleaseStr(sczExistingSDDL); |
diff --git a/src/wixext/HttpCompiler.cs b/src/wixext/HttpCompiler.cs index bc64add2..a8c1bca8 100644 --- a/src/wixext/HttpCompiler.cs +++ b/src/wixext/HttpCompiler.cs | |||
@@ -7,6 +7,7 @@ namespace WixToolset.Http | |||
7 | using System.Xml.Linq; | 7 | using System.Xml.Linq; |
8 | using WixToolset.Data; | 8 | using WixToolset.Data; |
9 | using WixToolset.Extensibility; | 9 | using WixToolset.Extensibility; |
10 | using WixToolset.Extensibility.Data; | ||
10 | using WixToolset.Http.Symbols; | 11 | using WixToolset.Http.Symbols; |
11 | 12 | ||
12 | /// <summary> | 13 | /// <summary> |
@@ -177,18 +178,8 @@ namespace WixToolset.Http | |||
177 | ComponentRef = componentId, | 178 | ComponentRef = componentId, |
178 | }); | 179 | }); |
179 | 180 | ||
180 | if (this.Context.Platform == Platform.ARM) | 181 | this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "SchedHttpUrlReservationsInstall", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); |
181 | { | 182 | this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "SchedHttpUrlReservationsUninstall", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); |
182 | // Ensure ARM version of the CA is referenced. | ||
183 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "WixSchedHttpUrlReservationsInstall_ARM"); | ||
184 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "WixSchedHttpUrlReservationsUninstall_ARM"); | ||
185 | } | ||
186 | else | ||
187 | { | ||
188 | // All other supported platforms use x86. | ||
189 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "WixSchedHttpUrlReservationsInstall"); | ||
190 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "WixSchedHttpUrlReservationsUninstall"); | ||
191 | } | ||
192 | } | 183 | } |
193 | } | 184 | } |
194 | 185 | ||
diff --git a/src/wixlib/HttpExtension_Platform.wxi b/src/wixlib/HttpExtension_Platform.wxi index 223b8e06..28b3afe1 100644 --- a/src/wixlib/HttpExtension_Platform.wxi +++ b/src/wixlib/HttpExtension_Platform.wxi | |||
@@ -3,37 +3,39 @@ | |||
3 | 3 | ||
4 | 4 | ||
5 | <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> | 5 | <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> |
6 | <?include caSuffix.wxi ?> | 6 | <?include caDecor.wxi ?> |
7 | |||
7 | <Fragment> | 8 | <Fragment> |
8 | <UIRef Id="WixHttpErrors" /> | 9 | <UIRef Id="WixHttpErrors" /> |
9 | <UI> | 10 | <UI> |
10 | <ProgressText Action="WixSchedHttpUrlReservationsInstall$(var.Suffix)">!(loc.WixSchedHttpUrlReservationsInstall)</ProgressText> | 11 | <ProgressText Action="$(var.Prefix)SchedHttpUrlReservationsInstall$(var.Suffix)">!(loc.WixSchedHttpUrlReservationsInstall)</ProgressText> |
11 | <ProgressText Action="WixSchedHttpUrlReservationsUninstall$(var.Suffix)">!(loc.WixSchedHttpUrlReservationsUninstall)</ProgressText> | 12 | <ProgressText Action="$(var.Prefix)SchedHttpUrlReservationsUninstall$(var.Suffix)">!(loc.WixSchedHttpUrlReservationsUninstall)</ProgressText> |
12 | <ProgressText Action="WixRollbackHttpUrlReservationsInstall$(var.DeferredSuffix)">!(loc.WixRollbackHttpUrlReservationsInstall)</ProgressText> | 13 | <ProgressText Action="$(var.Prefix)RollbackHttpUrlReservationsInstall$(var.Suffix)">!(loc.WixRollbackHttpUrlReservationsInstall)</ProgressText> |
13 | <ProgressText Action="WixExecHttpUrlReservationsInstall$(var.DeferredSuffix)">!(loc.WixExecHttpUrlReservationsInstall)</ProgressText> | 14 | <ProgressText Action="$(var.Prefix)ExecHttpUrlReservationsInstall$(var.Suffix)">!(loc.WixExecHttpUrlReservationsInstall)</ProgressText> |
14 | <ProgressText Action="WixRollbackHttpUrlReservationsUninstall$(var.DeferredSuffix)">!(loc.WixRollbackHttpUrlReservationsUninstall)</ProgressText> | 15 | <ProgressText Action="$(var.Prefix)RollbackHttpUrlReservationsUninstall$(var.Suffix)">!(loc.WixRollbackHttpUrlReservationsUninstall)</ProgressText> |
15 | <ProgressText Action="WixExecHttpUrlReservationsUninstall$(var.DeferredSuffix)">!(loc.WixExecHttpUrlReservationsUninstall)</ProgressText> | 16 | <ProgressText Action="$(var.Prefix)ExecHttpUrlReservationsUninstall$(var.Suffix)">!(loc.WixExecHttpUrlReservationsUninstall)</ProgressText> |
16 | </UI> | 17 | </UI> |
17 | 18 | ||
18 | <CustomAction Id="WixSchedHttpUrlReservationsInstall$(var.Suffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="SchedHttpUrlReservationsInstall" Execute="immediate" Return="check" SuppressModularization="yes" /> | 19 | <CustomAction Id="$(var.Prefix)SchedHttpUrlReservationsInstall$(var.Suffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="SchedHttpUrlReservationsInstall" Execute="immediate" Return="check" SuppressModularization="yes" /> |
19 | <CustomAction Id="WixSchedHttpUrlReservationsUninstall$(var.Suffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="SchedHttpUrlReservationsUninstall" Execute="immediate" Return="check" SuppressModularization="yes" /> | 20 | <CustomAction Id="$(var.Prefix)SchedHttpUrlReservationsUninstall$(var.Suffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="SchedHttpUrlReservationsUninstall" Execute="immediate" Return="check" SuppressModularization="yes" /> |
20 | <CustomAction Id="WixRollbackHttpUrlReservationsInstall$(var.DeferredSuffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="ExecHttpUrlReservations" Execute="rollback" Impersonate="no" Return="check" SuppressModularization="yes" /> | 21 | <CustomAction Id="$(var.Prefix)RollbackHttpUrlReservationsInstall$(var.Suffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="ExecHttpUrlReservations" Execute="rollback" Impersonate="no" Return="check" SuppressModularization="yes" /> |
21 | <CustomAction Id="WixExecHttpUrlReservationsInstall$(var.DeferredSuffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="ExecHttpUrlReservations" Execute="deferred" Impersonate="no" Return="check" SuppressModularization="yes" /> | 22 | <CustomAction Id="$(var.Prefix)ExecHttpUrlReservationsInstall$(var.Suffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="ExecHttpUrlReservations" Execute="deferred" Impersonate="no" Return="check" SuppressModularization="yes" /> |
22 | <CustomAction Id="WixRollbackHttpUrlReservationsUninstall$(var.DeferredSuffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="ExecHttpUrlReservations" Execute="rollback" Impersonate="no" Return="check" SuppressModularization="yes" /> | 23 | <CustomAction Id="$(var.Prefix)RollbackHttpUrlReservationsUninstall$(var.Suffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="ExecHttpUrlReservations" Execute="rollback" Impersonate="no" Return="check" SuppressModularization="yes" /> |
23 | <CustomAction Id="WixExecHttpUrlReservationsUninstall$(var.DeferredSuffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="ExecHttpUrlReservations" Execute="deferred" Impersonate="no" Return="check" SuppressModularization="yes" /> | 24 | <CustomAction Id="$(var.Prefix)ExecHttpUrlReservationsUninstall$(var.Suffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="ExecHttpUrlReservations" Execute="deferred" Impersonate="no" Return="check" SuppressModularization="yes" /> |
24 | 25 | ||
25 | <!-- | 26 | <!-- |
26 | We need the HTTP server on Windows XP SP2 or later. | 27 | We need the HTTP server on Windows XP SP2 or later. |
27 | --> | 28 | --> |
28 | <InstallExecuteSequence> | 29 | <InstallExecuteSequence> |
29 | <Custom Action="WixSchedHttpUrlReservationsUninstall$(var.Suffix)" Before="RemoveFiles" Overridable="yes"> | 30 | <Custom Action="$(var.Prefix)SchedHttpUrlReservationsUninstall$(var.Suffix)" Before="RemoveFiles" Overridable="yes"> |
30 | <![CDATA[ VersionNT >= 600 OR (VersionNT >= 501 AND ((MsiNTProductType = 1 AND ServicePackLevel >= 2) OR (MsiNTProductType > 1))) ]]> | 31 | <![CDATA[ VersionNT >= 600 OR (VersionNT >= 501 AND ((MsiNTProductType = 1 AND ServicePackLevel >= 2) OR (MsiNTProductType > 1))) ]]> |
31 | </Custom> | 32 | </Custom> |
32 | <Custom Action="WixSchedHttpUrlReservationsInstall$(var.Suffix)" After="InstallFiles" Overridable="yes"> | 33 | <Custom Action="$(var.Prefix)SchedHttpUrlReservationsInstall$(var.Suffix)" After="InstallFiles" Overridable="yes"> |
33 | <![CDATA[ VersionNT >= 600 OR (VersionNT >= 501 AND ((MsiNTProductType = 1 AND ServicePackLevel >= 2) OR (MsiNTProductType > 1))) ]]> | 34 | <![CDATA[ VersionNT >= 600 OR (VersionNT >= 501 AND ((MsiNTProductType = 1 AND ServicePackLevel >= 2) OR (MsiNTProductType > 1))) ]]> |
34 | </Custom> | 35 | </Custom> |
35 | </InstallExecuteSequence> | 36 | </InstallExecuteSequence> |
36 | </Fragment> | 37 | </Fragment> |
38 | |||
37 | <Fragment> | 39 | <Fragment> |
38 | <Binary Id="HttpCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))httpca.dll" /> | 40 | <Binary Id="HttpCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))httpca.dll" /> |
39 | </Fragment> | 41 | </Fragment> |
diff --git a/src/wixlib/HttpExtension_arm.wxs b/src/wixlib/HttpExtension_arm.wxs new file mode 100644 index 00000000..1f7669bb --- /dev/null +++ b/src/wixlib/HttpExtension_arm.wxs | |||
@@ -0,0 +1,8 @@ | |||
1 | <?xml version="1.0"?> | ||
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 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
6 | <?define platform=arm ?> | ||
7 | <?include HttpExtension_Platform.wxi ?> | ||
8 | </Wix> | ||
diff --git a/src/wixlib/HttpExtension_arm64.wxs b/src/wixlib/HttpExtension_arm64.wxs new file mode 100644 index 00000000..ac43a85b --- /dev/null +++ b/src/wixlib/HttpExtension_arm64.wxs | |||
@@ -0,0 +1,8 @@ | |||
1 | <?xml version="1.0"?> | ||
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 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
6 | <?define platform=arm64 ?> | ||
7 | <?include HttpExtension_Platform.wxi ?> | ||
8 | </Wix> | ||
diff --git a/src/wixlib/HttpExtension_x64.wxs b/src/wixlib/HttpExtension_x64.wxs new file mode 100644 index 00000000..1ba5e505 --- /dev/null +++ b/src/wixlib/HttpExtension_x64.wxs | |||
@@ -0,0 +1,8 @@ | |||
1 | <?xml version="1.0"?> | ||
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 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
6 | <?define platform=x64 ?> | ||
7 | <?include HttpExtension_Platform.wxi ?> | ||
8 | </Wix> | ||
diff --git a/src/wixlib/caDecor.wxi b/src/wixlib/caDecor.wxi new file mode 100644 index 00000000..1d00df8f --- /dev/null +++ b/src/wixlib/caDecor.wxi | |||
@@ -0,0 +1,40 @@ | |||
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 | |||
5 | <Include xmlns="http://schemas.microsoft.com/wix/2006/wi"> | ||
6 | <?ifdef Prefix ?> | ||
7 | <?undef Prefix ?> | ||
8 | <?endif ?> | ||
9 | |||
10 | <?define Prefix="Wix4" ?> | ||
11 | |||
12 | <?ifndef platform ?> | ||
13 | <?define platform="x86" ?> | ||
14 | <?endif ?> | ||
15 | |||
16 | <?if $(var.platform)="" ?> | ||
17 | <?undef platform ?> | ||
18 | <?define platform="x86" ?> | ||
19 | <?endif ?> | ||
20 | |||
21 | <?ifdef Suffix ?> | ||
22 | <?undef Suffix ?> | ||
23 | <?endif ?> | ||
24 | |||
25 | <?if $(var.platform)~="x86" ?> | ||
26 | <?define Suffix="_X86" ?> | ||
27 | <?endif ?> | ||
28 | |||
29 | <?if $(var.platform)~="x64" ?> | ||
30 | <?define Suffix="_X64" ?> | ||
31 | <?endif ?> | ||
32 | |||
33 | <?if $(var.platform)~="arm" ?> | ||
34 | <?define Suffix="_A32" ?> | ||
35 | <?endif ?> | ||
36 | |||
37 | <?if $(var.platform)~="arm64" ?> | ||
38 | <?define Suffix="_A64" ?> | ||
39 | <?endif ?> | ||
40 | </Include> | ||
diff --git a/src/wixlib/caSuffix.wxi b/src/wixlib/caSuffix.wxi deleted file mode 100644 index a56a2393..00000000 --- a/src/wixlib/caSuffix.wxi +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
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 | <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
5 | <?ifndef platform ?> | ||
6 | <?error Required value "platform" not defined in include caSuffix.wxi ?> | ||
7 | <?endif ?> | ||
8 | |||
9 | <?ifdef Suffix ?> | ||
10 | <?undef Suffix ?> | ||
11 | <?undef DeferredSuffix ?> | ||
12 | <?endif ?> | ||
13 | |||
14 | <?if $(var.platform)="x86" ?> | ||
15 | <?define Suffix="" ?> | ||
16 | <?define DeferredSuffix="" ?> | ||
17 | <?endif ?> | ||
18 | |||
19 | <?if $(var.platform)="x64" ?> | ||
20 | <?define Suffix="_x64" ?> | ||
21 | <?define DeferredSuffix="_64" ?> | ||
22 | <?endif ?> | ||
23 | |||
24 | <?if $(var.platform)="arm" ?> | ||
25 | <?define Suffix="_ARM" ?> | ||
26 | <?define DeferredSuffix="_ARM" ?> | ||
27 | <?endif ?> | ||
28 | </Include> | ||
diff --git a/src/wixlib/http.wixproj b/src/wixlib/http.wixproj index 6c56808a..fdd8c99b 100644 --- a/src/wixlib/http.wixproj +++ b/src/wixlib/http.wixproj | |||
@@ -1,18 +1,19 @@ | |||
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 | <Project Sdk="WixToolset.Sdk"> | 2 | <Project Sdk="WixToolset.Sdk"> |
3 | |||
4 | <PropertyGroup> | 3 | <PropertyGroup> |
5 | <OutputType>Library</OutputType> | 4 | <OutputType>Library</OutputType> |
6 | <BindFiles>true</BindFiles> | 5 | <BindFiles>true</BindFiles> |
7 | <Cultures>en-us</Cultures> | 6 | <Cultures>en-us</Cultures> |
8 | </PropertyGroup> | 7 | </PropertyGroup> |
9 | 8 | ||
10 | <ItemGroup> | 9 | <ItemGroup> |
11 | <ProjectReference Include="..\ca\httpca.vcxproj" /> | 10 | <ProjectReference Include="..\ca\httpca.vcxproj" Properties="Platform=ARM" /> |
11 | <ProjectReference Include="..\ca\httpca.vcxproj" Properties="Platform=ARM64" /> | ||
12 | <ProjectReference Include="..\ca\httpca.vcxproj" Properties="Platform=x86" /> | ||
13 | <ProjectReference Include="..\ca\httpca.vcxproj" Properties="Platform=x64" /> | ||
12 | </ItemGroup> | 14 | </ItemGroup> |
13 | 15 | ||
14 | <ItemGroup> | 16 | <ItemGroup> |
15 | <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="All" /> | 17 | <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="All" /> |
16 | </ItemGroup> | 18 | </ItemGroup> |
17 | 19 | </Project> \ No newline at end of file | |
18 | </Project> | ||