aboutsummaryrefslogtreecommitdiff
path: root/src/wixlib
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2020-07-04 18:59:34 -0400
committerBob Arnson <bob@firegiant.com>2020-07-04 19:01:59 -0400
commit6d17a027ff6155ed50f78858cad17d1baef9856d (patch)
tree446d5f4730ef61703f19aa3bd4ee20e6e767c795 /src/wixlib
parent4e1ad5e7a257b351d40a8d68aa6e1a961766556b (diff)
downloadwix-6d17a027ff6155ed50f78858cad17d1baef9856d.tar.gz
wix-6d17a027ff6155ed50f78858cad17d1baef9856d.tar.bz2
wix-6d17a027ff6155ed50f78858cad17d1baef9856d.zip
Add per-platform custom action support.
Diffstat (limited to 'src/wixlib')
-rw-r--r--src/wixlib/DependencyExtension_Platform.wxi13
-rw-r--r--src/wixlib/DependencyExtension_arm.wxs8
-rw-r--r--src/wixlib/DependencyExtension_arm64.wxs8
-rw-r--r--src/wixlib/DependencyExtension_x64.wxs8
-rw-r--r--src/wixlib/caDecor.wxi40
-rw-r--r--src/wixlib/caSuffix.wxi28
-rw-r--r--src/wixlib/dependency.wixproj7
7 files changed, 77 insertions, 35 deletions
diff --git a/src/wixlib/DependencyExtension_Platform.wxi b/src/wixlib/DependencyExtension_Platform.wxi
index 7cd7ad96..299a93eb 100644
--- a/src/wixlib/DependencyExtension_Platform.wxi
+++ b/src/wixlib/DependencyExtension_Platform.wxi
@@ -3,23 +3,26 @@
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 <CustomAction Id="WixDependencyRequire$(var.Suffix)" BinaryKey="DependencyCA$(var.Suffix)" DllEntry="WixDependencyRequire" Execute="immediate" Return="check" SuppressModularization="yes"/> 9 <CustomAction Id="$(var.Prefix)DependencyRequire$(var.Suffix)" BinaryKey="DependencyCA$(var.Suffix)" DllEntry="WixDependencyRequire" Execute="immediate" Return="check" SuppressModularization="yes"/>
9 <InstallExecuteSequence> 10 <InstallExecuteSequence>
10 <Custom Action="WixDependencyRequire$(var.Suffix)" Before="WixDependencyCheck$(var.Suffix)" Overridable="yes"><![CDATA[NOT DISABLEDEPENDENCYCHECK]]></Custom> 11 <Custom Action="$(var.Prefix)DependencyRequire$(var.Suffix)" Before="WixDependencyCheck$(var.Suffix)" Overridable="yes"><![CDATA[NOT DISABLEDEPENDENCYCHECK]]></Custom>
11 </InstallExecuteSequence> 12 </InstallExecuteSequence>
12 <UIRef Id="WixDependencyErrors"/> 13 <UIRef Id="WixDependencyErrors"/>
13 <PropertyRef Id="DISABLEDEPENDENCYCHECK"/> 14 <PropertyRef Id="DISABLEDEPENDENCYCHECK"/>
14 </Fragment> 15 </Fragment>
16
15 <Fragment> 17 <Fragment>
16 <CustomAction Id="WixDependencyCheck$(var.Suffix)" BinaryKey="DependencyCA$(var.Suffix)" DllEntry="WixDependencyCheck" Execute="immediate" Return="check" SuppressModularization="yes"/> 18 <CustomAction Id="$(var.Prefix)DependencyCheck$(var.Suffix)" BinaryKey="DependencyCA$(var.Suffix)" DllEntry="WixDependencyCheck" Execute="immediate" Return="check" SuppressModularization="yes"/>
17 <InstallExecuteSequence> 19 <InstallExecuteSequence>
18 <Custom Action="WixDependencyCheck$(var.Suffix)" Before="InstallInitialize" Overridable="yes"><![CDATA[(REMOVE OR MsiPatchRemovalList) AND NOT (UPGRADINGPRODUCTCODE OR IGNOREDEPENDENCIES="ALL")]]></Custom> 20 <Custom Action="$(var.Prefix)DependencyCheck$(var.Suffix)" Before="InstallInitialize" Overridable="yes"><![CDATA[(REMOVE OR MsiPatchRemovalList) AND NOT (UPGRADINGPRODUCTCODE OR IGNOREDEPENDENCIES="ALL")]]></Custom>
19 </InstallExecuteSequence> 21 </InstallExecuteSequence>
20 <UIRef Id="WixDependencyErrors"/> 22 <UIRef Id="WixDependencyErrors"/>
21 <PropertyRef Id="IGNOREDEPENDENCIES"/> 23 <PropertyRef Id="IGNOREDEPENDENCIES"/>
22 </Fragment> 24 </Fragment>
25
23 <Fragment> 26 <Fragment>
24 <Binary Id="DependencyCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))dependencyca.dll"/> 27 <Binary Id="DependencyCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))dependencyca.dll"/>
25 </Fragment> 28 </Fragment>
diff --git a/src/wixlib/DependencyExtension_arm.wxs b/src/wixlib/DependencyExtension_arm.wxs
new file mode 100644
index 00000000..d4ba33a3
--- /dev/null
+++ b/src/wixlib/DependencyExtension_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 DependencyExtension_Platform.wxi ?>
8</Wix>
diff --git a/src/wixlib/DependencyExtension_arm64.wxs b/src/wixlib/DependencyExtension_arm64.wxs
new file mode 100644
index 00000000..36e023e7
--- /dev/null
+++ b/src/wixlib/DependencyExtension_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 DependencyExtension_Platform.wxi ?>
8</Wix>
diff --git a/src/wixlib/DependencyExtension_x64.wxs b/src/wixlib/DependencyExtension_x64.wxs
new file mode 100644
index 00000000..8298bce6
--- /dev/null
+++ b/src/wixlib/DependencyExtension_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 DependencyExtension_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/dependency.wixproj b/src/wixlib/dependency.wixproj
index 25e13317..f7ba0f79 100644
--- a/src/wixlib/dependency.wixproj
+++ b/src/wixlib/dependency.wixproj
@@ -4,12 +4,15 @@
4 <PropertyGroup> 4 <PropertyGroup>
5 <OutputType>Library</OutputType> 5 <OutputType>Library</OutputType>
6 <BindFiles>true</BindFiles> 6 <BindFiles>true</BindFiles>
7 <!-- <SuppressSpecificWarnings>1086</SuppressSpecificWarnings> --> 7 <SuppressSpecificWarnings>1086</SuppressSpecificWarnings>
8 <Cultures>en-us</Cultures> 8 <Cultures>en-us</Cultures>
9 </PropertyGroup> 9 </PropertyGroup>
10 10
11 <ItemGroup> 11 <ItemGroup>
12 <ProjectReference Include="..\ca\dependencyca.vcxproj" /> 12 <ProjectReference Include="..\ca\dependencyca.vcxproj" Properties="Platform=ARM" />
13 <ProjectReference Include="..\ca\dependencyca.vcxproj" Properties="Platform=ARM64" />
14 <ProjectReference Include="..\ca\dependencyca.vcxproj" Properties="Platform=x86" />
15 <ProjectReference Include="..\ca\dependencyca.vcxproj" Properties="Platform=x64" />
13 </ItemGroup> 16 </ItemGroup>
14 17
15 <ItemGroup> 18 <ItemGroup>