aboutsummaryrefslogtreecommitdiff
path: root/src/wixlib
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2020-07-04 19:02:15 -0400
committerBob Arnson <bob@firegiant.com>2020-07-04 19:06:16 -0400
commitecb774445b177c739864cbd0f6ad441c7864e3be (patch)
tree410717cb3b17e154b2056772b68a2e89b87ab136 /src/wixlib
parentcd0d556f06a220c3406d3a42a4e4628ee1cb7cd6 (diff)
downloadwix-ecb774445b177c739864cbd0f6ad441c7864e3be.tar.gz
wix-ecb774445b177c739864cbd0f6ad441c7864e3be.tar.bz2
wix-ecb774445b177c739864cbd0f6ad441c7864e3be.zip
Add per-platform custom action support.
Diffstat (limited to 'src/wixlib')
-rw-r--r--src/wixlib/HttpExtension_Platform.wxi32
-rw-r--r--src/wixlib/HttpExtension_arm.wxs8
-rw-r--r--src/wixlib/HttpExtension_arm64.wxs8
-rw-r--r--src/wixlib/HttpExtension_x64.wxs8
-rw-r--r--src/wixlib/caDecor.wxi40
-rw-r--r--src/wixlib/caSuffix.wxi28
-rw-r--r--src/wixlib/http.wixproj13
7 files changed, 88 insertions, 49 deletions
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>