From a70d814e7db6a7c4956423bca3bfdd23abc433bc Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 11 Dec 2019 16:22:58 +1100 Subject: Bring extension up to date. --- src/Samples/bafunctions/bafunctions.vcxproj | 12 ++-- src/Samples/bafunctions/packages.config | 6 +- src/mbahost/mbahost.vcxproj | 12 ++-- src/mbahost/packages.config | 6 +- .../WixToolsetTest.MbaHost.vcxproj | 8 +-- src/test/WixToolsetTest.MbaHost/packages.config | 4 +- src/wixext/BalCompiler.cs | 70 +++++++++++----------- .../BalWindowsInstallerBackendBinderExtension.cs | 16 +++-- src/wixlib/bal.wixproj | 4 +- src/wixlib/packages.config | 2 +- src/wixstdba/packages.config | 6 +- src/wixstdba/wixstdba.vcxproj | 12 ++-- 12 files changed, 78 insertions(+), 80 deletions(-) (limited to 'src') diff --git a/src/Samples/bafunctions/bafunctions.vcxproj b/src/Samples/bafunctions/bafunctions.vcxproj index 8bc34cf8..e4988019 100644 --- a/src/Samples/bafunctions/bafunctions.vcxproj +++ b/src/Samples/bafunctions/bafunctions.vcxproj @@ -2,9 +2,9 @@ - - - + + + @@ -57,9 +57,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + + + diff --git a/src/Samples/bafunctions/packages.config b/src/Samples/bafunctions/packages.config index 41ba2f12..107f25c4 100644 --- a/src/Samples/bafunctions/packages.config +++ b/src/Samples/bafunctions/packages.config @@ -1,7 +1,7 @@  - - - + + + \ No newline at end of file diff --git a/src/mbahost/mbahost.vcxproj b/src/mbahost/mbahost.vcxproj index 7d6cdc20..7e00b60b 100644 --- a/src/mbahost/mbahost.vcxproj +++ b/src/mbahost/mbahost.vcxproj @@ -2,9 +2,9 @@ - - - + + + @@ -56,9 +56,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + + + diff --git a/src/mbahost/packages.config b/src/mbahost/packages.config index 41ba2f12..107f25c4 100644 --- a/src/mbahost/packages.config +++ b/src/mbahost/packages.config @@ -1,7 +1,7 @@  - - - + + + \ No newline at end of file diff --git a/src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj b/src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj index 094c351f..854bc6cf 100644 --- a/src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj +++ b/src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj @@ -1,10 +1,10 @@ - + - + Debug @@ -82,11 +82,11 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + - + \ No newline at end of file diff --git a/src/test/WixToolsetTest.MbaHost/packages.config b/src/test/WixToolsetTest.MbaHost/packages.config index 4cd75692..466226a5 100644 --- a/src/test/WixToolsetTest.MbaHost/packages.config +++ b/src/test/WixToolsetTest.MbaHost/packages.config @@ -8,7 +8,7 @@ - + - + \ No newline at end of file diff --git a/src/wixext/BalCompiler.cs b/src/wixext/BalCompiler.cs index 5b54ef58..c9b232ba 100644 --- a/src/wixext/BalCompiler.cs +++ b/src/wixext/BalCompiler.cs @@ -110,7 +110,7 @@ namespace WixToolset.Bal if (null != prereqPackage && YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, prereqPackage)) { - prereqInfo = (WixMbaPrereqInformationTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixMbaPrereqInformation"); + prereqInfo = (WixMbaPrereqInformationTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixMbaPrereqInformation"); prereqInfo.PackageId = packageId; this.prereqInfoRows.Add(packageId, prereqInfo); @@ -141,7 +141,7 @@ namespace WixToolset.Bal if (null != prereqPackage && YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, prereqPackage)) { - prereqInfo = (WixMbaPrereqInformationTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixMbaPrereqInformation"); + prereqInfo = (WixMbaPrereqInformationTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixMbaPrereqInformation"); prereqInfo.PackageId = packageId; this.prereqInfoRows.Add(packageId, prereqInfo); @@ -167,7 +167,7 @@ namespace WixToolset.Bal { if (!this.prereqInfoRows.TryGetValue(packageId, out prereqInfo)) { - prereqInfo = (WixMbaPrereqInformationTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixMbaPrereqInformation"); + prereqInfo = (WixMbaPrereqInformationTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixMbaPrereqInformation"); prereqInfo.PackageId = packageId; this.prereqInfoRows.Add(packageId, prereqInfo); @@ -193,7 +193,7 @@ namespace WixToolset.Bal case "BAFunctions": if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute)) { - var tuple = (WixBalBAFunctionsTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixBalBAFunctions"); + var tuple = (WixBalBAFunctionsTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixBalBAFunctions"); tuple.PayloadId = payloadId; } break; @@ -218,7 +218,7 @@ namespace WixToolset.Bal case "Overridable": if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute)) { - var tuple = (WixStdbaOverridableVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixStdbaOverridableVariable"); + var tuple = (WixStdbaOverridableVariableTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixStdbaOverridableVariable"); tuple.Name = variableName.Value; } break; @@ -276,7 +276,7 @@ namespace WixToolset.Bal if (!this.Messaging.EncounteredError) { - var tuple = (WixBalConditionTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixBalCondition"); + var tuple = (WixBalConditionTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixBalCondition"); tuple.Condition = condition; tuple.Message = message; @@ -387,32 +387,32 @@ namespace WixToolset.Bal { if (!String.IsNullOrEmpty(launchTarget)) { - var row = (WixBundleVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixBundleVariable"); - row.Id = new Identifier("LaunchTarget", AccessModifier.Public); + var row = (WixBundleVariableTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixBundleVariable"); + row.Id = new Identifier(AccessModifier.Public, "LaunchTarget"); row.Value = launchTarget; row.Type = "string"; } if (!String.IsNullOrEmpty(launchTargetElevatedId)) { - var row = (WixBundleVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixBundleVariable"); - row.Id = new Identifier("LaunchTargetElevatedId", AccessModifier.Public); + var row = (WixBundleVariableTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixBundleVariable"); + row.Id = new Identifier(AccessModifier.Public, "LaunchTargetElevatedId"); row.Value = launchTargetElevatedId; row.Type = "string"; } if (!String.IsNullOrEmpty(launchArguments)) { - var row = (WixBundleVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixBundleVariable"); - row.Id = new Identifier("LaunchArguments", AccessModifier.Public); + var row = (WixBundleVariableTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixBundleVariable"); + row.Id = new Identifier(AccessModifier.Public, "LaunchArguments"); row.Value = launchArguments; row.Type = "string"; } if (YesNoType.Yes == launchHidden) { - var row = (WixBundleVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixBundleVariable"); - row.Id = new Identifier("LaunchHidden", AccessModifier.Public); + var row = (WixBundleVariableTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixBundleVariable"); + row.Id = new Identifier(AccessModifier.Public, "LaunchHidden"); row.Value = "yes"; row.Type = "string"; } @@ -420,57 +420,57 @@ namespace WixToolset.Bal if (!String.IsNullOrEmpty(launchWorkingDir)) { - var row = (WixBundleVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "Variable"); - row.Id = new Identifier("LaunchWorkingFolder", AccessModifier.Public); + var row = (WixBundleVariableTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "Variable"); + row.Id = new Identifier(AccessModifier.Public, "LaunchWorkingFolder"); row.Value = launchWorkingDir; row.Type = "string"; } if (!String.IsNullOrEmpty(licenseFile)) { - var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable"); - wixVariableRow.Id = new Identifier("WixStdbaLicenseRtf", AccessModifier.Public); + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixVariable"); + wixVariableRow.Id = new Identifier(AccessModifier.Public, "WixStdbaLicenseRtf"); wixVariableRow.Value = licenseFile; } if (null != licenseUrl) { - var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable"); - wixVariableRow.Id = new Identifier("WixStdbaLicenseUrl", AccessModifier.Public); + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixVariable"); + wixVariableRow.Id = new Identifier(AccessModifier.Public, "WixStdbaLicenseUrl"); wixVariableRow.Value = licenseUrl; } if (!String.IsNullOrEmpty(logoFile)) { - var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable"); - wixVariableRow.Id = new Identifier("WixStdbaLogo", AccessModifier.Public); + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixVariable"); + wixVariableRow.Id = new Identifier(AccessModifier.Public, "WixStdbaLogo"); wixVariableRow.Value = logoFile; } if (!String.IsNullOrEmpty(logoSideFile)) { - var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable"); - wixVariableRow.Id = new Identifier("WixStdbaLogoSide", AccessModifier.Public); + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixVariable"); + wixVariableRow.Id = new Identifier(AccessModifier.Public, "WixStdbaLogoSide"); wixVariableRow.Value = logoSideFile; } if (!String.IsNullOrEmpty(themeFile)) { - var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable"); - wixVariableRow.Id = new Identifier("WixStdbaThemeXml", AccessModifier.Public); + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixVariable"); + wixVariableRow.Id = new Identifier(AccessModifier.Public, "WixStdbaThemeXml"); wixVariableRow.Value = themeFile; } if (!String.IsNullOrEmpty(localizationFile)) { - var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable"); - wixVariableRow.Id = new Identifier("WixStdbaThemeWxl", AccessModifier.Public); + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixVariable"); + wixVariableRow.Id = new Identifier(AccessModifier.Public, "WixStdbaThemeWxl"); wixVariableRow.Value = localizationFile; } if (YesNoType.Yes == suppressOptionsUI || YesNoType.Yes == suppressDowngradeFailure || YesNoType.Yes == suppressRepair || YesNoType.Yes == showVersion || YesNoType.Yes == supportCacheOnly) { - var tuple = (WixStdbaOptionsTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixStdbaOptions"); + var tuple = (WixStdbaOptionsTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixStdbaOptions"); if (YesNoType.Yes == suppressOptionsUI) { tuple.SuppressOptionsUI = 1; @@ -542,22 +542,22 @@ namespace WixToolset.Bal { if (!String.IsNullOrEmpty(logoFile)) { - var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable"); - wixVariableRow.Id = new Identifier("PreqbaLogo", AccessModifier.Public); + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixVariable"); + wixVariableRow.Id = new Identifier(AccessModifier.Public, "PreqbaLogo"); wixVariableRow.Value = logoFile; } if (!String.IsNullOrEmpty(themeFile)) { - var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable"); - wixVariableRow.Id = new Identifier("PreqbaThemeXml", AccessModifier.Public); + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixVariable"); + wixVariableRow.Id = new Identifier(AccessModifier.Public, "PreqbaThemeXml"); wixVariableRow.Value = themeFile; } if (!String.IsNullOrEmpty(localizationFile)) { - var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable"); - wixVariableRow.Id = new Identifier("PreqbaThemeWxl", AccessModifier.Public); + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixVariable"); + wixVariableRow.Id = new Identifier(AccessModifier.Public, "PreqbaThemeWxl"); wixVariableRow.Value = localizationFile; } } diff --git a/src/wixext/BalWindowsInstallerBackendBinderExtension.cs b/src/wixext/BalWindowsInstallerBackendBinderExtension.cs index fbda9d1b..3dc00da6 100644 --- a/src/wixext/BalWindowsInstallerBackendBinderExtension.cs +++ b/src/wixext/BalWindowsInstallerBackendBinderExtension.cs @@ -6,6 +6,7 @@ namespace WixToolset.Bal using System.Linq; using System.Xml; using WixToolset.Data; + using WixToolset.Data.Burn; using WixToolset.Data.WindowsInstaller; using WixToolset.Data.WindowsInstaller.Rows; using WixToolset.Extensibility; @@ -13,9 +14,6 @@ namespace WixToolset.Bal public class BalWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension { - // TODO: don't duplicate this from WixToolset.Core.Compiler - public const string BurnUXContainerId = "WixUXContainer"; - private static readonly TableDefinition[] Tables = LoadTables(); protected override TableDefinition[] TableDefinitionsForTuples => Tables; @@ -30,11 +28,11 @@ namespace WixToolset.Bal } } - public override void PostBackendBind(BindResult result, Pdb pdb) + public override void PostBackendBind(IBindResult result, WixOutput wixout) { - base.PostBackendBind(result, pdb); + base.PostBackendBind(result, wixout); - var output = pdb.Output; + var output = WindowsInstallerData.Load(wixout.Uri.AbsoluteUri, false); // Only process Bundles. if (OutputType.Bundle != output.Type) @@ -64,7 +62,7 @@ namespace WixToolset.Bal } } - private void VerifyBAFunctions(Output output) + private void VerifyBAFunctions(WindowsInstallerData output) { Row baFunctionsRow = null; var baFunctionsTable = output.Tables["WixBalBAFunctions"]; @@ -98,14 +96,14 @@ namespace WixToolset.Bal // TODO: May need to revisit this depending on the outcome of #5273. var payloadId = (string)baFunctionsRow[0]; var bundlePayloadRow = payloadPropertiesRows.Single(x => payloadId == x.Id); - if (BurnUXContainerId != bundlePayloadRow.Container) + if (BurnConstants.BurnUXContainerName != bundlePayloadRow.Container) { this.Messaging.Write(BalErrors.BAFunctionsPayloadRequiredInUXContainer(baFunctionsRow.SourceLineNumbers)); } } } - private void VerifyPrereqPackages(Output output) + private void VerifyPrereqPackages(WindowsInstallerData output) { var prereqInfoTable = output.Tables["WixMbaPrereqInformation"]; if (null == prereqInfoTable || prereqInfoTable.Rows.Count == 0) diff --git a/src/wixlib/bal.wixproj b/src/wixlib/bal.wixproj index be15229b..875283f9 100644 --- a/src/wixlib/bal.wixproj +++ b/src/wixlib/bal.wixproj @@ -1,7 +1,7 @@ - + {3444D952-F21C-496F-AB6B-56435BFD0787} @@ -56,7 +56,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index 7964daed..3ba2b904 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/src/wixstdba/packages.config b/src/wixstdba/packages.config index 41ba2f12..107f25c4 100644 --- a/src/wixstdba/packages.config +++ b/src/wixstdba/packages.config @@ -1,7 +1,7 @@  - - - + + + \ No newline at end of file diff --git a/src/wixstdba/wixstdba.vcxproj b/src/wixstdba/wixstdba.vcxproj index 15d5bbd6..8f3b4204 100644 --- a/src/wixstdba/wixstdba.vcxproj +++ b/src/wixstdba/wixstdba.vcxproj @@ -2,9 +2,9 @@ - - - + + + @@ -107,9 +107,9 @@ rc.exe -fo "$(OutDir)wixstdba.res" "$(IntDir)wixstdba.messages.rc" This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + + + -- cgit v1.2.3-55-g6feb