diff options
author | Rob Mensching <rob@firegiant.com> | 2024-01-11 18:26:20 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2024-03-06 18:03:38 -0800 |
commit | 0d3d54992104288e9ee0c834d0b96e8502fd2d42 (patch) | |
tree | 9efa49c4983cd2ba1becab64bd1f2faccac88acf /src/ext/Bal/wixext | |
parent | 2824298d9dd817a47527c920363556b54ead5d5d (diff) | |
download | wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.tar.gz wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.tar.bz2 wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.zip |
Move the BootstrapperApplication out of proc
Diffstat (limited to 'src/ext/Bal/wixext')
-rw-r--r-- | src/ext/Bal/wixext/BalBurnBackendExtension.cs | 74 | ||||
-rw-r--r-- | src/ext/Bal/wixext/BalCompiler.cs | 289 | ||||
-rw-r--r-- | src/ext/Bal/wixext/BalErrors.cs | 12 | ||||
-rw-r--r-- | src/ext/Bal/wixext/BalWarnings.cs | 6 | ||||
-rw-r--r-- | src/ext/Bal/wixext/Symbols/BalSymbolDefinitions.cs | 24 | ||||
-rw-r--r-- | src/ext/Bal/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs | 7 | ||||
-rw-r--r-- | src/ext/Bal/wixext/Symbols/WixBalBootstrapperApplicationSymbol.cs | 4 | ||||
-rw-r--r-- | src/ext/Bal/wixext/Symbols/WixDncOptionsSymbol.cs | 47 | ||||
-rw-r--r-- | src/ext/Bal/wixext/Symbols/WixMbaPrereqInformationSymbol.cs | 63 | ||||
-rw-r--r-- | src/ext/Bal/wixext/Symbols/WixMbaPrereqOptionsSymbol.cs | 47 | ||||
-rw-r--r-- | src/ext/Bal/wixext/Symbols/WixPrereqInformationSymbol.cs | 63 | ||||
-rw-r--r-- | src/ext/Bal/wixext/Symbols/WixPrereqOptionsSymbol.cs | 63 |
12 files changed, 399 insertions, 300 deletions
diff --git a/src/ext/Bal/wixext/BalBurnBackendExtension.cs b/src/ext/Bal/wixext/BalBurnBackendExtension.cs index 0293b236..84e4323e 100644 --- a/src/ext/Bal/wixext/BalBurnBackendExtension.cs +++ b/src/ext/Bal/wixext/BalBurnBackendExtension.cs | |||
@@ -18,16 +18,17 @@ namespace WixToolset.Bal | |||
18 | { | 18 | { |
19 | private static readonly IntermediateSymbolDefinition[] BurnSymbolDefinitions = | 19 | private static readonly IntermediateSymbolDefinition[] BurnSymbolDefinitions = |
20 | { | 20 | { |
21 | #pragma warning disable 0612 // obsolete | ||
21 | BalSymbolDefinitions.WixBalBAFactoryAssembly, | 22 | BalSymbolDefinitions.WixBalBAFactoryAssembly, |
23 | #pragma warning restore 0612 | ||
22 | BalSymbolDefinitions.WixBalBAFunctions, | 24 | BalSymbolDefinitions.WixBalBAFunctions, |
23 | BalSymbolDefinitions.WixBalCondition, | 25 | BalSymbolDefinitions.WixBalCondition, |
24 | BalSymbolDefinitions.WixBalPackageInfo, | 26 | BalSymbolDefinitions.WixBalPackageInfo, |
25 | BalSymbolDefinitions.WixDncOptions, | 27 | BalSymbolDefinitions.WixPrereqInformation, |
26 | BalSymbolDefinitions.WixMbaPrereqInformation, | ||
27 | BalSymbolDefinitions.WixStdbaCommandLine, | 28 | BalSymbolDefinitions.WixStdbaCommandLine, |
28 | BalSymbolDefinitions.WixStdbaOptions, | 29 | BalSymbolDefinitions.WixStdbaOptions, |
29 | BalSymbolDefinitions.WixStdbaOverridableVariable, | 30 | BalSymbolDefinitions.WixStdbaOverridableVariable, |
30 | BalSymbolDefinitions.WixMbaPrereqOptions, | 31 | BalSymbolDefinitions.WixPrereqOptions, |
31 | }; | 32 | }; |
32 | 33 | ||
33 | protected override IReadOnlyCollection<IntermediateSymbolDefinition> SymbolDefinitions => BurnSymbolDefinitions; | 34 | protected override IReadOnlyCollection<IntermediateSymbolDefinition> SymbolDefinitions => BurnSymbolDefinitions; |
@@ -112,59 +113,28 @@ namespace WixToolset.Bal | |||
112 | } | 113 | } |
113 | 114 | ||
114 | var isIuiBA = balBaSymbol.Type == WixBalBootstrapperApplicationType.InternalUi; | 115 | var isIuiBA = balBaSymbol.Type == WixBalBootstrapperApplicationType.InternalUi; |
116 | var isPreqBA = balBaSymbol.Type == WixBalBootstrapperApplicationType.Prerequisite; | ||
115 | var isStdBA = balBaSymbol.Type == WixBalBootstrapperApplicationType.Standard; | 117 | var isStdBA = balBaSymbol.Type == WixBalBootstrapperApplicationType.Standard; |
116 | var isMBA = balBaSymbol.Type == WixBalBootstrapperApplicationType.ManagedHost; | ||
117 | var isDNC = balBaSymbol.Type == WixBalBootstrapperApplicationType.DotNetCoreHost; | ||
118 | var isSCD = isDNC && this.VerifySCD(section); | ||
119 | 118 | ||
120 | 119 | if (!isIuiBA && !isPreqBA && !isStdBA) | |
121 | if (!isIuiBA && !isStdBA && !isMBA && !isDNC) | ||
122 | { | 120 | { |
123 | throw new WixException($"Invalid WixBalBootstrapperApplicationType: '{balBaSymbol.Type}'"); | 121 | throw new WixException($"Invalid WixBalBootstrapperApplicationType: '{balBaSymbol.Type}'"); |
124 | } | 122 | } |
125 | 123 | ||
124 | this.VerifyBAFunctions(section); | ||
125 | |||
126 | if (isIuiBA) | 126 | if (isIuiBA) |
127 | { | 127 | { |
128 | // This needs to happen before VerifyPrereqPackages because it can add prereq packages. | 128 | // This needs to happen before VerifyPrereqPackages because it can add prereq packages. |
129 | this.VerifyPrimaryPackages(section, balBaSymbol.SourceLineNumbers); | 129 | this.VerifyPrimaryPackages(section, balBaSymbol.SourceLineNumbers); |
130 | } | 130 | } |
131 | 131 | ||
132 | if (isDNC) | 132 | if (isIuiBA || isPreqBA) |
133 | { | 133 | { |
134 | this.FinalizeBAFactorySymbol(section, balBaSymbol.SourceLineNumbers); | 134 | this.VerifyPrereqPackages(section, balBaSymbol.SourceLineNumbers, isIuiBA); |
135 | } | ||
136 | |||
137 | if (isIuiBA || isStdBA || isMBA || isDNC) | ||
138 | { | ||
139 | this.VerifyBAFunctions(section); | ||
140 | } | ||
141 | |||
142 | if (isIuiBA || isMBA || (isDNC && !isSCD)) | ||
143 | { | ||
144 | this.VerifyPrereqPackages(section, balBaSymbol.SourceLineNumbers, isDNC, isIuiBA); | ||
145 | } | 135 | } |
146 | } | 136 | } |
147 | 137 | ||
148 | private void FinalizeBAFactorySymbol(IntermediateSection section, SourceLineNumber baSourceLineNumbers) | ||
149 | { | ||
150 | var factorySymbol = section.Symbols.OfType<WixBalBAFactoryAssemblySymbol>().SingleOrDefault(); | ||
151 | if (null == factorySymbol) | ||
152 | { | ||
153 | this.Messaging.Write(BalErrors.MissingDNCBAFactoryAssembly(baSourceLineNumbers)); | ||
154 | return; | ||
155 | } | ||
156 | |||
157 | var factoryPayloadSymbol = section.Symbols.OfType<WixBundlePayloadSymbol>() | ||
158 | .Where(p => p.Id.Id == factorySymbol.PayloadId) | ||
159 | .SingleOrDefault(); | ||
160 | if (null == factoryPayloadSymbol) | ||
161 | { | ||
162 | throw new WixException($"Missing payload symbol with id: 'factorySymbol.PayloadId'"); | ||
163 | } | ||
164 | |||
165 | factorySymbol.FilePath = factoryPayloadSymbol.Name; | ||
166 | } | ||
167 | |||
168 | private void VerifyBAFunctions(IntermediateSection section) | 138 | private void VerifyBAFunctions(IntermediateSection section) |
169 | { | 139 | { |
170 | WixBalBAFunctionsSymbol baFunctionsSymbol = null; | 140 | WixBalBAFunctionsSymbol baFunctionsSymbol = null; |
@@ -234,7 +204,7 @@ namespace WixToolset.Bal | |||
234 | var nonPermanentNonPrimaryPackages = new List<WixBundlePackageSymbol>(); | 204 | var nonPermanentNonPrimaryPackages = new List<WixBundlePackageSymbol>(); |
235 | 205 | ||
236 | var balPackageInfoSymbolsByPackageId = section.Symbols.OfType<WixBalPackageInfoSymbol>().ToDictionary(x => x.PackageId); | 206 | var balPackageInfoSymbolsByPackageId = section.Symbols.OfType<WixBalPackageInfoSymbol>().ToDictionary(x => x.PackageId); |
237 | var mbaPrereqInfoSymbolsByPackageId = section.Symbols.OfType<WixMbaPrereqInformationSymbol>().ToDictionary(x => x.PackageId); | 207 | var mbaPrereqInfoSymbolsByPackageId = section.Symbols.OfType<WixPrereqInformationSymbol>().ToDictionary(x => x.PackageId); |
238 | var msiPackageSymbolsByPackageId = section.Symbols.OfType<WixBundleMsiPackageSymbol>().ToDictionary(x => x.Id.Id); | 208 | var msiPackageSymbolsByPackageId = section.Symbols.OfType<WixBundleMsiPackageSymbol>().ToDictionary(x => x.Id.Id); |
239 | var packageSymbols = section.Symbols.OfType<WixBundlePackageSymbol>().ToList(); | 209 | var packageSymbols = section.Symbols.OfType<WixBundlePackageSymbol>().ToList(); |
240 | foreach (var packageSymbol in packageSymbols) | 210 | foreach (var packageSymbol in packageSymbols) |
@@ -263,7 +233,7 @@ namespace WixToolset.Bal | |||
263 | { | 233 | { |
264 | if (!isPrereq) | 234 | if (!isPrereq) |
265 | { | 235 | { |
266 | var prereqInfoSymbol = section.AddSymbol(new WixMbaPrereqInformationSymbol(packageSymbol.SourceLineNumbers, new Identifier(AccessModifier.Global, packageId)) | 236 | var prereqInfoSymbol = section.AddSymbol(new WixPrereqInformationSymbol(packageSymbol.SourceLineNumbers, new Identifier(AccessModifier.Global, packageId)) |
267 | { | 237 | { |
268 | PackageId = packageId, | 238 | PackageId = packageId, |
269 | }); | 239 | }); |
@@ -476,13 +446,12 @@ namespace WixToolset.Bal | |||
476 | } | 446 | } |
477 | } | 447 | } |
478 | 448 | ||
479 | private void VerifyPrereqPackages(IntermediateSection section, SourceLineNumber baSourceLineNumbers, bool isDNC, bool isIuiBA) | 449 | private void VerifyPrereqPackages(IntermediateSection section, SourceLineNumber baSourceLineNumbers, bool isIuiBA) |
480 | { | 450 | { |
481 | var prereqInfoSymbols = section.Symbols.OfType<WixMbaPrereqInformationSymbol>().ToList(); | 451 | var prereqInfoSymbols = section.Symbols.OfType<WixPrereqInformationSymbol>().ToList(); |
482 | if (!isIuiBA && prereqInfoSymbols.Count == 0) | 452 | if (!isIuiBA && prereqInfoSymbols.Count == 0) |
483 | { | 453 | { |
484 | var message = isDNC ? BalErrors.MissingDNCPrereq(baSourceLineNumbers) : BalErrors.MissingMBAPrereq(baSourceLineNumbers); | 454 | this.Messaging.Write(BalErrors.MissingPrereq(baSourceLineNumbers)); |
485 | this.Messaging.Write(message); | ||
486 | return; | 455 | return; |
487 | } | 456 | } |
488 | 457 | ||
@@ -514,18 +483,5 @@ namespace WixToolset.Bal | |||
514 | } | 483 | } |
515 | } | 484 | } |
516 | } | 485 | } |
517 | |||
518 | private bool VerifySCD(IntermediateSection section) | ||
519 | { | ||
520 | var isSCD = false; | ||
521 | |||
522 | var dncOptions = section.Symbols.OfType<WixDncOptionsSymbol>().SingleOrDefault(); | ||
523 | if (dncOptions != null) | ||
524 | { | ||
525 | isSCD = dncOptions.SelfContainedDeployment != 0; | ||
526 | } | ||
527 | |||
528 | return isSCD; | ||
529 | } | ||
530 | } | 486 | } |
531 | } | 487 | } |
diff --git a/src/ext/Bal/wixext/BalCompiler.cs b/src/ext/Bal/wixext/BalCompiler.cs index 72883bdf..829da0e6 100644 --- a/src/ext/Bal/wixext/BalCompiler.cs +++ b/src/ext/Bal/wixext/BalCompiler.cs | |||
@@ -7,6 +7,7 @@ namespace WixToolset.Bal | |||
7 | using System.Xml.Linq; | 7 | using System.Xml.Linq; |
8 | using WixToolset.Bal.Symbols; | 8 | using WixToolset.Bal.Symbols; |
9 | using WixToolset.Data; | 9 | using WixToolset.Data; |
10 | using WixToolset.Data.Burn; | ||
10 | using WixToolset.Data.Symbols; | 11 | using WixToolset.Data.Symbols; |
11 | using WixToolset.Extensibility; | 12 | using WixToolset.Extensibility; |
12 | using WixToolset.Extensibility.Data; | 13 | using WixToolset.Extensibility.Data; |
@@ -17,16 +18,9 @@ namespace WixToolset.Bal | |||
17 | public sealed class BalCompiler : BaseCompilerExtension | 18 | public sealed class BalCompiler : BaseCompilerExtension |
18 | { | 19 | { |
19 | private readonly Dictionary<string, WixBalPackageInfoSymbol> packageInfoSymbolsByPackageId = new Dictionary<string, WixBalPackageInfoSymbol>(); | 20 | private readonly Dictionary<string, WixBalPackageInfoSymbol> packageInfoSymbolsByPackageId = new Dictionary<string, WixBalPackageInfoSymbol>(); |
20 | private readonly Dictionary<string, WixMbaPrereqInformationSymbol> prereqInfoSymbolsByPackageId = new Dictionary<string, WixMbaPrereqInformationSymbol>(); | 21 | private readonly Dictionary<string, WixPrereqInformationSymbol> prereqInfoSymbolsByPackageId = new Dictionary<string, WixPrereqInformationSymbol>(); |
21 | 22 | ||
22 | private enum WixDotNetCoreBootstrapperApplicationHostTheme | 23 | private enum WixPrerequisiteBootstrapperApplicationTheme |
23 | { | ||
24 | Unknown, | ||
25 | None, | ||
26 | Standard, | ||
27 | } | ||
28 | |||
29 | private enum WixManagedBootstrapperApplicationHostTheme | ||
30 | { | 24 | { |
31 | Unknown, | 25 | Unknown, |
32 | None, | 26 | None, |
@@ -63,17 +57,35 @@ namespace WixToolset.Bal | |||
63 | /// <param name="context">Extra information about the context in which this element is being parsed.</param> | 57 | /// <param name="context">Extra information about the context in which this element is being parsed.</param> |
64 | public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) | 58 | public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) |
65 | { | 59 | { |
60 | this.ParsePossibleKeyPathElement(intermediate, section, parentElement, element, context); | ||
61 | } | ||
62 | |||
63 | /// <summary> | ||
64 | /// Processes an element for the Compiler. | ||
65 | /// </summary> | ||
66 | /// <param name="sourceLineNumbers">Source line number for the parent element.</param> | ||
67 | /// <param name="parentElement">Parent element of element to process.</param> | ||
68 | /// <param name="element">Element to process.</param> | ||
69 | /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param> | ||
70 | public override IComponentKeyPath ParsePossibleKeyPathElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) | ||
71 | { | ||
72 | IComponentKeyPath exePayloadRef = null; | ||
73 | |||
66 | switch (parentElement.Name.LocalName) | 74 | switch (parentElement.Name.LocalName) |
67 | { | 75 | { |
68 | case "Bundle": | 76 | case "Bundle": |
69 | case "Fragment": | 77 | case "Fragment": |
70 | switch (element.Name.LocalName) | 78 | switch (element.Name.LocalName) |
71 | { | 79 | { |
80 | case "BootstrapperApplicationPrerequisiteInformation": | ||
81 | this.ParseBootstrapperApplicationPrerequisiteInformationElement(intermediate, section, element); | ||
82 | break; | ||
72 | case "Condition": | 83 | case "Condition": |
73 | this.ParseConditionElement(intermediate, section, element); | 84 | this.ParseConditionElement(intermediate, section, element); |
74 | break; | 85 | break; |
75 | case "ManagedBootstrapperApplicationPrereqInformation": | 86 | case "ManagedBootstrapperApplicationPrereqInformation": |
76 | this.ParseMbaPrereqInfoElement(intermediate, section, element); | 87 | this.Messaging.Write(WarningMessages.DeprecatedElement(this.ParseHelper.GetSourceLineNumbers(element), element.Name.LocalName, "BootstrapperApplicationPrerequisiteInformation")); |
88 | this.ParseBootstrapperApplicationPrerequisiteInformationElement(intermediate, section, element); | ||
77 | break; | 89 | break; |
78 | default: | 90 | default: |
79 | this.ParseHelper.UnexpectedElement(parentElement, element); | 91 | this.ParseHelper.UnexpectedElement(parentElement, element); |
@@ -84,16 +96,19 @@ namespace WixToolset.Bal | |||
84 | switch (element.Name.LocalName) | 96 | switch (element.Name.LocalName) |
85 | { | 97 | { |
86 | case "WixInternalUIBootstrapperApplication": | 98 | case "WixInternalUIBootstrapperApplication": |
87 | this.ParseWixInternalUIBootstrapperApplicationElement(intermediate, section, element); | 99 | exePayloadRef = this.ParseWixInternalUIBootstrapperApplicationElement(intermediate, section, element); |
100 | break; | ||
101 | case "WixPrerequisiteBootstrapperApplication": | ||
102 | this.ParseWixPrerequisiteBootstrapperApplicationElement(intermediate, section, element, context); | ||
88 | break; | 103 | break; |
89 | case "WixStandardBootstrapperApplication": | 104 | case "WixStandardBootstrapperApplication": |
90 | this.ParseWixStandardBootstrapperApplicationElement(intermediate, section, element); | 105 | exePayloadRef = this.ParseWixStandardBootstrapperApplicationElement(intermediate, section, element); |
91 | break; | 106 | break; |
92 | case "WixManagedBootstrapperApplicationHost": | 107 | case "WixManagedBootstrapperApplicationHost": |
93 | this.ParseWixManagedBootstrapperApplicationHostElement(intermediate, section, element); | 108 | this.Messaging.Write(WarningMessages.DeprecatedElement(this.ParseHelper.GetSourceLineNumbers(element), element.Name.LocalName)); |
94 | break; | 109 | break; |
95 | case "WixDotNetCoreBootstrapperApplicationHost": | 110 | case "WixDotNetCoreBootstrapperApplicationHost": |
96 | this.ParseWixDotNetCoreBootstrapperApplicationHostElement(intermediate, section, element); | 111 | this.Messaging.Write(WarningMessages.DeprecatedElement(this.ParseHelper.GetSourceLineNumbers(element), element.Name.LocalName)); |
97 | break; | 112 | break; |
98 | default: | 113 | default: |
99 | this.ParseHelper.UnexpectedElement(parentElement, element); | 114 | this.ParseHelper.UnexpectedElement(parentElement, element); |
@@ -104,6 +119,8 @@ namespace WixToolset.Bal | |||
104 | this.ParseHelper.UnexpectedElement(parentElement, element); | 119 | this.ParseHelper.UnexpectedElement(parentElement, element); |
105 | break; | 120 | break; |
106 | } | 121 | } |
122 | |||
123 | return exePayloadRef; | ||
107 | } | 124 | } |
108 | 125 | ||
109 | /// <summary> | 126 | /// <summary> |
@@ -282,15 +299,7 @@ namespace WixToolset.Bal | |||
282 | switch (attribute.Name.LocalName) | 299 | switch (attribute.Name.LocalName) |
283 | { | 300 | { |
284 | case "BAFactoryAssembly": | 301 | case "BAFactoryAssembly": |
285 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute)) | 302 | this.Messaging.Write(BalWarnings.DeprecatedBAFactoryAssemblyAttribute(this.ParseHelper.GetSourceLineNumbers(parentElement), parentElement.Name.LocalName, attribute.Name.LocalName)); |
286 | { | ||
287 | // There can only be one. | ||
288 | var id = new Identifier(AccessModifier.Global, "TheBAFactoryAssembly"); | ||
289 | section.AddSymbol(new WixBalBAFactoryAssemblySymbol(sourceLineNumbers, id) | ||
290 | { | ||
291 | PayloadId = payloadId, | ||
292 | }); | ||
293 | } | ||
294 | break; | 303 | break; |
295 | case "BAFunctions": | 304 | case "BAFunctions": |
296 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute)) | 305 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute)) |
@@ -352,15 +361,15 @@ namespace WixToolset.Bal | |||
352 | return packageInfo; | 361 | return packageInfo; |
353 | } | 362 | } |
354 | 363 | ||
355 | private WixMbaPrereqInformationSymbol GetMbaPrereqInformationSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, XAttribute prereqAttribute, string packageId) | 364 | private WixPrereqInformationSymbol GetMbaPrereqInformationSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, XAttribute prereqAttribute, string packageId) |
356 | { | 365 | { |
357 | WixMbaPrereqInformationSymbol prereqInfo = null; | 366 | WixPrereqInformationSymbol prereqInfo = null; |
358 | 367 | ||
359 | if (prereqAttribute != null && YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, prereqAttribute)) | 368 | if (prereqAttribute != null && YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, prereqAttribute)) |
360 | { | 369 | { |
361 | if (!this.prereqInfoSymbolsByPackageId.TryGetValue(packageId, out prereqInfo)) | 370 | if (!this.prereqInfoSymbolsByPackageId.TryGetValue(packageId, out prereqInfo)) |
362 | { | 371 | { |
363 | prereqInfo = section.AddSymbol(new WixMbaPrereqInformationSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, packageId)) | 372 | prereqInfo = section.AddSymbol(new WixPrereqInformationSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, packageId)) |
364 | { | 373 | { |
365 | PackageId = packageId, | 374 | PackageId = packageId, |
366 | }); | 375 | }); |
@@ -432,7 +441,7 @@ namespace WixToolset.Bal | |||
432 | /// Parses a Condition element for Bundles. | 441 | /// Parses a Condition element for Bundles. |
433 | /// </summary> | 442 | /// </summary> |
434 | /// <param name="node">The element to parse.</param> | 443 | /// <param name="node">The element to parse.</param> |
435 | private void ParseMbaPrereqInfoElement(Intermediate intermediate, IntermediateSection section, XElement node) | 444 | private void ParseBootstrapperApplicationPrerequisiteInformationElement(Intermediate intermediate, IntermediateSection section, XElement node) |
436 | { | 445 | { |
437 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | 446 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); |
438 | string packageId = null; | 447 | string packageId = null; |
@@ -480,7 +489,7 @@ namespace WixToolset.Bal | |||
480 | 489 | ||
481 | if (!this.Messaging.EncounteredError) | 490 | if (!this.Messaging.EncounteredError) |
482 | { | 491 | { |
483 | section.AddSymbol(new WixMbaPrereqInformationSymbol(sourceLineNumbers) | 492 | section.AddSymbol(new WixPrereqInformationSymbol(sourceLineNumbers) |
484 | { | 493 | { |
485 | PackageId = packageId, | 494 | PackageId = packageId, |
486 | LicenseFile = licenseFile, | 495 | LicenseFile = licenseFile, |
@@ -490,14 +499,16 @@ namespace WixToolset.Bal | |||
490 | } | 499 | } |
491 | } | 500 | } |
492 | 501 | ||
493 | private void ParseWixInternalUIBootstrapperApplicationElement(Intermediate intermediate, IntermediateSection section, XElement node) | 502 | private IComponentKeyPath ParseWixInternalUIBootstrapperApplicationElement(Intermediate intermediate, IntermediateSection section, XElement node) |
494 | { | 503 | { |
495 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | 504 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); |
496 | WixInternalUIBootstrapperApplicationTheme? theme = null; | 505 | var theme = WixInternalUIBootstrapperApplicationTheme.Standard; |
497 | string themeFile = null; | 506 | string themeFile = null; |
498 | string logoFile = null; | 507 | string logoFile = null; |
499 | string localizationFile = null; | 508 | string localizationFile = null; |
500 | 509 | ||
510 | IComponentKeyPath exePayloadRef = null; | ||
511 | |||
501 | foreach (var attrib in node.Attributes()) | 512 | foreach (var attrib in node.Attributes()) |
502 | { | 513 | { |
503 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 514 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
@@ -542,11 +553,6 @@ namespace WixToolset.Bal | |||
542 | 553 | ||
543 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node); | 554 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node); |
544 | 555 | ||
545 | if (!theme.HasValue) | ||
546 | { | ||
547 | theme = WixInternalUIBootstrapperApplicationTheme.Standard; | ||
548 | } | ||
549 | |||
550 | if (!this.Messaging.EncounteredError) | 556 | if (!this.Messaging.EncounteredError) |
551 | { | 557 | { |
552 | if (!String.IsNullOrEmpty(logoFile)) | 558 | if (!String.IsNullOrEmpty(logoFile)) |
@@ -573,23 +579,41 @@ namespace WixToolset.Bal | |||
573 | }); | 579 | }); |
574 | } | 580 | } |
575 | 581 | ||
576 | var baId = "WixInternalUIBootstrapperApplication"; | ||
577 | switch (theme) | 582 | switch (theme) |
578 | { | 583 | { |
579 | case WixInternalUIBootstrapperApplicationTheme.Standard: | 584 | case WixInternalUIBootstrapperApplicationTheme.Standard: |
580 | baId = "WixInternalUIBootstrapperApplication.Standard"; | 585 | this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixIuibaStandardPayloads", platformSpecific: false); |
581 | break; | 586 | break; |
582 | } | 587 | } |
583 | 588 | ||
584 | this.CreateBARef(section, sourceLineNumbers, node, baId, WixBalBootstrapperApplicationType.InternalUi); | 589 | section.AddSymbol(new WixBalBootstrapperApplicationSymbol(sourceLineNumbers) |
590 | { | ||
591 | Type = WixBalBootstrapperApplicationType.InternalUi, | ||
592 | }); | ||
593 | |||
594 | section.AddSymbol(new WixPrereqOptionsSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixPrereqOptions")) | ||
595 | { | ||
596 | Primary = 1, | ||
597 | HandleHelp = 1, | ||
598 | HandleLayout = 1, | ||
599 | }); | ||
600 | |||
601 | var exePayloadId = this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixInternalUIBootstrapperApplication", platformSpecific: true); | ||
602 | |||
603 | exePayloadRef = this.CreateComponentKeyPath(); | ||
604 | exePayloadRef.Id = new Identifier(AccessModifier.Section, exePayloadId); | ||
605 | exePayloadRef.Explicit = true; // Internal UI BA is always secondary because the PrereqBA is always primary to handle the help and layout options. | ||
606 | exePayloadRef.Type = PossibleKeyPathType.File; | ||
585 | } | 607 | } |
608 | |||
609 | return exePayloadRef; | ||
586 | } | 610 | } |
587 | 611 | ||
588 | /// <summary> | 612 | /// <summary> |
589 | /// Parses a WixStandardBootstrapperApplication element for Bundles. | 613 | /// Parses a WixStandardBootstrapperApplication element for Bundles. |
590 | /// </summary> | 614 | /// </summary> |
591 | /// <param name="node">The element to parse.</param> | 615 | /// <param name="node">The element to parse.</param> |
592 | private void ParseWixStandardBootstrapperApplicationElement(Intermediate intermediate, IntermediateSection section, XElement node) | 616 | private IComponentKeyPath ParseWixStandardBootstrapperApplicationElement(Intermediate intermediate, IntermediateSection section, XElement node) |
593 | { | 617 | { |
594 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | 618 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); |
595 | string launchTarget = null; | 619 | string launchTarget = null; |
@@ -610,6 +634,8 @@ namespace WixToolset.Bal | |||
610 | var showVersion = YesNoType.NotSet; | 634 | var showVersion = YesNoType.NotSet; |
611 | var supportCacheOnly = YesNoType.NotSet; | 635 | var supportCacheOnly = YesNoType.NotSet; |
612 | 636 | ||
637 | IComponentKeyPath exePayloadRef = null; | ||
638 | |||
613 | foreach (var attrib in node.Attributes()) | 639 | foreach (var attrib in node.Attributes()) |
614 | { | 640 | { |
615 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 641 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
@@ -840,35 +866,159 @@ namespace WixToolset.Bal | |||
840 | } | 866 | } |
841 | } | 867 | } |
842 | 868 | ||
843 | var baId = "WixStandardBootstrapperApplication"; | ||
844 | switch (theme) | 869 | switch (theme) |
845 | { | 870 | { |
846 | case WixStandardBootstrapperApplicationTheme.HyperlinkLargeLicense: | 871 | case WixStandardBootstrapperApplicationTheme.HyperlinkLargeLicense: |
847 | baId = "WixStandardBootstrapperApplication.HyperlinkLargeLicense"; | 872 | this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixStdbaHyperlinkLargeLicensePayloads", platformSpecific: false); |
848 | break; | 873 | break; |
849 | case WixStandardBootstrapperApplicationTheme.HyperlinkLicense: | 874 | case WixStandardBootstrapperApplicationTheme.HyperlinkLicense: |
850 | baId = "WixStandardBootstrapperApplication.HyperlinkLicense"; | 875 | this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixStdbaHyperlinkLicensePayloads", platformSpecific: false); |
851 | break; | 876 | break; |
852 | case WixStandardBootstrapperApplicationTheme.HyperlinkSidebarLicense: | 877 | case WixStandardBootstrapperApplicationTheme.HyperlinkSidebarLicense: |
853 | baId = "WixStandardBootstrapperApplication.HyperlinkSidebarLicense"; | 878 | this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixStdbaHyperlinkSidebarLicensePayloads", platformSpecific: false); |
854 | break; | 879 | break; |
855 | case WixStandardBootstrapperApplicationTheme.RtfLargeLicense: | 880 | case WixStandardBootstrapperApplicationTheme.RtfLargeLicense: |
856 | baId = "WixStandardBootstrapperApplication.RtfLargeLicense"; | 881 | this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixStdbaRtfLargeLicensePayloads", platformSpecific: false); |
857 | break; | 882 | break; |
858 | case WixStandardBootstrapperApplicationTheme.RtfLicense: | 883 | case WixStandardBootstrapperApplicationTheme.RtfLicense: |
859 | baId = "WixStandardBootstrapperApplication.RtfLicense"; | 884 | this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixStdbaRtfLicensePayloads", platformSpecific: false); |
885 | break; | ||
886 | } | ||
887 | |||
888 | section.AddSymbol(new WixBalBootstrapperApplicationSymbol(sourceLineNumbers) | ||
889 | { | ||
890 | Type = WixBalBootstrapperApplicationType.Standard, | ||
891 | }); | ||
892 | |||
893 | var exePayloadId = this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixStandardBootstrapperApplication", platformSpecific: true); | ||
894 | |||
895 | exePayloadRef = this.CreateComponentKeyPath(); | ||
896 | exePayloadRef.Id = new Identifier(AccessModifier.Section, exePayloadId); | ||
897 | exePayloadRef.Type = PossibleKeyPathType.File; | ||
898 | } | ||
899 | |||
900 | return exePayloadRef; | ||
901 | } | ||
902 | |||
903 | /// <summary> | ||
904 | /// Parses a WixManagedBootstrapperApplicationHost element for Bundles. | ||
905 | /// </summary> | ||
906 | /// <param name="node">The element to parse.</param> | ||
907 | private void ParseWixPrerequisiteBootstrapperApplicationElement(Intermediate intermediate, IntermediateSection section, XElement node, IDictionary<string, string> context) | ||
908 | { | ||
909 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
910 | string logoFile = null; | ||
911 | string themeFile = null; | ||
912 | string localizationFile = null; | ||
913 | var theme = WixPrerequisiteBootstrapperApplicationTheme.Standard; | ||
914 | |||
915 | foreach (var attrib in node.Attributes()) | ||
916 | { | ||
917 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
918 | { | ||
919 | switch (attrib.Name.LocalName) | ||
920 | { | ||
921 | case "LogoFile": | ||
922 | logoFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
923 | break; | ||
924 | case "ThemeFile": | ||
925 | themeFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
926 | break; | ||
927 | case "LocalizationFile": | ||
928 | localizationFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
929 | break; | ||
930 | case "Theme": | ||
931 | var themeValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
932 | switch (themeValue) | ||
933 | { | ||
934 | case "none": | ||
935 | theme = WixPrerequisiteBootstrapperApplicationTheme.None; | ||
936 | break; | ||
937 | case "standard": | ||
938 | theme = WixPrerequisiteBootstrapperApplicationTheme.Standard; | ||
939 | break; | ||
940 | default: | ||
941 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Theme", themeValue, "none", "standard")); | ||
942 | theme = WixPrerequisiteBootstrapperApplicationTheme.Unknown; | ||
943 | break; | ||
944 | } | ||
945 | break; | ||
946 | default: | ||
947 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
948 | break; | ||
949 | } | ||
950 | } | ||
951 | else | ||
952 | { | ||
953 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
954 | } | ||
955 | } | ||
956 | |||
957 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node); | ||
958 | |||
959 | if (!this.Messaging.EncounteredError) | ||
960 | { | ||
961 | if (!String.IsNullOrEmpty(logoFile)) | ||
962 | { | ||
963 | section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixPreqbaLogo")) | ||
964 | { | ||
965 | Value = logoFile, | ||
966 | }); | ||
967 | } | ||
968 | |||
969 | if (!String.IsNullOrEmpty(themeFile)) | ||
970 | { | ||
971 | section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixPreqbaThemeXml")) | ||
972 | { | ||
973 | Value = themeFile, | ||
974 | }); | ||
975 | } | ||
976 | |||
977 | if (!String.IsNullOrEmpty(localizationFile)) | ||
978 | { | ||
979 | section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixPreqbaThemeWxl")) | ||
980 | { | ||
981 | Value = localizationFile, | ||
982 | }); | ||
983 | } | ||
984 | |||
985 | switch (theme) | ||
986 | { | ||
987 | case WixPrerequisiteBootstrapperApplicationTheme.Standard: | ||
988 | this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixPreqbaStandardPayloads", platformSpecific: false); | ||
860 | break; | 989 | break; |
861 | } | 990 | } |
862 | 991 | ||
863 | this.CreateBARef(section, sourceLineNumbers, node, baId, WixBalBootstrapperApplicationType.Standard); | 992 | section.AddSymbol(new WixBalBootstrapperApplicationSymbol(sourceLineNumbers) |
993 | { | ||
994 | Type = WixBalBootstrapperApplicationType.Prerequisite, | ||
995 | }); | ||
996 | |||
997 | var primary = context.TryGetValue("Secondary", out var parentSecondaryValue) && "True".Equals(parentSecondaryValue, StringComparison.OrdinalIgnoreCase) ? true : false; | ||
998 | |||
999 | var baId = this.CreateIdentifierFromPlatform(sourceLineNumbers, node, primary ? "WixPrereqBootstrapperApplication.Primary" : "WixPrereqBootstrapperApplication.Secondary"); | ||
1000 | |||
1001 | if (!String.IsNullOrEmpty(baId)) | ||
1002 | { | ||
1003 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBootstrapperApplication, baId); | ||
1004 | } | ||
1005 | |||
1006 | if (primary) | ||
1007 | { | ||
1008 | section.AddSymbol(new WixPrereqOptionsSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixPrereqOptions")) | ||
1009 | { | ||
1010 | Primary = 1 | ||
1011 | }); | ||
1012 | } | ||
864 | } | 1013 | } |
865 | } | 1014 | } |
866 | 1015 | ||
1016 | #if DELETE | ||
867 | /// <summary> | 1017 | /// <summary> |
868 | /// Parses a WixManagedBootstrapperApplicationHost element for Bundles. | 1018 | /// Parses a WixManagedBootstrapperApplicationHost element for Bundles. |
869 | /// </summary> | 1019 | /// </summary> |
870 | /// <param name="node">The element to parse.</param> | 1020 | /// <param name="node">The element to parse.</param> |
871 | private void ParseWixManagedBootstrapperApplicationHostElement(Intermediate intermediate, IntermediateSection section, XElement node) | 1021 | private IComponentKeyPath ParseWixManagedBootstrapperApplicationHostElement(Intermediate intermediate, IntermediateSection section, XElement node) |
872 | { | 1022 | { |
873 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | 1023 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); |
874 | bool alwaysInstallPrereqs = false; | 1024 | bool alwaysInstallPrereqs = false; |
@@ -877,6 +1027,8 @@ namespace WixToolset.Bal | |||
877 | string localizationFile = null; | 1027 | string localizationFile = null; |
878 | WixManagedBootstrapperApplicationHostTheme? theme = null; | 1028 | WixManagedBootstrapperApplicationHostTheme? theme = null; |
879 | 1029 | ||
1030 | IComponentKeyPath exePayloadRef = null; | ||
1031 | |||
880 | foreach (var attrib in node.Attributes()) | 1032 | foreach (var attrib in node.Attributes()) |
881 | { | 1033 | { |
882 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 1034 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
@@ -963,23 +1115,25 @@ namespace WixToolset.Bal | |||
963 | break; | 1115 | break; |
964 | } | 1116 | } |
965 | 1117 | ||
966 | this.CreateBARef(section, sourceLineNumbers, node, baId, WixBalBootstrapperApplicationType.ManagedHost); | 1118 | exePayloadRef = this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixManagedBootstrapperApplicationHost", baId, WixBalBootstrapperApplicationType.ManagedHost); |
967 | 1119 | ||
968 | if (alwaysInstallPrereqs) | 1120 | if (alwaysInstallPrereqs) |
969 | { | 1121 | { |
970 | section.AddSymbol(new WixMbaPrereqOptionsSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixMbaPrereqOptions")) | 1122 | section.AddSymbol(new WixPrereqOptionsSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixPrereqOptions")) |
971 | { | 1123 | { |
972 | AlwaysInstallPrereqs = 1, | 1124 | AlwaysInstallPrereqs = 1, |
973 | }); | 1125 | }); |
974 | } | 1126 | } |
975 | } | 1127 | } |
1128 | |||
1129 | return exePayloadRef; | ||
976 | } | 1130 | } |
977 | 1131 | ||
978 | /// <summary> | 1132 | /// <summary> |
979 | /// Parses a WixDotNetCoreBootstrapperApplication element for Bundles. | 1133 | /// Parses a WixDotNetCoreBootstrapperApplication element for Bundles. |
980 | /// </summary> | 1134 | /// </summary> |
981 | /// <param name="node">The element to parse.</param> | 1135 | /// <param name="node">The element to parse.</param> |
982 | private void ParseWixDotNetCoreBootstrapperApplicationHostElement(Intermediate intermediate, IntermediateSection section, XElement node) | 1136 | private IComponentKeyPath ParseWixDotNetCoreBootstrapperApplicationHostElement(Intermediate intermediate, IntermediateSection section, XElement node) |
983 | { | 1137 | { |
984 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | 1138 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); |
985 | bool alwaysInstallPrereqs = false; | 1139 | bool alwaysInstallPrereqs = false; |
@@ -989,6 +1143,8 @@ namespace WixToolset.Bal | |||
989 | var selfContainedDeployment = YesNoType.NotSet; | 1143 | var selfContainedDeployment = YesNoType.NotSet; |
990 | WixDotNetCoreBootstrapperApplicationHostTheme? theme = null; | 1144 | WixDotNetCoreBootstrapperApplicationHostTheme? theme = null; |
991 | 1145 | ||
1146 | IComponentKeyPath exePayloadRef = null; | ||
1147 | |||
992 | foreach (var attrib in node.Attributes()) | 1148 | foreach (var attrib in node.Attributes()) |
993 | { | 1149 | { |
994 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 1150 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
@@ -1086,19 +1242,36 @@ namespace WixToolset.Bal | |||
1086 | break; | 1242 | break; |
1087 | } | 1243 | } |
1088 | 1244 | ||
1089 | this.CreateBARef(section, sourceLineNumbers, node, baId, WixBalBootstrapperApplicationType.DotNetCoreHost); | 1245 | exePayloadRef = this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixDotNetCoreBootstrapperApplicationHost", baId, WixBalBootstrapperApplicationType.DotNetCoreHost); |
1090 | 1246 | ||
1091 | if (alwaysInstallPrereqs) | 1247 | if (alwaysInstallPrereqs) |
1092 | { | 1248 | { |
1093 | section.AddSymbol(new WixMbaPrereqOptionsSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixMbaPrereqOptions")) | 1249 | section.AddSymbol(new WixPrereqOptionsSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixPrereqOptions")) |
1094 | { | 1250 | { |
1095 | AlwaysInstallPrereqs = 1, | 1251 | AlwaysInstallPrereqs = 1, |
1096 | }); | 1252 | }); |
1097 | } | 1253 | } |
1098 | } | 1254 | } |
1255 | |||
1256 | return exePayloadRef; | ||
1257 | } | ||
1258 | #endif | ||
1259 | |||
1260 | private string CreatePayloadGroupRef(IntermediateSection section, SourceLineNumber sourceLineNumbers, XElement node, string basePayloadGroupId, bool platformSpecific) | ||
1261 | { | ||
1262 | var id = platformSpecific ? this.CreateIdentifierFromPlatform(sourceLineNumbers, node, basePayloadGroupId) : basePayloadGroupId; | ||
1263 | |||
1264 | if (!String.IsNullOrEmpty(id)) | ||
1265 | { | ||
1266 | this.ParseHelper.CreateWixGroupSymbol(section, sourceLineNumbers, ComplexReferenceParentType.Container, BurnConstants.BurnUXContainerName, ComplexReferenceChildType.PayloadGroup, id); | ||
1267 | |||
1268 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBundlePayloadGroup, id); | ||
1269 | } | ||
1270 | |||
1271 | return id; | ||
1099 | } | 1272 | } |
1100 | 1273 | ||
1101 | private void CreateBARef(IntermediateSection section, SourceLineNumber sourceLineNumbers, XElement node, string name, WixBalBootstrapperApplicationType baType) | 1274 | private string CreateIdentifierFromPlatform(SourceLineNumber sourceLineNumbers, XElement node, string name) |
1102 | { | 1275 | { |
1103 | var id = this.ParseHelper.CreateIdentifierValueFromPlatform(name, this.Context.Platform, BurnPlatforms.X86 | BurnPlatforms.X64 | BurnPlatforms.ARM64); | 1276 | var id = this.ParseHelper.CreateIdentifierValueFromPlatform(name, this.Context.Platform, BurnPlatforms.X86 | BurnPlatforms.X64 | BurnPlatforms.ARM64); |
1104 | if (id == null) | 1277 | if (id == null) |
@@ -1106,15 +1279,7 @@ namespace WixToolset.Bal | |||
1106 | this.Messaging.Write(ErrorMessages.UnsupportedPlatformForElement(sourceLineNumbers, this.Context.Platform.ToString(), node.Name.LocalName)); | 1279 | this.Messaging.Write(ErrorMessages.UnsupportedPlatformForElement(sourceLineNumbers, this.Context.Platform.ToString(), node.Name.LocalName)); |
1107 | } | 1280 | } |
1108 | 1281 | ||
1109 | if (!this.Messaging.EncounteredError) | 1282 | return id; |
1110 | { | ||
1111 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBootstrapperApplication, id); | ||
1112 | |||
1113 | section.AddSymbol(new WixBalBootstrapperApplicationSymbol(sourceLineNumbers) | ||
1114 | { | ||
1115 | Type = baType, | ||
1116 | }); | ||
1117 | } | ||
1118 | } | 1283 | } |
1119 | } | 1284 | } |
1120 | } | 1285 | } |
diff --git a/src/ext/Bal/wixext/BalErrors.cs b/src/ext/Bal/wixext/BalErrors.cs index 7fbccecb..10986f0e 100644 --- a/src/ext/Bal/wixext/BalErrors.cs +++ b/src/ext/Bal/wixext/BalErrors.cs | |||
@@ -48,9 +48,9 @@ namespace WixToolset.Bal | |||
48 | return Message(sourceLineNumbers, Ids.MissingDNCBAFactoryAssembly, "When using DotNetCoreBootstrapperApplicationHost, the Payload element for the BA's entry point DLL must have bal:BAFactoryAssembly=\"yes\"."); | 48 | return Message(sourceLineNumbers, Ids.MissingDNCBAFactoryAssembly, "When using DotNetCoreBootstrapperApplicationHost, the Payload element for the BA's entry point DLL must have bal:BAFactoryAssembly=\"yes\"."); |
49 | } | 49 | } |
50 | 50 | ||
51 | public static Message MissingDNCPrereq(SourceLineNumber sourceLineNumbers) | 51 | public static Message MissingPrereq(SourceLineNumber sourceLineNumbers) |
52 | { | 52 | { |
53 | return Message(sourceLineNumbers, Ids.MissingDNCPrereq, "There must be at least one package with bal:PrereqPackage=\"yes\" when using the DotNetCoreBootstrapperApplicationHost with SelfContainedDeployment set to \"no\"."); | 53 | return Message(sourceLineNumbers, Ids.MissingPrereq, "There must be at least one package with bal:PrereqPackage=\"yes\" when using the bal:WixPrerequisiteBootstrapperApplication."); |
54 | } | 54 | } |
55 | 55 | ||
56 | public static Message MissingIUIPrimaryPackage(SourceLineNumber sourceLineNumbers) | 56 | public static Message MissingIUIPrimaryPackage(SourceLineNumber sourceLineNumbers) |
@@ -58,11 +58,6 @@ namespace WixToolset.Bal | |||
58 | return Message(sourceLineNumbers, Ids.MissingIUIPrimaryPackage, "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\"."); | 58 | return Message(sourceLineNumbers, Ids.MissingIUIPrimaryPackage, "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\"."); |
59 | } | 59 | } |
60 | 60 | ||
61 | public static Message MissingMBAPrereq(SourceLineNumber sourceLineNumbers) | ||
62 | { | ||
63 | return Message(sourceLineNumbers, Ids.MissingMBAPrereq, "There must be at least one package with bal:PrereqPackage=\"yes\" when using the ManagedBootstrapperApplicationHost.\nThis is typically done by using the WixNetFxExtension and referencing one of the NetFxAsPrereq package groups."); | ||
64 | } | ||
65 | |||
66 | public static Message MultipleBAFunctions(SourceLineNumber sourceLineNumbers) | 61 | public static Message MultipleBAFunctions(SourceLineNumber sourceLineNumbers) |
67 | { | 62 | { |
68 | return Message(sourceLineNumbers, Ids.MultipleBAFunctions, "WixStandardBootstrapperApplication doesn't support multiple BAFunctions DLLs."); | 63 | return Message(sourceLineNumbers, Ids.MultipleBAFunctions, "WixStandardBootstrapperApplication doesn't support multiple BAFunctions DLLs."); |
@@ -106,11 +101,10 @@ namespace WixToolset.Bal | |||
106 | public enum Ids | 101 | public enum Ids |
107 | { | 102 | { |
108 | AttributeRequiresPrereqPackage = 6801, | 103 | AttributeRequiresPrereqPackage = 6801, |
109 | MissingMBAPrereq = 6802, | 104 | MissingPrereq = 6802, |
110 | MultiplePrereqLicenses = 6803, | 105 | MultiplePrereqLicenses = 6803, |
111 | MultipleBAFunctions = 6804, | 106 | MultipleBAFunctions = 6804, |
112 | BAFunctionsPayloadRequiredInUXContainer = 6805, | 107 | BAFunctionsPayloadRequiredInUXContainer = 6805, |
113 | MissingDNCPrereq = 6806, | ||
114 | MissingIUIPrimaryPackage = 6808, | 108 | MissingIUIPrimaryPackage = 6808, |
115 | MultiplePrimaryPackageType = 6809, | 109 | MultiplePrimaryPackageType = 6809, |
116 | MultiplePrimaryPackageType2 = 6810, | 110 | MultiplePrimaryPackageType2 = 6810, |
diff --git a/src/ext/Bal/wixext/BalWarnings.cs b/src/ext/Bal/wixext/BalWarnings.cs index 96e7a523..73a19d07 100644 --- a/src/ext/Bal/wixext/BalWarnings.cs +++ b/src/ext/Bal/wixext/BalWarnings.cs | |||
@@ -33,6 +33,11 @@ namespace WixToolset.Bal | |||
33 | return Message(sourceLineNumbers, Ids.UnmarkedBAFunctionsDLL, "WixStandardBootstrapperApplication doesn't automatically load BAFunctions.dll. Use the bal:BAFunctions attribute to indicate that it should be loaded."); | 33 | return Message(sourceLineNumbers, Ids.UnmarkedBAFunctionsDLL, "WixStandardBootstrapperApplication doesn't automatically load BAFunctions.dll. Use the bal:BAFunctions attribute to indicate that it should be loaded."); |
34 | } | 34 | } |
35 | 35 | ||
36 | public static Message DeprecatedBAFactoryAssemblyAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName) | ||
37 | { | ||
38 | return Message(sourceLineNumbers, Ids.DeprecatedBAFactoryAssemblyAttribute, "The {0}/@{1} attribute has been deprecated. Move the Payload/@SourceFile attribute to be the BootstrapperApplication/@SourceFile attribute and remove the Payload element.", elementName, attributeName); | ||
39 | } | ||
40 | |||
36 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) | 41 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) |
37 | { | 42 | { |
38 | return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); | 43 | return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); |
@@ -50,6 +55,7 @@ namespace WixToolset.Bal | |||
50 | IuibaPrimaryPackageInstallCondition = 6503, | 55 | IuibaPrimaryPackageInstallCondition = 6503, |
51 | IuibaPrimaryPackageDisplayInternalUICondition = 6504, | 56 | IuibaPrimaryPackageDisplayInternalUICondition = 6504, |
52 | IuibaPrereqPackageAfterPrimaryPackage = 6505, | 57 | IuibaPrereqPackageAfterPrimaryPackage = 6505, |
58 | DeprecatedBAFactoryAssemblyAttribute = 6506, | ||
53 | } | 59 | } |
54 | } | 60 | } |
55 | } | 61 | } |
diff --git a/src/ext/Bal/wixext/Symbols/BalSymbolDefinitions.cs b/src/ext/Bal/wixext/Symbols/BalSymbolDefinitions.cs index 5229f278..5e9fb936 100644 --- a/src/ext/Bal/wixext/Symbols/BalSymbolDefinitions.cs +++ b/src/ext/Bal/wixext/Symbols/BalSymbolDefinitions.cs | |||
@@ -13,11 +13,11 @@ namespace WixToolset.Bal | |||
13 | WixBalCondition, | 13 | WixBalCondition, |
14 | WixBalPackageInfo, | 14 | WixBalPackageInfo, |
15 | WixDncOptions, | 15 | WixDncOptions, |
16 | WixMbaPrereqInformation, | 16 | WixPrereqInformation, |
17 | WixStdbaCommandLine, | 17 | WixStdbaCommandLine, |
18 | WixStdbaOptions, | 18 | WixStdbaOptions, |
19 | WixStdbaOverridableVariable, | 19 | WixStdbaOverridableVariable, |
20 | WixMbaPrereqOptions, | 20 | WixPrereqOptions, |
21 | WixBalBootstrapperApplication, | 21 | WixBalBootstrapperApplication, |
22 | } | 22 | } |
23 | 23 | ||
@@ -37,8 +37,10 @@ namespace WixToolset.Bal | |||
37 | { | 37 | { |
38 | switch (type) | 38 | switch (type) |
39 | { | 39 | { |
40 | #pragma warning disable 0612 // obsolete | ||
40 | case BalSymbolDefinitionType.WixBalBAFactoryAssembly: | 41 | case BalSymbolDefinitionType.WixBalBAFactoryAssembly: |
41 | return BalSymbolDefinitions.WixBalBAFactoryAssembly; | 42 | return BalSymbolDefinitions.WixBalBAFactoryAssembly; |
43 | #pragma warning restore 0612 | ||
42 | 44 | ||
43 | case BalSymbolDefinitionType.WixBalBAFunctions: | 45 | case BalSymbolDefinitionType.WixBalBAFunctions: |
44 | return BalSymbolDefinitions.WixBalBAFunctions; | 46 | return BalSymbolDefinitions.WixBalBAFunctions; |
@@ -49,11 +51,8 @@ namespace WixToolset.Bal | |||
49 | case BalSymbolDefinitionType.WixBalPackageInfo: | 51 | case BalSymbolDefinitionType.WixBalPackageInfo: |
50 | return BalSymbolDefinitions.WixBalPackageInfo; | 52 | return BalSymbolDefinitions.WixBalPackageInfo; |
51 | 53 | ||
52 | case BalSymbolDefinitionType.WixDncOptions: | 54 | case BalSymbolDefinitionType.WixPrereqInformation: |
53 | return BalSymbolDefinitions.WixDncOptions; | 55 | return BalSymbolDefinitions.WixPrereqInformation; |
54 | |||
55 | case BalSymbolDefinitionType.WixMbaPrereqInformation: | ||
56 | return BalSymbolDefinitions.WixMbaPrereqInformation; | ||
57 | 56 | ||
58 | case BalSymbolDefinitionType.WixStdbaCommandLine: | 57 | case BalSymbolDefinitionType.WixStdbaCommandLine: |
59 | return BalSymbolDefinitions.WixStdbaCommandLine; | 58 | return BalSymbolDefinitions.WixStdbaCommandLine; |
@@ -64,8 +63,8 @@ namespace WixToolset.Bal | |||
64 | case BalSymbolDefinitionType.WixStdbaOverridableVariable: | 63 | case BalSymbolDefinitionType.WixStdbaOverridableVariable: |
65 | return BalSymbolDefinitions.WixStdbaOverridableVariable; | 64 | return BalSymbolDefinitions.WixStdbaOverridableVariable; |
66 | 65 | ||
67 | case BalSymbolDefinitionType.WixMbaPrereqOptions: | 66 | case BalSymbolDefinitionType.WixPrereqOptions: |
68 | return BalSymbolDefinitions.WixMbaPrereqOptions; | 67 | return BalSymbolDefinitions.WixPrereqOptions; |
69 | 68 | ||
70 | case BalSymbolDefinitionType.WixBalBootstrapperApplication: | 69 | case BalSymbolDefinitionType.WixBalBootstrapperApplication: |
71 | return BalSymbolDefinitions.WixBalBootstrapperApplication; | 70 | return BalSymbolDefinitions.WixBalBootstrapperApplication; |
@@ -77,16 +76,17 @@ namespace WixToolset.Bal | |||
77 | 76 | ||
78 | static BalSymbolDefinitions() | 77 | static BalSymbolDefinitions() |
79 | { | 78 | { |
79 | #pragma warning disable 0612 // obsolete | ||
80 | WixBalBAFactoryAssembly.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 80 | WixBalBAFactoryAssembly.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
81 | #pragma warning restore 0612 | ||
81 | WixBalBAFunctions.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 82 | WixBalBAFunctions.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
82 | WixBalCondition.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 83 | WixBalCondition.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
83 | WixBalPackageInfo.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 84 | WixBalPackageInfo.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
84 | WixDncOptions.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 85 | WixPrereqInformation.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
85 | WixMbaPrereqInformation.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | ||
86 | WixStdbaCommandLine.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 86 | WixStdbaCommandLine.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
87 | WixStdbaOptions.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 87 | WixStdbaOptions.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
88 | WixStdbaOverridableVariable.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 88 | WixStdbaOverridableVariable.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
89 | WixMbaPrereqOptions.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 89 | WixPrereqOptions.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
90 | } | 90 | } |
91 | } | 91 | } |
92 | } | 92 | } |
diff --git a/src/ext/Bal/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs b/src/ext/Bal/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs index 52042e4c..3ce535a3 100644 --- a/src/ext/Bal/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs +++ b/src/ext/Bal/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs | |||
@@ -2,11 +2,13 @@ | |||
2 | 2 | ||
3 | namespace WixToolset.Bal | 3 | namespace WixToolset.Bal |
4 | { | 4 | { |
5 | using System; | ||
5 | using WixToolset.Data; | 6 | using WixToolset.Data; |
6 | using WixToolset.Bal.Symbols; | 7 | using WixToolset.Bal.Symbols; |
7 | 8 | ||
8 | public static partial class BalSymbolDefinitions | 9 | public static partial class BalSymbolDefinitions |
9 | { | 10 | { |
11 | [Obsolete] | ||
10 | public static readonly IntermediateSymbolDefinition WixBalBAFactoryAssembly = new IntermediateSymbolDefinition( | 12 | public static readonly IntermediateSymbolDefinition WixBalBAFactoryAssembly = new IntermediateSymbolDefinition( |
11 | BalSymbolDefinitionType.WixBalBAFactoryAssembly.ToString(), | 13 | BalSymbolDefinitionType.WixBalBAFactoryAssembly.ToString(), |
12 | new[] | 14 | new[] |
@@ -20,14 +22,17 @@ namespace WixToolset.Bal | |||
20 | 22 | ||
21 | namespace WixToolset.Bal.Symbols | 23 | namespace WixToolset.Bal.Symbols |
22 | { | 24 | { |
25 | using System; | ||
23 | using WixToolset.Data; | 26 | using WixToolset.Data; |
24 | 27 | ||
28 | [Obsolete] | ||
25 | public enum WixBalBAFactorySymbolFields | 29 | public enum WixBalBAFactorySymbolFields |
26 | { | 30 | { |
27 | PayloadId, | 31 | PayloadId, |
28 | FilePath, | 32 | FilePath, |
29 | } | 33 | } |
30 | 34 | ||
35 | [Obsolete] | ||
31 | public class WixBalBAFactoryAssemblySymbol : IntermediateSymbol | 36 | public class WixBalBAFactoryAssemblySymbol : IntermediateSymbol |
32 | { | 37 | { |
33 | public WixBalBAFactoryAssemblySymbol() : base(BalSymbolDefinitions.WixBalBAFactoryAssembly, null, null) | 38 | public WixBalBAFactoryAssemblySymbol() : base(BalSymbolDefinitions.WixBalBAFactoryAssembly, null, null) |
@@ -52,4 +57,4 @@ namespace WixToolset.Bal.Symbols | |||
52 | set => this.Set((int)WixBalBAFactorySymbolFields.FilePath, value); | 57 | set => this.Set((int)WixBalBAFactorySymbolFields.FilePath, value); |
53 | } | 58 | } |
54 | } | 59 | } |
55 | } \ No newline at end of file | 60 | } |
diff --git a/src/ext/Bal/wixext/Symbols/WixBalBootstrapperApplicationSymbol.cs b/src/ext/Bal/wixext/Symbols/WixBalBootstrapperApplicationSymbol.cs index 7096930d..47e930c2 100644 --- a/src/ext/Bal/wixext/Symbols/WixBalBootstrapperApplicationSymbol.cs +++ b/src/ext/Bal/wixext/Symbols/WixBalBootstrapperApplicationSymbol.cs | |||
@@ -19,15 +19,19 @@ namespace WixToolset.Bal | |||
19 | 19 | ||
20 | namespace WixToolset.Bal.Symbols | 20 | namespace WixToolset.Bal.Symbols |
21 | { | 21 | { |
22 | using System; | ||
22 | using WixToolset.Data; | 23 | using WixToolset.Data; |
23 | 24 | ||
24 | public enum WixBalBootstrapperApplicationType | 25 | public enum WixBalBootstrapperApplicationType |
25 | { | 26 | { |
26 | Unknown, | 27 | Unknown, |
27 | Standard, | 28 | Standard, |
29 | [Obsolete] | ||
28 | ManagedHost, | 30 | ManagedHost, |
31 | [Obsolete] | ||
29 | DotNetCoreHost, | 32 | DotNetCoreHost, |
30 | InternalUi, | 33 | InternalUi, |
34 | Prerequisite, | ||
31 | } | 35 | } |
32 | 36 | ||
33 | public enum WixBalBootstrapperApplicationSymbolFields | 37 | public enum WixBalBootstrapperApplicationSymbolFields |
diff --git a/src/ext/Bal/wixext/Symbols/WixDncOptionsSymbol.cs b/src/ext/Bal/wixext/Symbols/WixDncOptionsSymbol.cs deleted file mode 100644 index b9a41c21..00000000 --- a/src/ext/Bal/wixext/Symbols/WixDncOptionsSymbol.cs +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
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.Symbols; | ||
7 | |||
8 | public static partial class BalSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixDncOptions = new IntermediateSymbolDefinition( | ||
11 | BalSymbolDefinitionType.WixDncOptions.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixDncOptionsSymbolFields.SelfContainedDeployment), IntermediateFieldType.Number), | ||
15 | }, | ||
16 | typeof(WixDncOptionsSymbol)); | ||
17 | } | ||
18 | } | ||
19 | |||
20 | namespace WixToolset.Bal.Symbols | ||
21 | { | ||
22 | using WixToolset.Data; | ||
23 | |||
24 | public enum WixDncOptionsSymbolFields | ||
25 | { | ||
26 | SelfContainedDeployment, | ||
27 | } | ||
28 | |||
29 | public class WixDncOptionsSymbol : IntermediateSymbol | ||
30 | { | ||
31 | public WixDncOptionsSymbol() : base(BalSymbolDefinitions.WixDncOptions, null, null) | ||
32 | { | ||
33 | } | ||
34 | |||
35 | public WixDncOptionsSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalSymbolDefinitions.WixDncOptions, sourceLineNumber, id) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public IntermediateField this[WixDncOptionsSymbolFields index] => this.Fields[(int)index]; | ||
40 | |||
41 | public int SelfContainedDeployment | ||
42 | { | ||
43 | get => this.Fields[(int)WixDncOptionsSymbolFields.SelfContainedDeployment].AsNumber(); | ||
44 | set => this.Set((int)WixDncOptionsSymbolFields.SelfContainedDeployment, value); | ||
45 | } | ||
46 | } | ||
47 | } \ No newline at end of file | ||
diff --git a/src/ext/Bal/wixext/Symbols/WixMbaPrereqInformationSymbol.cs b/src/ext/Bal/wixext/Symbols/WixMbaPrereqInformationSymbol.cs deleted file mode 100644 index e4d78da0..00000000 --- a/src/ext/Bal/wixext/Symbols/WixMbaPrereqInformationSymbol.cs +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
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.Symbols; | ||
7 | |||
8 | public static partial class BalSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixMbaPrereqInformation = new IntermediateSymbolDefinition( | ||
11 | BalSymbolDefinitionType.WixMbaPrereqInformation.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixMbaPrereqInformationSymbolFields.PackageId), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixMbaPrereqInformationSymbolFields.LicenseFile), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixMbaPrereqInformationSymbolFields.LicenseUrl), IntermediateFieldType.String), | ||
17 | }, | ||
18 | typeof(WixMbaPrereqInformationSymbol)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Bal.Symbols | ||
23 | { | ||
24 | using WixToolset.Data; | ||
25 | |||
26 | public enum WixMbaPrereqInformationSymbolFields | ||
27 | { | ||
28 | PackageId, | ||
29 | LicenseFile, | ||
30 | LicenseUrl, | ||
31 | } | ||
32 | |||
33 | public class WixMbaPrereqInformationSymbol : IntermediateSymbol | ||
34 | { | ||
35 | public WixMbaPrereqInformationSymbol() : base(BalSymbolDefinitions.WixMbaPrereqInformation, null, null) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public WixMbaPrereqInformationSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalSymbolDefinitions.WixMbaPrereqInformation, sourceLineNumber, id) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | public IntermediateField this[WixMbaPrereqInformationSymbolFields index] => this.Fields[(int)index]; | ||
44 | |||
45 | public string PackageId | ||
46 | { | ||
47 | get => this.Fields[(int)WixMbaPrereqInformationSymbolFields.PackageId].AsString(); | ||
48 | set => this.Set((int)WixMbaPrereqInformationSymbolFields.PackageId, value); | ||
49 | } | ||
50 | |||
51 | public string LicenseFile | ||
52 | { | ||
53 | get => this.Fields[(int)WixMbaPrereqInformationSymbolFields.LicenseFile].AsString(); | ||
54 | set => this.Set((int)WixMbaPrereqInformationSymbolFields.LicenseFile, value); | ||
55 | } | ||
56 | |||
57 | public string LicenseUrl | ||
58 | { | ||
59 | get => this.Fields[(int)WixMbaPrereqInformationSymbolFields.LicenseUrl].AsString(); | ||
60 | set => this.Set((int)WixMbaPrereqInformationSymbolFields.LicenseUrl, value); | ||
61 | } | ||
62 | } | ||
63 | } \ No newline at end of file | ||
diff --git a/src/ext/Bal/wixext/Symbols/WixMbaPrereqOptionsSymbol.cs b/src/ext/Bal/wixext/Symbols/WixMbaPrereqOptionsSymbol.cs deleted file mode 100644 index 66374579..00000000 --- a/src/ext/Bal/wixext/Symbols/WixMbaPrereqOptionsSymbol.cs +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
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.Symbols; | ||
7 | |||
8 | public static partial class BalSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixMbaPrereqOptions = new IntermediateSymbolDefinition( | ||
11 | BalSymbolDefinitionType.WixMbaPrereqOptions.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixMbaPrereqOptionsSymbolFields.AlwaysInstallPrereqs), IntermediateFieldType.Number), | ||
15 | }, | ||
16 | typeof(WixMbaPrereqOptionsSymbol)); | ||
17 | } | ||
18 | } | ||
19 | |||
20 | namespace WixToolset.Bal.Symbols | ||
21 | { | ||
22 | using WixToolset.Data; | ||
23 | |||
24 | public enum WixMbaPrereqOptionsSymbolFields | ||
25 | { | ||
26 | AlwaysInstallPrereqs, | ||
27 | } | ||
28 | |||
29 | public class WixMbaPrereqOptionsSymbol : IntermediateSymbol | ||
30 | { | ||
31 | public WixMbaPrereqOptionsSymbol() : base(BalSymbolDefinitions.WixMbaPrereqOptions, null, null) | ||
32 | { | ||
33 | } | ||
34 | |||
35 | public WixMbaPrereqOptionsSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalSymbolDefinitions.WixMbaPrereqOptions, sourceLineNumber, id) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public IntermediateField this[WixMbaPrereqOptionsSymbolFields index] => this.Fields[(int)index]; | ||
40 | |||
41 | public int AlwaysInstallPrereqs | ||
42 | { | ||
43 | get => this.Fields[(int)WixMbaPrereqOptionsSymbolFields.AlwaysInstallPrereqs].AsNumber(); | ||
44 | set => this.Set((int)WixMbaPrereqOptionsSymbolFields.AlwaysInstallPrereqs, value); | ||
45 | } | ||
46 | } | ||
47 | } | ||
diff --git a/src/ext/Bal/wixext/Symbols/WixPrereqInformationSymbol.cs b/src/ext/Bal/wixext/Symbols/WixPrereqInformationSymbol.cs new file mode 100644 index 00000000..4b5e301e --- /dev/null +++ b/src/ext/Bal/wixext/Symbols/WixPrereqInformationSymbol.cs | |||
@@ -0,0 +1,63 @@ | |||
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.Symbols; | ||
7 | |||
8 | public static partial class BalSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixPrereqInformation = new IntermediateSymbolDefinition( | ||
11 | BalSymbolDefinitionType.WixPrereqInformation.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixPrereqInformationSymbolFields.PackageId), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixPrereqInformationSymbolFields.LicenseFile), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixPrereqInformationSymbolFields.LicenseUrl), IntermediateFieldType.String), | ||
17 | }, | ||
18 | typeof(WixPrereqInformationSymbol)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Bal.Symbols | ||
23 | { | ||
24 | using WixToolset.Data; | ||
25 | |||
26 | public enum WixPrereqInformationSymbolFields | ||
27 | { | ||
28 | PackageId, | ||
29 | LicenseFile, | ||
30 | LicenseUrl, | ||
31 | } | ||
32 | |||
33 | public class WixPrereqInformationSymbol : IntermediateSymbol | ||
34 | { | ||
35 | public WixPrereqInformationSymbol() : base(BalSymbolDefinitions.WixPrereqInformation, null, null) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public WixPrereqInformationSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalSymbolDefinitions.WixPrereqInformation, sourceLineNumber, id) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | public IntermediateField this[WixPrereqInformationSymbolFields index] => this.Fields[(int)index]; | ||
44 | |||
45 | public string PackageId | ||
46 | { | ||
47 | get => this.Fields[(int)WixPrereqInformationSymbolFields.PackageId].AsString(); | ||
48 | set => this.Set((int)WixPrereqInformationSymbolFields.PackageId, value); | ||
49 | } | ||
50 | |||
51 | public string LicenseFile | ||
52 | { | ||
53 | get => this.Fields[(int)WixPrereqInformationSymbolFields.LicenseFile].AsString(); | ||
54 | set => this.Set((int)WixPrereqInformationSymbolFields.LicenseFile, value); | ||
55 | } | ||
56 | |||
57 | public string LicenseUrl | ||
58 | { | ||
59 | get => this.Fields[(int)WixPrereqInformationSymbolFields.LicenseUrl].AsString(); | ||
60 | set => this.Set((int)WixPrereqInformationSymbolFields.LicenseUrl, value); | ||
61 | } | ||
62 | } | ||
63 | } | ||
diff --git a/src/ext/Bal/wixext/Symbols/WixPrereqOptionsSymbol.cs b/src/ext/Bal/wixext/Symbols/WixPrereqOptionsSymbol.cs new file mode 100644 index 00000000..a351d7da --- /dev/null +++ b/src/ext/Bal/wixext/Symbols/WixPrereqOptionsSymbol.cs | |||
@@ -0,0 +1,63 @@ | |||
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.Symbols; | ||
7 | |||
8 | public static partial class BalSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixPrereqOptions = new IntermediateSymbolDefinition( | ||
11 | BalSymbolDefinitionType.WixPrereqOptions.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixPrereqOptionsSymbolFields.Primary), IntermediateFieldType.Number), | ||
15 | new IntermediateFieldDefinition(nameof(WixPrereqOptionsSymbolFields.HandleHelp), IntermediateFieldType.Number), | ||
16 | new IntermediateFieldDefinition(nameof(WixPrereqOptionsSymbolFields.HandleLayout), IntermediateFieldType.Number), | ||
17 | }, | ||
18 | typeof(WixPrereqOptionsSymbol)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Bal.Symbols | ||
23 | { | ||
24 | using WixToolset.Data; | ||
25 | |||
26 | public enum WixPrereqOptionsSymbolFields | ||
27 | { | ||
28 | Primary, | ||
29 | HandleHelp, | ||
30 | HandleLayout, | ||
31 | } | ||
32 | |||
33 | public class WixPrereqOptionsSymbol : IntermediateSymbol | ||
34 | { | ||
35 | public WixPrereqOptionsSymbol() : base(BalSymbolDefinitions.WixPrereqOptions, null, null) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public WixPrereqOptionsSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalSymbolDefinitions.WixPrereqOptions, sourceLineNumber, id) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | public IntermediateField this[WixPrereqOptionsSymbolFields index] => this.Fields[(int)index]; | ||
44 | |||
45 | public int Primary | ||
46 | { | ||
47 | get => this.Fields[(int)WixPrereqOptionsSymbolFields.Primary].AsNumber(); | ||
48 | set => this.Set((int)WixPrereqOptionsSymbolFields.Primary, value); | ||
49 | } | ||
50 | |||
51 | public int? HandleHelp | ||
52 | { | ||
53 | get => (int?)this.Fields[(int)WixPrereqOptionsSymbolFields.HandleHelp]; | ||
54 | set => this.Set((int)WixPrereqOptionsSymbolFields.HandleHelp, value); | ||
55 | } | ||
56 | |||
57 | public int? HandleLayout | ||
58 | { | ||
59 | get => (int?)this.Fields[(int)WixPrereqOptionsSymbolFields.HandleLayout]; | ||
60 | set => this.Set((int)WixPrereqOptionsSymbolFields.HandleLayout, value); | ||
61 | } | ||
62 | } | ||
63 | } | ||