diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-12-20 17:04:26 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-12-20 17:12:19 -0600 |
commit | 611bf9ec74426c972b6b271cb51d81e467d990cd (patch) | |
tree | 5ae8ba1420bf376814dbfdddceaf32ab73416b82 /src | |
parent | 976534ee824bf2a5cbc86764d1edf595ac30087b (diff) | |
download | wix-611bf9ec74426c972b6b271cb51d81e467d990cd.tar.gz wix-611bf9ec74426c972b6b271cb51d81e467d990cd.tar.bz2 wix-611bf9ec74426c972b6b271cb51d81e467d990cd.zip |
Fix theme PayloadGroupRefs and BalBurnBackendExtension.
Diffstat (limited to 'src')
-rw-r--r-- | src/test/WixToolsetTest.Bal/BalExtensionFixture.cs | 2 | ||||
-rw-r--r-- | src/wixext/BalBurnBackendExtension.cs | 6 | ||||
-rw-r--r-- | src/wixext/BalCompiler.cs | 41 | ||||
-rw-r--r-- | src/wixlib/BalExtension_platform.wxi | 52 |
4 files changed, 66 insertions, 35 deletions
diff --git a/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs b/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs index 277a941a..2ff57c55 100644 --- a/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs +++ b/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs | |||
@@ -42,6 +42,8 @@ namespace WixToolsetTest.Bal | |||
42 | var balPackageInfos = extractResult.SelectBADataNodes("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo"); | 42 | var balPackageInfos = extractResult.SelectBADataNodes("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo"); |
43 | var balPackageInfo = (XmlNode)Assert.Single(balPackageInfos); | 43 | var balPackageInfo = (XmlNode)Assert.Single(balPackageInfos); |
44 | Assert.Equal("<WixBalPackageInfo PackageId='test.msi' DisplayInternalUICondition='1' />", balPackageInfo.GetTestXml()); | 44 | Assert.Equal("<WixBalPackageInfo PackageId='test.msi' DisplayInternalUICondition='1' />", balPackageInfo.GetTestXml()); |
45 | |||
46 | Assert.True(File.Exists(Path.Combine(baFolderPath, "thm.wxl"))); | ||
45 | } | 47 | } |
46 | } | 48 | } |
47 | 49 | ||
diff --git a/src/wixext/BalBurnBackendExtension.cs b/src/wixext/BalBurnBackendExtension.cs index 7e481ee9..bf96e388 100644 --- a/src/wixext/BalBurnBackendExtension.cs +++ b/src/wixext/BalBurnBackendExtension.cs | |||
@@ -34,7 +34,7 @@ namespace WixToolset.Bal | |||
34 | var intermediate = this.Context.IntermediateRepresentation; | 34 | var intermediate = this.Context.IntermediateRepresentation; |
35 | var section = intermediate.Sections.Single(); | 35 | var section = intermediate.Sections.Single(); |
36 | 36 | ||
37 | var baSymbol = section.Symbols.OfType<WixBootstrapperApplicationSymbol>().SingleOrDefault(); | 37 | var baSymbol = section.Symbols.OfType<WixBootstrapperApplicationDllSymbol>().SingleOrDefault(); |
38 | var baId = baSymbol?.Id?.Id; | 38 | var baId = baSymbol?.Id?.Id; |
39 | if (null == baId) | 39 | if (null == baId) |
40 | { | 40 | { |
@@ -77,8 +77,8 @@ namespace WixToolset.Bal | |||
77 | { | 77 | { |
78 | foreach (var payloadPropertiesSymbol in payloadPropertiesSymbols) | 78 | foreach (var payloadPropertiesSymbol in payloadPropertiesSymbols) |
79 | { | 79 | { |
80 | // TODO: Make core WiX canonicalize Name (this won't catch '.\bafunctions.dll'). | 80 | if (string.Equals(payloadPropertiesSymbol.Name, "bafunctions.dll", StringComparison.OrdinalIgnoreCase) && |
81 | if (string.Equals(payloadPropertiesSymbol.Name, "bafunctions.dll", StringComparison.OrdinalIgnoreCase)) | 81 | BurnConstants.BurnUXContainerName == payloadPropertiesSymbol.ContainerRef) |
82 | { | 82 | { |
83 | this.Messaging.Write(BalWarnings.UnmarkedBAFunctionsDLL(payloadPropertiesSymbol.SourceLineNumbers)); | 83 | this.Messaging.Write(BalWarnings.UnmarkedBAFunctionsDLL(payloadPropertiesSymbol.SourceLineNumbers)); |
84 | } | 84 | } |
diff --git a/src/wixext/BalCompiler.cs b/src/wixext/BalCompiler.cs index c01905cc..eab374ce 100644 --- a/src/wixext/BalCompiler.cs +++ b/src/wixext/BalCompiler.cs | |||
@@ -549,8 +549,6 @@ namespace WixToolset.Bal | |||
549 | 549 | ||
550 | if (!this.Messaging.EncounteredError) | 550 | if (!this.Messaging.EncounteredError) |
551 | { | 551 | { |
552 | this.CreateBARef(section, sourceLineNumbers, node, "WixStandardBootstrapperApplication"); | ||
553 | |||
554 | if (!String.IsNullOrEmpty(launchTarget)) | 552 | if (!String.IsNullOrEmpty(launchTarget)) |
555 | { | 553 | { |
556 | section.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "LaunchTarget")) | 554 | section.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "LaunchTarget")) |
@@ -674,30 +672,27 @@ namespace WixToolset.Bal | |||
674 | } | 672 | } |
675 | } | 673 | } |
676 | 674 | ||
677 | string themePayloadGroup = null; | 675 | var baId = "WixStandardBootstrapperApplication"; |
678 | switch (theme) | 676 | switch (theme) |
679 | { | 677 | { |
680 | case WixStandardBootstrapperApplicationTheme.HyperlinkLargeLicense: | 678 | case WixStandardBootstrapperApplicationTheme.HyperlinkLargeLicense: |
681 | themePayloadGroup = "WixStdbaHyperlinkLargeLicensePayloads"; | 679 | baId = "WixStandardBootstrapperApplication.HyperlinkLargeLicense"; |
682 | break; | 680 | break; |
683 | case WixStandardBootstrapperApplicationTheme.HyperlinkLicense: | 681 | case WixStandardBootstrapperApplicationTheme.HyperlinkLicense: |
684 | themePayloadGroup = "WixStdbaHyperlinkLicensePayloads"; | 682 | baId = "WixStandardBootstrapperApplication.HyperlinkLicense"; |
685 | break; | 683 | break; |
686 | case WixStandardBootstrapperApplicationTheme.HyperlinkSidebarLicense: | 684 | case WixStandardBootstrapperApplicationTheme.HyperlinkSidebarLicense: |
687 | themePayloadGroup = "WixStdbaHyperlinkSidebarLicensePayloads"; | 685 | baId = "WixStandardBootstrapperApplication.HyperlinkSidebarLicense"; |
688 | break; | 686 | break; |
689 | case WixStandardBootstrapperApplicationTheme.RtfLargeLicense: | 687 | case WixStandardBootstrapperApplicationTheme.RtfLargeLicense: |
690 | themePayloadGroup = "WixStdbaRtfLargeLicensePayloads"; | 688 | baId = "WixStandardBootstrapperApplication.RtfLargeLicense"; |
691 | break; | 689 | break; |
692 | case WixStandardBootstrapperApplicationTheme.RtfLicense: | 690 | case WixStandardBootstrapperApplicationTheme.RtfLicense: |
693 | themePayloadGroup = "WixStdbaRtfLicensePayloads"; | 691 | baId = "WixStandardBootstrapperApplication.RtfLicense"; |
694 | break; | 692 | break; |
695 | } | 693 | } |
696 | 694 | ||
697 | if (themePayloadGroup != null) | 695 | this.CreateBARef(section, sourceLineNumbers, node, baId); |
698 | { | ||
699 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBundlePayloadGroup, themePayloadGroup); | ||
700 | } | ||
701 | } | 696 | } |
702 | } | 697 | } |
703 | 698 | ||
@@ -759,8 +754,6 @@ namespace WixToolset.Bal | |||
759 | 754 | ||
760 | if (!this.Messaging.EncounteredError) | 755 | if (!this.Messaging.EncounteredError) |
761 | { | 756 | { |
762 | this.CreateBARef(section, sourceLineNumbers, node, "WixManagedBootstrapperApplicationHost"); | ||
763 | |||
764 | if (!String.IsNullOrEmpty(logoFile)) | 757 | if (!String.IsNullOrEmpty(logoFile)) |
765 | { | 758 | { |
766 | section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "PreqbaLogo")) | 759 | section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "PreqbaLogo")) |
@@ -785,18 +778,15 @@ namespace WixToolset.Bal | |||
785 | }); | 778 | }); |
786 | } | 779 | } |
787 | 780 | ||
788 | string themePayloadGroup = null; | 781 | var baId = "WixManagedBootstrapperApplicationHost"; |
789 | switch (theme) | 782 | switch (theme) |
790 | { | 783 | { |
791 | case WixManagedBootstrapperApplicationHostTheme.Standard: | 784 | case WixManagedBootstrapperApplicationHostTheme.Standard: |
792 | themePayloadGroup = "MbaPreqStandardPayloads"; | 785 | baId = "WixManagedBootstrapperApplicationHost.Standard"; |
793 | break; | 786 | break; |
794 | } | 787 | } |
795 | 788 | ||
796 | if (themePayloadGroup != null) | 789 | this.CreateBARef(section, sourceLineNumbers, node, baId); |
797 | { | ||
798 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBundlePayloadGroup, themePayloadGroup); | ||
799 | } | ||
800 | } | 790 | } |
801 | } | 791 | } |
802 | 792 | ||
@@ -867,8 +857,6 @@ namespace WixToolset.Bal | |||
867 | 857 | ||
868 | if (!this.Messaging.EncounteredError) | 858 | if (!this.Messaging.EncounteredError) |
869 | { | 859 | { |
870 | this.CreateBARef(section, sourceLineNumbers, node, "WixDotNetCoreBootstrapperApplicationHost"); | ||
871 | |||
872 | if (!String.IsNullOrEmpty(logoFile)) | 860 | if (!String.IsNullOrEmpty(logoFile)) |
873 | { | 861 | { |
874 | section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "DncPreqbaLogo")) | 862 | section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "DncPreqbaLogo")) |
@@ -901,18 +889,15 @@ namespace WixToolset.Bal | |||
901 | }); | 889 | }); |
902 | } | 890 | } |
903 | 891 | ||
904 | string themePayloadGroup = null; | 892 | var baId = "WixDotNetCoreBootstrapperApplicationHost"; |
905 | switch (theme) | 893 | switch (theme) |
906 | { | 894 | { |
907 | case WixDotNetCoreBootstrapperApplicationHostTheme.Standard: | 895 | case WixDotNetCoreBootstrapperApplicationHostTheme.Standard: |
908 | themePayloadGroup = "DncPreqStandardPayloads"; | 896 | baId = "WixDotNetCoreBootstrapperApplicationHost.Standard"; |
909 | break; | 897 | break; |
910 | } | 898 | } |
911 | 899 | ||
912 | if (themePayloadGroup != null) | 900 | this.CreateBARef(section, sourceLineNumbers, node, baId); |
913 | { | ||
914 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBundlePayloadGroup, themePayloadGroup); | ||
915 | } | ||
916 | } | 901 | } |
917 | } | 902 | } |
918 | 903 | ||
diff --git a/src/wixlib/BalExtension_platform.wxi b/src/wixlib/BalExtension_platform.wxi index fa7d1182..33122fb2 100644 --- a/src/wixlib/BalExtension_platform.wxi +++ b/src/wixlib/BalExtension_platform.wxi | |||
@@ -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 | 2 | ||
3 | 3 | ||
4 | <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> | 4 | <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> |
5 | <?include caDecor.wxi ?> | 5 | <?include caDecor.wxi ?> |
6 | <Fragment> | 6 | <Fragment> |
7 | <BootstrapperApplication Id="WixDotNetCoreBootstrapperApplicationHost$(var.Suffix)"> | 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" /> | 9 | <Payload SourceFile="!(bindpath.$(var.platform))\wixstdba.dll" Name="dncpreq.dll" /> |
10 | <PayloadGroupRef Id="WixDotNetCoreBootstrapperApplicationHostManagedPayloads" /> | 10 | <PayloadGroupRef Id="WixDotNetCoreBootstrapperApplicationHostManagedPayloads" /> |
11 | </BootstrapperApplication> | 11 | </BootstrapperApplication> |
12 | </Fragment> | 12 | </Fragment> |
13 | <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> | ||
14 | <BootstrapperApplication Id="WixManagedBootstrapperApplicationHost$(var.Suffix)"> | 21 | <BootstrapperApplication Id="WixManagedBootstrapperApplicationHost$(var.Suffix)"> |
15 | <BootstrapperApplicationDll SourceFile="!(bindpath.$(var.platform))\mbahost.dll" /> | 22 | <BootstrapperApplicationDll Id="WixManagedBootstrapperApplicationHost" SourceFile="!(bindpath.$(var.platform))\mbahost.dll" /> |
16 | <Payload SourceFile="!(bindpath.$(var.platform))\wixstdba.dll" Name="mbapreq.dll" /> | 23 | <Payload SourceFile="!(bindpath.$(var.platform))\wixstdba.dll" Name="mbapreq.dll" /> |
17 | <PayloadGroupRef Id="WixManagedBootstrapperApplicationHostManagedPayloads" /> | 24 | <PayloadGroupRef Id="WixManagedBootstrapperApplicationHostManagedPayloads" /> |
18 | </BootstrapperApplication> | 25 | </BootstrapperApplication> |
19 | </Fragment> | 26 | </Fragment> |
20 | <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> | ||
21 | <BootstrapperApplication Id="WixStandardBootstrapperApplication$(var.Suffix)"> | 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" /> | ||
23 | </BootstrapperApplication> | 66 | </BootstrapperApplication> |
67 | <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication$(var.Suffix)" /> | ||
24 | </Fragment> | 68 | </Fragment> |
25 | </Include> | 69 | </Include> |