@joebigelow / wix-1 / commits / 4082ae7f

Add per-platform custom action support.

Bob Arnson committed Jul 4, 2020 at 19:06 UTC 4082ae7f94346a8db77638ab8f0e06513a53c73a
19 files changed +175 -114
Iis.wixext.sln
+3 -2
@@ -1,7 +1,7 @@
1 
2 Microsoft Visual Studio Solution File, Format Version 12.00
3 -# Visual Studio 15
4 -VisualStudioVersion = 15.0.28010.2016
3 +# Visual Studio Version 16
4 +VisualStudioVersion = 16.0.30204.135
5 MinimumVisualStudioVersion = 10.0.40219.1
6 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iisca", "src\ca\iisca.vcxproj", "{CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}"
7 EndProject
@@ -20,6 +20,7 @@ Global
20 EndGlobalSection
21 GlobalSection(ProjectConfigurationPlatforms) = postSolution
22 {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Debug|Any CPU.ActiveCfg = Debug|Win32
23 + {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Debug|Any CPU.Build.0 = Debug|Win32
24 {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Debug|x86.ActiveCfg = Debug|Win32
25 {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Debug|x86.Build.0 = Debug|Win32
26 {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Release|Any CPU.ActiveCfg = Release|Win32
src/ca/caDecor.h new
+13
@@ -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
src/ca/caSuffix.h deleted
-11
@@ -1,11 +0,0 @@
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 _WIN64
6 -#define PLATFORM_DECORATION(f) f L"_64"
7 -#elif defined ARM
8 -#define PLATFORM_DECORATION(f) f L"_ARM"
9 -#else
10 -#define PLATFORM_DECORATION(f) f
11 -#endif
src/ca/iisca.vcxproj
+32 -14
@@ -1,6 +1,5 @@
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 -
3 <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
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')" />
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')" />
@@ -14,25 +13,50 @@
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 + <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>
40 </ItemGroup>
41
42 <PropertyGroup Label="Globals">
43 <ProjectGuid>{CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}</ProjectGuid>
44 <ConfigurationType>DynamicLibrary</ConfigurationType>
45 <TargetName>iisca</TargetName>
23 - <PlatformToolset>v141</PlatformToolset>
46 + <PlatformToolset>v142</PlatformToolset>
47 <CharacterSet>Unicode</CharacterSet>
48 <ProjectModuleDefinitionFile>iisca.def</ProjectModuleDefinitionFile>
49 <Description>WiX Toolset Iis CustomAction</Description>
50 + <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
51 </PropertyGroup>
28 -
52 +
53 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
54 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
31 -
55 +
56 <PropertyGroup>
57 <ProjectAdditionalLinkLibraries>crypt32.lib;msi.lib;Ws2_32.lib</ProjectAdditionalLinkLibraries>
58 </PropertyGroup>
35 -
59 +
60 <ItemGroup>
61 <ClCompile Include="dllmain.cpp">
62 <PrecompiledHeader>Create</PrecompiledHeader>
@@ -76,9 +100,6 @@
100 <ClCompile Include="scawebprop7.cpp" />
101 <ClCompile Include="scawebsvcext.cpp" />
102 <ClCompile Include="scawebsvcext7.cpp" />
79 - </ItemGroup>
80 -
81 - <ItemGroup>
103 <ClInclude Include="caSuffix.h" />
104 <ClInclude Include="CustomMsiErrors.h" />
105 <ClInclude Include="precomp.h" />
@@ -119,15 +140,12 @@
140 <ClInclude Include="scawebprop7.h" />
141 <ClInclude Include="scawebsvcext.h" />
142 <ClInclude Include="scawebsvcext7.h" />
122 - </ItemGroup>
123 -
124 - <ItemGroup>
143 <None Include="packages.config" />
144 <None Include="iisca.def" />
145 </ItemGroup>
128 -
146 +
147 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
130 -
148 +
149 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
150 <PropertyGroup>
151 <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>
@@ -135,4 +153,4 @@
153 <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'))" />
154 <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'))" />
155 </Target>
138 -</Project>
156 +</Project>
\ No newline at end of file
src/ca/precomp.h
+1 -1
@@ -63,4 +63,4 @@
63 #include "scassl7.h"
64 #include "scaexecIIS7.h"
65
66 -#include "caSuffix.h"
66 +#include "caDecor.h"
src/ca/scacert.cpp
+7 -7
@@ -165,7 +165,7 @@ static HRESULT ConfigureCertificates(
165
166 BYTE* pbCertificate = NULL;
167 DWORD cbCertificate = 0;
168 - DWORD cbPFXPassword = 0;
168 + DWORD_PTR cbPFXPassword = 0;
169
170 // Bail quickly if the Certificate table isn't around.
171 if (S_OK != WcaTableExists(L"Certificate"))
@@ -273,7 +273,7 @@ static HRESULT ConfigureCertificates(
273 // Pick the right action to run based on what store we're uninstalling from.
274 if (CERT_SYSTEM_STORE_LOCAL_MACHINE == dwStoreLocation)
275 {
276 - wzAction = L"DeleteMachineCertificate";
276 + wzAction = CUSTOM_ACTION_DECORATION(L"DeleteMachineCertificate");
277 if (pbCertificate)
278 {
279 wzRollbackAction = L"RollbackDeleteMachineCertificate";
@@ -281,7 +281,7 @@ static HRESULT ConfigureCertificates(
281 }
282 else
283 {
284 - wzAction = L"DeleteUserCertificate";
284 + wzAction = CUSTOM_ACTION_DECORATION(L"DeleteUserCertificate");
285 if (pbCertificate)
286 {
287 wzRollbackAction = L"RollbackDeleteUserCertificate";
@@ -304,13 +304,13 @@ static HRESULT ConfigureCertificates(
304 // Pick the right action to run based on what store we're installing into.
305 if (CERT_SYSTEM_STORE_LOCAL_MACHINE == dwStoreLocation)
306 {
307 - wzAction = L"AddMachineCertificate";
308 - wzRollbackAction = L"RollbackAddMachineCertificate";
307 + wzAction = CUSTOM_ACTION_DECORATION(L"AddMachineCertificate");
308 + wzRollbackAction = CUSTOM_ACTION_DECORATION(L"RollbackAddMachineCertificate");
309 }
310 else
311 {
312 - wzAction = L"AddUserCertificate";
313 - wzRollbackAction = L"RollbackAddUserCertificate";
312 + wzAction = CUSTOM_ACTION_DECORATION(L"AddUserCertificate");
313 + wzRollbackAction = CUSTOM_ACTION_DECORATION(L"RollbackAddUserCertificate");
314 }
315 dwCost = COST_CERT_ADD;
316 }
src/ca/scacertexec.cpp
+1 -1
@@ -148,7 +148,7 @@ static HRESULT ExecuteCertificateOperation(
148 LPWSTR pwzFilePath = NULL;
149 BYTE* pbData = NULL;
150 DWORD cbData = 0;
151 - DWORD cbPFXPassword = 0;
151 + DWORD_PTR cbPFXPassword = 0;
152
153 BOOL fUserStoreLocation = (CERT_SYSTEM_STORE_CURRENT_USER == dwStoreLocation);
154 HCERTSTORE hCertStore = NULL;
src/ca/scahttpheader.cpp
+1 -1
@@ -159,7 +159,7 @@ HRESULT ScaWriteHttpHeader(
159 LPWSTR pwz = NULL;
160 LPWSTR pwzHeaders = NULL;
161 LPWSTR pwzNewHeader = NULL;
162 - DWORD dwFoundHeaderIndex = 0;
162 + DWORD_PTR dwFoundHeaderIndex = 0;
163 LPCWSTR wzFoundHeader = NULL;
164 BOOL fOldValueFound = FALSE;
165
src/ca/scaiis.cpp
+3 -3
@@ -12,13 +12,13 @@ HRESULT ScaMetabaseTransaction(__in_z LPCWSTR wzBackup)
12
13 // TODO: These functions have been reported to hang IIS (O11:51709). They may have been fixed in IIS6, but if not, need to be re-written the hard way
14
15 - hr = WcaDoDeferredAction(L"StartMetabaseTransaction", wzBackup, COST_IIS_TRANSACTIONS);
15 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"StartMetabaseTransaction"), wzBackup, COST_IIS_TRANSACTIONS);
16 ExitOnFailure(hr, "Failed to schedule StartMetabaseTransaction");
17
18 - hr = WcaDoDeferredAction(L"RollbackMetabaseTransaction", wzBackup, 0); // rollback cost is irrelevant
18 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackMetabaseTransaction"), wzBackup, 0); // rollback cost is irrelevant
19 ExitOnFailure(hr, "Failed to schedule RollbackMetabaseTransaction");
20
21 - hr = WcaDoDeferredAction(L"CommitMetabaseTransaction", wzBackup, 0); // commit is free
21 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"CommitMetabaseTransaction"), wzBackup, 0); // commit is free
22 ExitOnFailure(hr, "Failed to schedule StartMetabaseTransaction");
23
24 LExit:
src/ca/scaiis7.cpp
+3 -3
@@ -8,13 +8,13 @@ HRESULT ScaIIS7ConfigTransaction(LPCWSTR wzBackup)
8 {
9 HRESULT hr = S_OK;
10
11 - hr = WcaDoDeferredAction(L"StartIIS7ConfigTransaction", wzBackup, COST_IIS_TRANSACTIONS);
11 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"StartIIS7ConfigTransaction"), wzBackup, COST_IIS_TRANSACTIONS);
12 ExitOnFailure(hr, "Failed to schedule StartIIS7ConfigTransaction");
13
14 - hr = WcaDoDeferredAction(L"RollbackIIS7ConfigTransaction", wzBackup, 0); // rollback cost is irrelevant
14 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackIIS7ConfigTransaction"), wzBackup, 0); // rollback cost is irrelevant
15 ExitOnFailure(hr, "Failed to schedule RollbackIIS7ConfigTransaction");
16
17 - hr = WcaDoDeferredAction(L"CommitIIS7ConfigTransaction", wzBackup, 0); // commit is free
17 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"CommitIIS7ConfigTransaction"), wzBackup, 0); // commit is free
18 ExitOnFailure(hr, "Failed to schedule StartIIS7ConfigTransaction");
19
20 LExit:
src/ca/scasched.cpp
+4 -4
@@ -331,7 +331,7 @@ extern "C" UINT __stdcall ConfigureIIs(
331 // This must remain trace only, CA data may contain password
332 WcaLog(LOGMSG_TRACEONLY, "Custom Action Data for ConfigureIIS7Exec will be: %ls", pwzCustomActionData);
333
334 - hr = WcaDoDeferredAction(L"ConfigureIIs7Exec", pwzCustomActionData, ConfigureIIsCost);
334 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ConfigureIIs7Exec"), pwzCustomActionData, ConfigureIIsCost);
335 ExitOnFailure(hr, "Failed to schedule ConfigureIIs7Exec custom action");
336
337 ReleaseNullStr(pwzCustomActionData);
@@ -340,7 +340,7 @@ extern "C" UINT __stdcall ConfigureIIs(
340 hr = WcaWriteStringToCaData(pwzScriptKey, &pwzCustomActionData);
341 ExitOnFailure(hr, "Failed to add script key to CustomActionData.");
342
343 - hr = WcaDoDeferredAction(L"WriteIIS7ConfigChanges", pwzCustomActionData, WriteIIS7ConfigChangesCost);
343 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WriteIIS7ConfigChanges"), pwzCustomActionData, WriteIIS7ConfigChangesCost);
344 ExitOnFailure(hr, "Failed to schedule WriteMetabaseChanges custom action");
345 }
346 else
@@ -348,7 +348,7 @@ extern "C" UINT __stdcall ConfigureIIs(
348 // This must remain trace only, CA data may contain password
349 WcaLog(LOGMSG_TRACEONLY, "Custom Action Data for ConfigureIISExec will be: %ls", pwzCustomActionData);
350
351 - hr = WcaDoDeferredAction(L"ConfigureIIsExec", pwzCustomActionData, ConfigureIIsCost);
351 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ConfigureIIsExec"), pwzCustomActionData, ConfigureIIsCost);
352 ExitOnFailure(hr, "Failed to schedule ConfigureIISExec custom action");
353
354 ReleaseNullStr(pwzCustomActionData);
@@ -357,7 +357,7 @@ extern "C" UINT __stdcall ConfigureIIs(
357 hr = WcaWriteStringToCaData(pwzScriptKey, &pwzCustomActionData);
358 ExitOnFailure(hr, "Failed to add script key to CustomActionData.");
359
360 - hr = WcaDoDeferredAction(L"WriteMetabaseChanges", pwzCustomActionData, WriteMetabaseChangesCost);
360 + hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"WriteMetabaseChanges"), pwzCustomActionData, WriteMetabaseChangesCost);
361 ExitOnFailure(hr, "Failed to schedule WriteMetabaseChanges custom action");
362 }
363
src/wixext/IIsCompiler.cs
+4 -3
@@ -8,6 +8,7 @@ namespace WixToolset.Iis
8 using System.Xml.Linq;
9 using WixToolset.Data;
10 using WixToolset.Extensibility;
11 + using WixToolset.Extensibility.Data;
12 using WixToolset.Iis.Symbols;
13
14 /// <summary>
@@ -287,8 +288,8 @@ namespace WixToolset.Iis
288 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
289
290 // Reference InstallCertificates and UninstallCertificates since nothing will happen without them
290 - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "InstallCertificates");
291 - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "UninstallCertificates");
291 + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "InstallCertificates", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64);
292 + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "UninstallCertificates", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64);
293 this.ParseHelper.EnsureTable(section, sourceLineNumbers, IisTableDefinitions.CertificateHash); // Certificate CustomActions require the CertificateHash table
294
295 if (!this.Messaging.EncounteredError)
@@ -2603,7 +2604,7 @@ namespace WixToolset.Iis
2604
2605 private void AddReferenceToConfigureIIs(IntermediateSection section, SourceLineNumber sourceLineNumbers)
2606 {
2606 - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "ConfigureIIs");
2607 + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigureIIs", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64);
2608 }
2609 }
2610 }
src/wixlib/IIsExtension_Platform.wxi
+35 -35
@@ -3,40 +3,40 @@
3
4
5 <Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
6 -
7 - <?include caSuffix.wxi ?>
6 + <?include caDecor.wxi ?>
7 +
8 <Fragment>
9 <UIRef Id="WixIIsErrors" />
10 <UI>
11 - <ProgressText Action="ConfigureIIs$(var.Suffix)">!(loc.ConfigureIIs)</ProgressText>
12 - <ProgressText Action="ConfigureIIsExec$(var.DeferredSuffix)">!(loc.ConfigureIIsExec)</ProgressText>
13 - <ProgressText Action="StartMetabaseTransaction$(var.DeferredSuffix)">!(loc.StartMetabaseTransaction)</ProgressText>
14 - <ProgressText Action="RollbackMetabaseTransaction$(var.DeferredSuffix)">!(loc.RollbackMetabaseTransaction)</ProgressText>
15 - <ProgressText Action="CommitMetabaseTransaction$(var.DeferredSuffix)">!(loc.CommitMetabaseTransaction)</ProgressText>
16 - <ProgressText Action="WriteMetabaseChanges$(var.DeferredSuffix)">!(loc.WriteMetabaseChanges)</ProgressText>
11 + <ProgressText Action="$(var.Prefix)ConfigureIIs$(var.Suffix)">!(loc.ConfigureIIs)</ProgressText>
12 + <ProgressText Action="$(var.Prefix)ConfigureIIsExec$(var.Suffix)">!(loc.ConfigureIIsExec)</ProgressText>
13 + <ProgressText Action="$(var.Prefix)StartMetabaseTransaction$(var.Suffix)">!(loc.StartMetabaseTransaction)</ProgressText>
14 + <ProgressText Action="$(var.Prefix)RollbackMetabaseTransaction$(var.Suffix)">!(loc.RollbackMetabaseTransaction)</ProgressText>
15 + <ProgressText Action="$(var.Prefix)CommitMetabaseTransaction$(var.Suffix)">!(loc.CommitMetabaseTransaction)</ProgressText>
16 + <ProgressText Action="$(var.Prefix)WriteMetabaseChanges$(var.Suffix)">!(loc.WriteMetabaseChanges)</ProgressText>
17
18 - <ProgressText Action="ConfigureIIs7Exec$(var.DeferredSuffix)">!(loc.ConfigureIIs7Exec)</ProgressText>
19 - <ProgressText Action="StartIIS7ConfigTransaction$(var.DeferredSuffix)">!(loc.StartIIS7ConfigTransaction)</ProgressText>
20 - <ProgressText Action="RollbackIIS7ConfigTransaction$(var.DeferredSuffix)">!(loc.RollbackIIS7ConfigTransaction)</ProgressText>
21 - <ProgressText Action="CommitIIS7ConfigTransaction$(var.DeferredSuffix)">!(loc.CommitIIS7ConfigTransaction)</ProgressText>
22 - <ProgressText Action="WriteIIS7ConfigChanges$(var.DeferredSuffix)">!(loc.WriteIIS7ConfigChanges)</ProgressText>
18 + <ProgressText Action="$(var.Prefix)ConfigureIIs7Exec$(var.Suffix)">!(loc.ConfigureIIs7Exec)</ProgressText>
19 + <ProgressText Action="$(var.Prefix)StartIIS7ConfigTransaction$(var.Suffix)">!(loc.StartIIS7ConfigTransaction)</ProgressText>
20 + <ProgressText Action="$(var.Prefix)RollbackIIS7ConfigTransaction$(var.Suffix)">!(loc.RollbackIIS7ConfigTransaction)</ProgressText>
21 + <ProgressText Action="$(var.Prefix)CommitIIS7ConfigTransaction$(var.Suffix)">!(loc.CommitIIS7ConfigTransaction)</ProgressText>
22 + <ProgressText Action="$(var.Prefix)WriteIIS7ConfigChanges$(var.Suffix)">!(loc.WriteIIS7ConfigChanges)</ProgressText>
23 </UI>
24
25 - <CustomAction Id="ConfigureIIs$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="ConfigureIIs" Execute="immediate" Return="check" SuppressModularization="yes" />
26 - <CustomAction Id="ConfigureIIsExec$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="ConfigureIIsExec" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
27 - <CustomAction Id="StartMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="StartMetabaseTransaction" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
28 - <CustomAction Id="RollbackMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="RollbackMetabaseTransaction" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
29 - <CustomAction Id="CommitMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="CommitMetabaseTransaction" Impersonate="no" Execute="commit" Return="check" HideTarget="yes" SuppressModularization="yes" />
30 - <CustomAction Id="WriteMetabaseChanges$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="WriteMetabaseChanges" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
25 + <CustomAction Id="$(var.Prefix)ConfigureIIs$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="ConfigureIIs" Execute="immediate" Return="check" SuppressModularization="yes" />
26 + <CustomAction Id="$(var.Prefix)ConfigureIIsExec$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="ConfigureIIsExec" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
27 + <CustomAction Id="$(var.Prefix)StartMetabaseTransaction$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="StartMetabaseTransaction" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
28 + <CustomAction Id="$(var.Prefix)RollbackMetabaseTransaction$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="RollbackMetabaseTransaction" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
29 + <CustomAction Id="$(var.Prefix)CommitMetabaseTransaction$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="CommitMetabaseTransaction" Impersonate="no" Execute="commit" Return="check" HideTarget="yes" SuppressModularization="yes" />
30 + <CustomAction Id="$(var.Prefix)WriteMetabaseChanges$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="WriteMetabaseChanges" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
31
32 - <CustomAction Id="ConfigureIIs7Exec$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="ConfigureIIs7Exec" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
33 - <CustomAction Id="StartIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="StartIIS7ConfigTransaction" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
34 - <CustomAction Id="RollbackIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="RollbackIIS7ConfigTransaction" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
35 - <CustomAction Id="CommitIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="CommitIIS7ConfigTransaction" Impersonate="no" Execute="commit" Return="check" HideTarget="yes" SuppressModularization="yes" />
36 - <CustomAction Id="WriteIIS7ConfigChanges$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="WriteIIS7ConfigChanges" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
32 + <CustomAction Id="$(var.Prefix)ConfigureIIs7Exec$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="ConfigureIIs7Exec" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
33 + <CustomAction Id="$(var.Prefix)StartIIS7ConfigTransaction$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="StartIIS7ConfigTransaction" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
34 + <CustomAction Id="$(var.Prefix)RollbackIIS7ConfigTransaction$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="RollbackIIS7ConfigTransaction" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
35 + <CustomAction Id="$(var.Prefix)CommitIIS7ConfigTransaction$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="CommitIIS7ConfigTransaction" Impersonate="no" Execute="commit" Return="check" HideTarget="yes" SuppressModularization="yes" />
36 + <CustomAction Id="$(var.Prefix)WriteIIS7ConfigChanges$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="WriteIIS7ConfigChanges" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
37
38 <InstallExecuteSequence>
39 - <Custom Action="ConfigureIIs$(var.Suffix)" Before="RegisterUser" Overridable="yes">NOT SKIPCONFIGUREIIS AND VersionNT &gt; 400</Custom>
39 + <Custom Action="$(var.Prefix)ConfigureIIs$(var.Suffix)" Before="RegisterUser" Overridable="yes">NOT SKIPCONFIGUREIIS AND VersionNT &gt; 400</Custom>
40 </InstallExecuteSequence>
41 </Fragment>
42
@@ -45,18 +45,18 @@
45 </Fragment>
46
47 <Fragment>
48 - <CustomAction Id="InstallCertificates$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="InstallCertificates" Execute="immediate" Return="check" SuppressModularization="yes" />
49 - <CustomAction Id="UninstallCertificates$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="UninstallCertificates" Execute="immediate" Return="check" SuppressModularization="yes" />
48 + <CustomAction Id="$(var.Prefix)InstallCertificates$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="InstallCertificates" Execute="immediate" Return="check" SuppressModularization="yes" />
49 + <CustomAction Id="$(var.Prefix)UninstallCertificates$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="UninstallCertificates" Execute="immediate" Return="check" SuppressModularization="yes" />
50
51 - <CustomAction Id="AddUserCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="AddUserCertificate" Impersonate="yes" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
52 - <CustomAction Id="AddMachineCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="AddMachineCertificate" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
53 - <CustomAction Id="DeleteUserCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="DeleteUserCertificate" Impersonate="yes" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
54 - <CustomAction Id="DeleteMachineCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="DeleteMachineCertificate" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
51 + <CustomAction Id="$(var.Prefix)AddUserCertificate$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="AddUserCertificate" Impersonate="yes" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
52 + <CustomAction Id="$(var.Prefix)AddMachineCertificate$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="AddMachineCertificate" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
53 + <CustomAction Id="$(var.Prefix)DeleteUserCertificate$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="DeleteUserCertificate" Impersonate="yes" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
54 + <CustomAction Id="$(var.Prefix)DeleteMachineCertificate$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="DeleteMachineCertificate" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
55
56 - <CustomAction Id="RollbackAddUserCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="DeleteUserCertificate" Impersonate="yes" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
57 - <CustomAction Id="RollbackAddMachineCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="DeleteMachineCertificate" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
58 - <CustomAction Id="RollbackDeleteUserCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="AddUserCertificate" Impersonate="yes" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
59 - <CustomAction Id="RollbackDeleteMachineCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="AddMachineCertificate" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
56 + <CustomAction Id="$(var.Prefix)RollbackAddUserCertificate$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="DeleteUserCertificate" Impersonate="yes" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
57 + <CustomAction Id="$(var.Prefix)RollbackAddMachineCertificate$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="DeleteMachineCertificate" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
58 + <CustomAction Id="$(var.Prefix)RollbackDeleteUserCertificate$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="AddUserCertificate" Impersonate="yes" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
59 + <CustomAction Id="$(var.Prefix)RollbackDeleteMachineCertificate$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="AddMachineCertificate" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
60
61 <InstallExecuteSequence>
62 <Custom Action="UninstallCertificates$(var.Suffix)" Before="RemoveFiles" Overridable="yes">VersionNT &gt; 400</Custom>
src/wixlib/IIsExtension_arm.wxs new
+8
@@ -0,0 +1,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. -->
3 +
4 +
5 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
6 + <?define platform=arm ?>
7 + <?include IIsExtension_Platform.wxi ?>
8 +</Wix>
src/wixlib/IIsExtension_arm64.wxs new
+8
@@ -0,0 +1,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. -->
3 +
4 +
5 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
6 + <?define platform=arm64 ?>
7 + <?include IIsExtension_Platform.wxi ?>
8 +</Wix>
src/wixlib/IIsExtension_x64.wxs new
+8
@@ -0,0 +1,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. -->
3 +
4 +
5 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
6 + <?define platform=x64 ?>
7 + <?include IIsExtension_Platform.wxi ?>
8 +</Wix>
src/wixlib/caDecor.wxi new
+40
@@ -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>
src/wixlib/caSuffix.wxi deleted
-28
@@ -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>
src/wixlib/iis.wixproj
+4 -1
@@ -8,7 +8,10 @@
8 </PropertyGroup>
9
10 <ItemGroup>
11 - <ProjectReference Include="..\ca\iisca.vcxproj" />
11 + <ProjectReference Include="..\ca\iisca.vcxproj" Properties="Platform=ARM" />
12 + <ProjectReference Include="..\ca\iisca.vcxproj" Properties="Platform=ARM64" />
13 + <ProjectReference Include="..\ca\iisca.vcxproj" Properties="Platform=x86" />
14 + <ProjectReference Include="..\ca\iisca.vcxproj" Properties="Platform=x64" />
15 </ItemGroup>
16
17 <ItemGroup>