aboutsummaryrefslogtreecommitdiff
path: root/src/wixext/BalCompiler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/wixext/BalCompiler.cs')
-rw-r--r--src/wixext/BalCompiler.cs86
1 files changed, 85 insertions, 1 deletions
diff --git a/src/wixext/BalCompiler.cs b/src/wixext/BalCompiler.cs
index 33400f3b..dfe29bde 100644
--- a/src/wixext/BalCompiler.cs
+++ b/src/wixext/BalCompiler.cs
@@ -63,6 +63,9 @@ namespace WixToolset.Bal
63 case "WixManagedBootstrapperApplicationHost": 63 case "WixManagedBootstrapperApplicationHost":
64 this.ParseWixManagedBootstrapperApplicationHostElement(intermediate, section, element); 64 this.ParseWixManagedBootstrapperApplicationHostElement(intermediate, section, element);
65 break; 65 break;
66 case "WixDotNetCoreBootstrapperApplication":
67 this.ParseWixDotNetCoreBootstrapperApplicationElement(intermediate, section, element);
68 break;
66 default: 69 default:
67 this.ParseHelper.UnexpectedElement(parentElement, element); 70 this.ParseHelper.UnexpectedElement(parentElement, element);
68 break; 71 break;
@@ -200,7 +203,9 @@ namespace WixToolset.Bal
200 case "BAFactoryAssembly": 203 case "BAFactoryAssembly":
201 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute)) 204 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute))
202 { 205 {
203 section.AddTuple(new WixBalBAFactoryAssemblyTuple(sourceLineNumbers) 206 // There can only be one.
207 var id = new Identifier(AccessModifier.Public, "TheBAFactoryAssembly");
208 section.AddTuple(new WixBalBAFactoryAssemblyTuple(sourceLineNumbers, id)
204 { 209 {
205 PayloadId = payloadId, 210 PayloadId = payloadId,
206 }); 211 });
@@ -655,5 +660,84 @@ namespace WixToolset.Bal
655 } 660 }
656 } 661 }
657 } 662 }
663
664 /// <summary>
665 /// Parses a WixDotNetCoreBootstrapperApplication element for Bundles.
666 /// </summary>
667 /// <param name="node">The element to parse.</param>
668 private void ParseWixDotNetCoreBootstrapperApplicationElement(Intermediate intermediate, IntermediateSection section, XElement node)
669 {
670 var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
671 string logoFile = null;
672 string themeFile = null;
673 string localizationFile = null;
674 var selfContainedDeployment = YesNoType.NotSet;
675
676 foreach (var attrib in node.Attributes())
677 {
678 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
679 {
680 switch (attrib.Name.LocalName)
681 {
682 case "LogoFile":
683 logoFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
684 break;
685 case "ThemeFile":
686 themeFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
687 break;
688 case "LocalizationFile":
689 localizationFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
690 break;
691 case "SelfContainedDeployment":
692 selfContainedDeployment = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
693 break;
694 default:
695 this.ParseHelper.UnexpectedAttribute(node, attrib);
696 break;
697 }
698 }
699 else
700 {
701 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib);
702 }
703 }
704
705 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node);
706
707 if (!this.Messaging.EncounteredError)
708 {
709 if (!String.IsNullOrEmpty(logoFile))
710 {
711 section.AddTuple(new WixVariableTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, "DncPreqbaLogo"))
712 {
713 Value = logoFile,
714 });
715 }
716
717 if (!String.IsNullOrEmpty(themeFile))
718 {
719 section.AddTuple(new WixVariableTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, "DncPreqbaThemeXml"))
720 {
721 Value = themeFile,
722 });
723 }
724
725 if (!String.IsNullOrEmpty(localizationFile))
726 {
727 section.AddTuple(new WixVariableTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, "DncPreqbaThemeWxl"))
728 {
729 Value = localizationFile,
730 });
731 }
732
733 if (YesNoType.Yes == selfContainedDeployment)
734 {
735 section.AddTuple(new WixDncOptionsTuple(sourceLineNumbers)
736 {
737 SelfContainedDeployment = 1,
738 });
739 }
740 }
741 }
658 } 742 }
659} 743}