diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-05-16 21:53:44 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-05-16 22:01:33 +1000 |
commit | abfe02f2e31480f2cfb72b3daa641d7e723448d9 (patch) | |
tree | 5d485ce1a3475a838386cc014a7a0707a52245aa /src/wixext | |
parent | bb7b3dc1bc20629e04014b3f049cc30625a1a06c (diff) | |
download | wix-abfe02f2e31480f2cfb72b3daa641d7e723448d9.tar.gz wix-abfe02f2e31480f2cfb72b3daa641d7e723448d9.tar.bz2 wix-abfe02f2e31480f2cfb72b3daa641d7e723448d9.zip |
WIXFEAT:6164 Implement DisplayInternalUICondition.
Diffstat (limited to 'src/wixext')
-rw-r--r-- | src/wixext/BalCompiler.cs | 17 | ||||
-rw-r--r-- | src/wixext/Tuples/BalTupleDefinitions.cs | 5 | ||||
-rw-r--r-- | src/wixext/Tuples/WixBalPackageInfoTuple.cs | 55 | ||||
-rw-r--r-- | src/wixext/bal.xsd | 15 |
4 files changed, 92 insertions, 0 deletions
diff --git a/src/wixext/BalCompiler.cs b/src/wixext/BalCompiler.cs index dfe29bde..03b74e57 100644 --- a/src/wixext/BalCompiler.cs +++ b/src/wixext/BalCompiler.cs | |||
@@ -104,6 +104,23 @@ namespace WixToolset.Bal | |||
104 | { | 104 | { |
105 | switch (attribute.Name.LocalName) | 105 | switch (attribute.Name.LocalName) |
106 | { | 106 | { |
107 | case "DisplayInternalUICondition": | ||
108 | switch (parentElement.Name.LocalName) | ||
109 | { | ||
110 | case "MsiPackage": | ||
111 | case "MspPackage": | ||
112 | var displayInternalUICondition = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attribute); | ||
113 | section.AddTuple(new WixBalPackageInfoTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, packageId)) | ||
114 | { | ||
115 | PackageId = packageId, | ||
116 | DisplayInternalUICondition = displayInternalUICondition, | ||
117 | }); | ||
118 | break; | ||
119 | default: | ||
120 | this.ParseHelper.UnexpectedAttribute(parentElement, attribute); | ||
121 | break; | ||
122 | } | ||
123 | break; | ||
107 | case "PrereqLicenseFile": | 124 | case "PrereqLicenseFile": |
108 | 125 | ||
109 | if (!this.prereqInfoTuplesByPackageId.TryGetValue(packageId, out prereqInfo)) | 126 | if (!this.prereqInfoTuplesByPackageId.TryGetValue(packageId, out prereqInfo)) |
diff --git a/src/wixext/Tuples/BalTupleDefinitions.cs b/src/wixext/Tuples/BalTupleDefinitions.cs index 9a294703..08e7ba2a 100644 --- a/src/wixext/Tuples/BalTupleDefinitions.cs +++ b/src/wixext/Tuples/BalTupleDefinitions.cs | |||
@@ -11,6 +11,7 @@ namespace WixToolset.Bal | |||
11 | WixBalBAFactoryAssembly, | 11 | WixBalBAFactoryAssembly, |
12 | WixBalBAFunctions, | 12 | WixBalBAFunctions, |
13 | WixBalCondition, | 13 | WixBalCondition, |
14 | WixBalPackageInfo, | ||
14 | WixDncOptions, | 15 | WixDncOptions, |
15 | WixMbaPrereqInformation, | 16 | WixMbaPrereqInformation, |
16 | WixStdbaOptions, | 17 | WixStdbaOptions, |
@@ -44,6 +45,9 @@ namespace WixToolset.Bal | |||
44 | case BalTupleDefinitionType.WixBalCondition: | 45 | case BalTupleDefinitionType.WixBalCondition: |
45 | return BalTupleDefinitions.WixBalCondition; | 46 | return BalTupleDefinitions.WixBalCondition; |
46 | 47 | ||
48 | case BalTupleDefinitionType.WixBalPackageInfo: | ||
49 | return BalTupleDefinitions.WixBalPackageInfo; | ||
50 | |||
47 | case BalTupleDefinitionType.WixDncOptions: | 51 | case BalTupleDefinitionType.WixDncOptions: |
48 | return BalTupleDefinitions.WixDncOptions; | 52 | return BalTupleDefinitions.WixDncOptions; |
49 | 53 | ||
@@ -66,6 +70,7 @@ namespace WixToolset.Bal | |||
66 | WixBalBAFactoryAssembly.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | 70 | WixBalBAFactoryAssembly.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); |
67 | WixBalBAFunctions.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | 71 | WixBalBAFunctions.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); |
68 | WixBalCondition.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | 72 | WixBalCondition.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); |
73 | WixBalPackageInfo.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | ||
69 | WixDncOptions.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | 74 | WixDncOptions.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); |
70 | WixMbaPrereqInformation.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | 75 | WixMbaPrereqInformation.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); |
71 | WixStdbaOptions.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | 76 | WixStdbaOptions.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); |
diff --git a/src/wixext/Tuples/WixBalPackageInfoTuple.cs b/src/wixext/Tuples/WixBalPackageInfoTuple.cs new file mode 100644 index 00000000..32be3105 --- /dev/null +++ b/src/wixext/Tuples/WixBalPackageInfoTuple.cs | |||
@@ -0,0 +1,55 @@ | |||
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 | namespace WixToolset.Bal | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Bal.Tuples; | ||
7 | |||
8 | public static partial class BalTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition WixBalPackageInfo = new IntermediateTupleDefinition( | ||
11 | BalTupleDefinitionType.WixBalPackageInfo.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixBalPackageInfoTupleFields.PackageId), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixBalPackageInfoTupleFields.DisplayInternalUICondition), IntermediateFieldType.String), | ||
16 | }, | ||
17 | typeof(WixBalPackageInfoTuple)); | ||
18 | } | ||
19 | } | ||
20 | |||
21 | namespace WixToolset.Bal.Tuples | ||
22 | { | ||
23 | using WixToolset.Data; | ||
24 | |||
25 | public enum WixBalPackageInfoTupleFields | ||
26 | { | ||
27 | PackageId, | ||
28 | DisplayInternalUICondition, | ||
29 | } | ||
30 | |||
31 | public class WixBalPackageInfoTuple : IntermediateTuple | ||
32 | { | ||
33 | public WixBalPackageInfoTuple() : base(BalTupleDefinitions.WixBalPackageInfo, null, null) | ||
34 | { | ||
35 | } | ||
36 | |||
37 | public WixBalPackageInfoTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalTupleDefinitions.WixBalPackageInfo, sourceLineNumber, id) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | public IntermediateField this[WixBalPackageInfoTupleFields index] => this.Fields[(int)index]; | ||
42 | |||
43 | public string PackageId | ||
44 | { | ||
45 | get => this.Fields[(int)WixBalPackageInfoTupleFields.PackageId].AsString(); | ||
46 | set => this.Set((int)WixBalPackageInfoTupleFields.PackageId, value); | ||
47 | } | ||
48 | |||
49 | public string DisplayInternalUICondition | ||
50 | { | ||
51 | get => this.Fields[(int)WixBalPackageInfoTupleFields.DisplayInternalUICondition].AsString(); | ||
52 | set => this.Set((int)WixBalPackageInfoTupleFields.DisplayInternalUICondition, value); | ||
53 | } | ||
54 | } | ||
55 | } | ||
diff --git a/src/wixext/bal.xsd b/src/wixext/bal.xsd index ee1f8cec..1bec2873 100644 --- a/src/wixext/bal.xsd +++ b/src/wixext/bal.xsd | |||
@@ -277,6 +277,21 @@ | |||
277 | </xs:annotation> | 277 | </xs:annotation> |
278 | </xs:attribute> | 278 | </xs:attribute> |
279 | 279 | ||
280 | <xs:attribute name="DisplayInternalUICondition" type="xs:string"> | ||
281 | <xs:annotation> | ||
282 | <xs:documentation> | ||
283 | Specifies whether the bundle will show the UI authored into the msi package. If not specified or the condition evaluates | ||
284 | to false, all information is routed to the bootstrapper application to provide a unified installation experience. | ||
285 | Otherwise, the UI authored into the msi package will be displayed on top of any bootstrapper application UI. | ||
286 | WixStdBA doesn't support EmbeddedUI. | ||
287 | </xs:documentation> | ||
288 | <xs:appinfo> | ||
289 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="MsiPackage" /> | ||
290 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="MspPackage" /> | ||
291 | </xs:appinfo> | ||
292 | </xs:annotation> | ||
293 | </xs:attribute> | ||
294 | |||
280 | <xs:attribute name="Overridable" type="YesNoType"> | 295 | <xs:attribute name="Overridable" type="YesNoType"> |
281 | <xs:annotation> | 296 | <xs:annotation> |
282 | <xs:documentation> | 297 | <xs:documentation> |