From 611bf9ec74426c972b6b271cb51d81e467d990cd Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 20 Dec 2020 17:04:26 -0600 Subject: Fix theme PayloadGroupRefs and BalBurnBackendExtension. --- src/test/WixToolsetTest.Bal/BalExtensionFixture.cs | 2 + src/wixext/BalBurnBackendExtension.cs | 6 +-- src/wixext/BalCompiler.cs | 41 ++++++----------- src/wixlib/BalExtension_platform.wxi | 52 ++++++++++++++++++++-- 4 files changed, 66 insertions(+), 35 deletions(-) (limited to 'src') 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 var balPackageInfos = extractResult.SelectBADataNodes("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo"); var balPackageInfo = (XmlNode)Assert.Single(balPackageInfos); Assert.Equal("", balPackageInfo.GetTestXml()); + + Assert.True(File.Exists(Path.Combine(baFolderPath, "thm.wxl"))); } } 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 var intermediate = this.Context.IntermediateRepresentation; var section = intermediate.Sections.Single(); - var baSymbol = section.Symbols.OfType().SingleOrDefault(); + var baSymbol = section.Symbols.OfType().SingleOrDefault(); var baId = baSymbol?.Id?.Id; if (null == baId) { @@ -77,8 +77,8 @@ namespace WixToolset.Bal { foreach (var payloadPropertiesSymbol in payloadPropertiesSymbols) { - // TODO: Make core WiX canonicalize Name (this won't catch '.\bafunctions.dll'). - if (string.Equals(payloadPropertiesSymbol.Name, "bafunctions.dll", StringComparison.OrdinalIgnoreCase)) + if (string.Equals(payloadPropertiesSymbol.Name, "bafunctions.dll", StringComparison.OrdinalIgnoreCase) && + BurnConstants.BurnUXContainerName == payloadPropertiesSymbol.ContainerRef) { this.Messaging.Write(BalWarnings.UnmarkedBAFunctionsDLL(payloadPropertiesSymbol.SourceLineNumbers)); } 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 if (!this.Messaging.EncounteredError) { - this.CreateBARef(section, sourceLineNumbers, node, "WixStandardBootstrapperApplication"); - if (!String.IsNullOrEmpty(launchTarget)) { section.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "LaunchTarget")) @@ -674,30 +672,27 @@ namespace WixToolset.Bal } } - string themePayloadGroup = null; + var baId = "WixStandardBootstrapperApplication"; switch (theme) { case WixStandardBootstrapperApplicationTheme.HyperlinkLargeLicense: - themePayloadGroup = "WixStdbaHyperlinkLargeLicensePayloads"; + baId = "WixStandardBootstrapperApplication.HyperlinkLargeLicense"; break; case WixStandardBootstrapperApplicationTheme.HyperlinkLicense: - themePayloadGroup = "WixStdbaHyperlinkLicensePayloads"; + baId = "WixStandardBootstrapperApplication.HyperlinkLicense"; break; case WixStandardBootstrapperApplicationTheme.HyperlinkSidebarLicense: - themePayloadGroup = "WixStdbaHyperlinkSidebarLicensePayloads"; + baId = "WixStandardBootstrapperApplication.HyperlinkSidebarLicense"; break; case WixStandardBootstrapperApplicationTheme.RtfLargeLicense: - themePayloadGroup = "WixStdbaRtfLargeLicensePayloads"; + baId = "WixStandardBootstrapperApplication.RtfLargeLicense"; break; case WixStandardBootstrapperApplicationTheme.RtfLicense: - themePayloadGroup = "WixStdbaRtfLicensePayloads"; + baId = "WixStandardBootstrapperApplication.RtfLicense"; break; } - if (themePayloadGroup != null) - { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBundlePayloadGroup, themePayloadGroup); - } + this.CreateBARef(section, sourceLineNumbers, node, baId); } } @@ -759,8 +754,6 @@ namespace WixToolset.Bal if (!this.Messaging.EncounteredError) { - this.CreateBARef(section, sourceLineNumbers, node, "WixManagedBootstrapperApplicationHost"); - if (!String.IsNullOrEmpty(logoFile)) { section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "PreqbaLogo")) @@ -785,18 +778,15 @@ namespace WixToolset.Bal }); } - string themePayloadGroup = null; + var baId = "WixManagedBootstrapperApplicationHost"; switch (theme) { case WixManagedBootstrapperApplicationHostTheme.Standard: - themePayloadGroup = "MbaPreqStandardPayloads"; + baId = "WixManagedBootstrapperApplicationHost.Standard"; break; } - if (themePayloadGroup != null) - { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBundlePayloadGroup, themePayloadGroup); - } + this.CreateBARef(section, sourceLineNumbers, node, baId); } } @@ -867,8 +857,6 @@ namespace WixToolset.Bal if (!this.Messaging.EncounteredError) { - this.CreateBARef(section, sourceLineNumbers, node, "WixDotNetCoreBootstrapperApplicationHost"); - if (!String.IsNullOrEmpty(logoFile)) { section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "DncPreqbaLogo")) @@ -901,18 +889,15 @@ namespace WixToolset.Bal }); } - string themePayloadGroup = null; + var baId = "WixDotNetCoreBootstrapperApplicationHost"; switch (theme) { case WixDotNetCoreBootstrapperApplicationHostTheme.Standard: - themePayloadGroup = "DncPreqStandardPayloads"; + baId = "WixDotNetCoreBootstrapperApplicationHost.Standard"; break; } - if (themePayloadGroup != null) - { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBundlePayloadGroup, themePayloadGroup); - } + this.CreateBARef(section, sourceLineNumbers, node, baId); } } 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 @@ - + - + + + + + + + + - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3-55-g6feb