From 06b0b7b3e5504d062fc2226dd9a64dc4efa41f47 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 1 Nov 2020 17:45:42 -0600 Subject: Add warnings for util:RegistrySearch (value) and DisplayInternalUI. --- src/WixToolset.Converters/WixConverter.cs | 38 +++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) (limited to 'src/WixToolset.Converters') diff --git a/src/WixToolset.Converters/WixConverter.cs b/src/WixToolset.Converters/WixConverter.cs index ac63f26b..c713045e 100644 --- a/src/WixToolset.Converters/WixConverter.cs +++ b/src/WixToolset.Converters/WixConverter.cs @@ -78,6 +78,7 @@ namespace WixToolset.Converters private static readonly XName VariableElementName = WixNamespace + "Variable"; private static readonly XName UtilCloseApplicationElementName = WixUtilNamespace + "CloseApplication"; private static readonly XName UtilPermissionExElementName = WixUtilNamespace + "PermissionEx"; + private static readonly XName UtilRegistrySearchName = WixUtilNamespace + "RegistrySearch"; private static readonly XName UtilXmlConfigElementName = WixUtilNamespace + "XmlConfig"; private static readonly XName CustomActionElementName = WixNamespace + "CustomAction"; private static readonly XName PropertyElementName = WixNamespace + "Property"; @@ -151,8 +152,8 @@ namespace WixToolset.Converters { WixConverter.ErrorElementName, this.ConvertErrorElement }, { WixConverter.ExePackageElementName, this.ConvertSuppressSignatureValidation }, { WixConverter.ModuleElementName, this.ConvertModuleElement }, - { WixConverter.MsiPackageElementName, this.ConvertSuppressSignatureValidation }, - { WixConverter.MspPackageElementName, this.ConvertSuppressSignatureValidation }, + { WixConverter.MsiPackageElementName, this.ConvertWindowsInstallerPackageElement }, + { WixConverter.MspPackageElementName, this.ConvertWindowsInstallerPackageElement }, { WixConverter.MsuPackageElementName, this.ConvertSuppressSignatureValidation }, { WixConverter.PayloadElementName, this.ConvertSuppressSignatureValidation }, { WixConverter.PermissionExElementName, this.ConvertPermissionExElement }, @@ -171,6 +172,7 @@ namespace WixToolset.Converters { WixConverter.VariableElementName, this.ConvertVariableElement }, { WixConverter.UtilCloseApplicationElementName, this.ConvertUtilCloseApplicationElementName }, { WixConverter.UtilPermissionExElementName, this.ConvertUtilPermissionExElement }, + { WixConverter.UtilRegistrySearchName, this.ConvertUtilRegistrySearchElement }, { WixConverter.UtilXmlConfigElementName, this.ConvertUtilXmlConfigElement }, { WixConverter.PropertyElementName, this.ConvertPropertyElement }, { WixConverter.WixElementWithoutNamespaceName, this.ConvertElementWithoutNamespace }, @@ -863,6 +865,16 @@ namespace WixToolset.Converters private void ConvertUITextElement(XElement element) => this.ConvertInnerTextToAttribute(element, "Value"); + private void ConvertWindowsInstallerPackageElement(XElement element) + { + this.ConvertSuppressSignatureValidation(element); + + if (null != element.Attribute("DisplayInternalUI")) + { + this.OnError(ConverterTestType.DisplayInternalUiNotConvertable, element, "The DisplayInternalUI functionality has fundamentally changed and requires BootstrapperApplication support."); + } + } + private void ConvertCustomActionElement(XElement xCustomAction) { var xBinaryKey = xCustomAction.Attribute("BinaryKey"); @@ -986,6 +998,18 @@ namespace WixToolset.Converters } } + private void ConvertUtilRegistrySearchElement(XElement element) + { + if (this.SourceVersion < 4) + { + var result = element.Attribute("Result")?.Value; + if (result == null || result == "value") + { + this.OnError(ConverterTestType.UtilRegistryValueSearchBehaviorChange, element, "Breaking change: util:RegistrySearch for a value no longer clears the variable when the key or value is missing."); + } + } + } + private void ConvertUtilXmlConfigElement(XElement element) => this.ConvertInnerTextToAttribute(element, "Value"); /// @@ -1422,6 +1446,16 @@ namespace WixToolset.Converters /// A MediaTemplate with no attributes set is now provided by default. /// DefaultMediaTemplate, + + /// + /// util:RegistrySearch has breaking change when value is missing. + /// + UtilRegistryValueSearchBehaviorChange, + + /// + /// DisplayInternalUI can't be converted. + /// + DisplayInternalUiNotConvertable, } } } -- cgit v1.2.3-55-g6feb