@joebigelow / wix-1 / commits / 611bf9ec

Fix theme PayloadGroupRefs and BalBurnBackendExtension.

Sean Hall committed Dec 20, 2020 at 17:04 UTC 611bf9ec74426c972b6b271cb51d81e467d990cd
4 files changed +66 -35
src/test/WixToolsetTest.Bal/BalExtensionFixture.cs
+2
@@ -42,6 +42,8 @@ namespace WixToolsetTest.Bal
42 var balPackageInfos = extractResult.SelectBADataNodes("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo");
43 var balPackageInfo = (XmlNode)Assert.Single(balPackageInfos);
44 Assert.Equal("<WixBalPackageInfo PackageId='test.msi' DisplayInternalUICondition='1' />", balPackageInfo.GetTestXml());
45 +
46 + Assert.True(File.Exists(Path.Combine(baFolderPath, "thm.wxl")));
47 }
48 }
49
src/wixext/BalBurnBackendExtension.cs
+3 -3
@@ -34,7 +34,7 @@ namespace WixToolset.Bal
34 var intermediate = this.Context.IntermediateRepresentation;
35 var section = intermediate.Sections.Single();
36
37 - var baSymbol = section.Symbols.OfType<WixBootstrapperApplicationSymbol>().SingleOrDefault();
37 + var baSymbol = section.Symbols.OfType<WixBootstrapperApplicationDllSymbol>().SingleOrDefault();
38 var baId = baSymbol?.Id?.Id;
39 if (null == baId)
40 {
@@ -77,8 +77,8 @@ namespace WixToolset.Bal
77 {
78 foreach (var payloadPropertiesSymbol in payloadPropertiesSymbols)
79 {
80 - // TODO: Make core WiX canonicalize Name (this won't catch '.\bafunctions.dll').
81 - if (string.Equals(payloadPropertiesSymbol.Name, "bafunctions.dll", StringComparison.OrdinalIgnoreCase))
80 + if (string.Equals(payloadPropertiesSymbol.Name, "bafunctions.dll", StringComparison.OrdinalIgnoreCase) &&
81 + BurnConstants.BurnUXContainerName == payloadPropertiesSymbol.ContainerRef)
82 {
83 this.Messaging.Write(BalWarnings.UnmarkedBAFunctionsDLL(payloadPropertiesSymbol.SourceLineNumbers));
84 }
src/wixext/BalCompiler.cs
+13 -28
@@ -549,8 +549,6 @@ namespace WixToolset.Bal
549
550 if (!this.Messaging.EncounteredError)
551 {
552 - this.CreateBARef(section, sourceLineNumbers, node, "WixStandardBootstrapperApplication");
553 -
552 if (!String.IsNullOrEmpty(launchTarget))
553 {
554 section.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "LaunchTarget"))
@@ -674,30 +672,27 @@ namespace WixToolset.Bal
672 }
673 }
674
677 - string themePayloadGroup = null;
675 + var baId = "WixStandardBootstrapperApplication";
676 switch (theme)
677 {
678 case WixStandardBootstrapperApplicationTheme.HyperlinkLargeLicense:
681 - themePayloadGroup = "WixStdbaHyperlinkLargeLicensePayloads";
679 + baId = "WixStandardBootstrapperApplication.HyperlinkLargeLicense";
680 break;
681 case WixStandardBootstrapperApplicationTheme.HyperlinkLicense:
684 - themePayloadGroup = "WixStdbaHyperlinkLicensePayloads";
682 + baId = "WixStandardBootstrapperApplication.HyperlinkLicense";
683 break;
684 case WixStandardBootstrapperApplicationTheme.HyperlinkSidebarLicense:
687 - themePayloadGroup = "WixStdbaHyperlinkSidebarLicensePayloads";
685 + baId = "WixStandardBootstrapperApplication.HyperlinkSidebarLicense";
686 break;
687 case WixStandardBootstrapperApplicationTheme.RtfLargeLicense:
690 - themePayloadGroup = "WixStdbaRtfLargeLicensePayloads";
688 + baId = "WixStandardBootstrapperApplication.RtfLargeLicense";
689 break;
690 case WixStandardBootstrapperApplicationTheme.RtfLicense:
693 - themePayloadGroup = "WixStdbaRtfLicensePayloads";
691 + baId = "WixStandardBootstrapperApplication.RtfLicense";
692 break;
693 }
694
697 - if (themePayloadGroup != null)
698 - {
699 - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBundlePayloadGroup, themePayloadGroup);
700 - }
695 + this.CreateBARef(section, sourceLineNumbers, node, baId);
696 }
697 }
698
@@ -759,8 +754,6 @@ namespace WixToolset.Bal
754
755 if (!this.Messaging.EncounteredError)
756 {
762 - this.CreateBARef(section, sourceLineNumbers, node, "WixManagedBootstrapperApplicationHost");
763 -
757 if (!String.IsNullOrEmpty(logoFile))
758 {
759 section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "PreqbaLogo"))
@@ -785,18 +778,15 @@ namespace WixToolset.Bal
778 });
779 }
780
788 - string themePayloadGroup = null;
781 + var baId = "WixManagedBootstrapperApplicationHost";
782 switch (theme)
783 {
784 case WixManagedBootstrapperApplicationHostTheme.Standard:
792 - themePayloadGroup = "MbaPreqStandardPayloads";
785 + baId = "WixManagedBootstrapperApplicationHost.Standard";
786 break;
787 }
788
796 - if (themePayloadGroup != null)
797 - {
798 - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBundlePayloadGroup, themePayloadGroup);
799 - }
789 + this.CreateBARef(section, sourceLineNumbers, node, baId);
790 }
791 }
792
@@ -867,8 +857,6 @@ namespace WixToolset.Bal
857
858 if (!this.Messaging.EncounteredError)
859 {
870 - this.CreateBARef(section, sourceLineNumbers, node, "WixDotNetCoreBootstrapperApplicationHost");
871 -
860 if (!String.IsNullOrEmpty(logoFile))
861 {
862 section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "DncPreqbaLogo"))
@@ -901,18 +889,15 @@ namespace WixToolset.Bal
889 });
890 }
891
904 - string themePayloadGroup = null;
892 + var baId = "WixDotNetCoreBootstrapperApplicationHost";
893 switch (theme)
894 {
895 case WixDotNetCoreBootstrapperApplicationHostTheme.Standard:
908 - themePayloadGroup = "DncPreqStandardPayloads";
896 + baId = "WixDotNetCoreBootstrapperApplicationHost.Standard";
897 break;
898 }
899
912 - if (themePayloadGroup != null)
913 - {
914 - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBundlePayloadGroup, themePayloadGroup);
915 - }
900 + this.CreateBARef(section, sourceLineNumbers, node, baId);
901 }
902 }
903
src/wixlib/BalExtension_platform.wxi
+48 -4
@@ -1,25 +1,69 @@
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
3
4 <Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
5 <?include caDecor.wxi ?>
6 <Fragment>
7 <BootstrapperApplication Id="WixDotNetCoreBootstrapperApplicationHost$(var.Suffix)">
8 - <BootstrapperApplicationDll SourceFile="!(bindpath.$(var.platform))\dnchost.dll" />
8 + <BootstrapperApplicationDll Id="WixDotNetCoreBootstrapperApplicationHost" SourceFile="!(bindpath.$(var.platform))\dnchost.dll" />
9 <Payload SourceFile="!(bindpath.$(var.platform))\wixstdba.dll" Name="dncpreq.dll" />
10 <PayloadGroupRef Id="WixDotNetCoreBootstrapperApplicationHostManagedPayloads" />
11 </BootstrapperApplication>
12 </Fragment>
13 + <Fragment>
14 + <BootstrapperApplication Id="WixDotNetCoreBootstrapperApplicationHost.Standard$(var.Suffix)">
15 + <PayloadGroupRef Id="DncPreqStandardPayloads" />
16 + </BootstrapperApplication>
17 + <BootstrapperApplicationRef Id="WixDotNetCoreBootstrapperApplicationHost$(var.Suffix)" />
18 + </Fragment>
19 +
20 <Fragment>
21 <BootstrapperApplication Id="WixManagedBootstrapperApplicationHost$(var.Suffix)">
15 - <BootstrapperApplicationDll SourceFile="!(bindpath.$(var.platform))\mbahost.dll" />
22 + <BootstrapperApplicationDll Id="WixManagedBootstrapperApplicationHost" SourceFile="!(bindpath.$(var.platform))\mbahost.dll" />
23 <Payload SourceFile="!(bindpath.$(var.platform))\wixstdba.dll" Name="mbapreq.dll" />
24 <PayloadGroupRef Id="WixManagedBootstrapperApplicationHostManagedPayloads" />
25 </BootstrapperApplication>
26 </Fragment>
27 + <Fragment>
28 + <BootstrapperApplication Id="WixManagedBootstrapperApplicationHost.Standard$(var.Suffix)">
29 + <PayloadGroupRef Id="MbaPreqStandardPayloads" />
30 + </BootstrapperApplication>
31 + <BootstrapperApplicationRef Id="WixManagedBootstrapperApplicationHost$(var.Suffix)" />
32 + </Fragment>
33 +
34 <Fragment>
35 <BootstrapperApplication Id="WixStandardBootstrapperApplication$(var.Suffix)">
22 - <BootstrapperApplicationDll SourceFile="!(bindpath.$(var.platform))\wixstdba.dll" />
36 + <BootstrapperApplicationDll Id="WixStandardBootstrapperApplication" SourceFile="!(bindpath.$(var.platform))\wixstdba.dll" />
37 + </BootstrapperApplication>
38 + </Fragment>
39 + <Fragment>
40 + <BootstrapperApplication Id="WixStandardBootstrapperApplication.RtfLicense$(var.Suffix)">
41 + <PayloadGroupRef Id="WixStdbaRtfLicensePayloads" />
42 + </BootstrapperApplication>
43 + <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication$(var.Suffix)" />
44 + </Fragment>
45 + <Fragment>
46 + <BootstrapperApplication Id="WixStandardBootstrapperApplication.RtfLargeLicense$(var.Suffix)">
47 + <PayloadGroupRef Id="WixStdbaRtfLargeLicensePayloads" />
48 + </BootstrapperApplication>
49 + <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication$(var.Suffix)" />
50 + </Fragment>
51 + <Fragment>
52 + <BootstrapperApplication Id="WixStandardBootstrapperApplication.HyperlinkLicense$(var.Suffix)">
53 + <PayloadGroupRef Id="WixStdbaHyperlinkLicensePayloads" />
54 + </BootstrapperApplication>
55 + <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication$(var.Suffix)" />
56 + </Fragment>
57 + <Fragment>
58 + <BootstrapperApplication Id="WixStandardBootstrapperApplication.HyperlinkLargeLicense$(var.Suffix)">
59 + <PayloadGroupRef Id="WixStdbaHyperlinkLargeLicensePayloads" />
60 + </BootstrapperApplication>
61 + <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication$(var.Suffix)" />
62 + </Fragment>
63 + <Fragment>
64 + <BootstrapperApplication Id="WixStandardBootstrapperApplication.HyperlinkSidebarLicense$(var.Suffix)">
65 + <PayloadGroupRef Id="WixStdbaHyperlinkSidebarLicensePayloads" />
66 </BootstrapperApplication>
67 + <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication$(var.Suffix)" />
68 </Fragment>
69 </Include>