diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-02-11 13:45:11 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-02-11 14:41:50 -0800 |
| commit | 7ff5ffb753fc0f576c24b0faa5d03b6d85b0f238 (patch) | |
| tree | 69f854c8f56ad6803939ebc195ead20d0c4a31d0 /src/WixToolset.Converters | |
| parent | 1a170f2a5afce8e4beb0100229e3c420629b7c88 (diff) | |
| download | wix-7ff5ffb753fc0f576c24b0faa5d03b6d85b0f238.tar.gz wix-7ff5ffb753fc0f576c24b0faa5d03b6d85b0f238.tar.bz2 wix-7ff5ffb753fc0f576c24b0faa5d03b6d85b0f238.zip | |
Replace Win64 attribute with Bitness attribute
Diffstat (limited to 'src/WixToolset.Converters')
| -rw-r--r-- | src/WixToolset.Converters/WixConverter.cs | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/src/WixToolset.Converters/WixConverter.cs b/src/WixToolset.Converters/WixConverter.cs index 73daa9a2..18cd7115 100644 --- a/src/WixToolset.Converters/WixConverter.cs +++ b/src/WixToolset.Converters/WixConverter.cs | |||
| @@ -43,6 +43,7 @@ namespace WixToolset.Converters | |||
| 43 | private static readonly XName BootstrapperApplicationElementName = WixNamespace + "BootstrapperApplication"; | 43 | private static readonly XName BootstrapperApplicationElementName = WixNamespace + "BootstrapperApplication"; |
| 44 | private static readonly XName BootstrapperApplicationDllElementName = WixNamespace + "BootstrapperApplicationDll"; | 44 | private static readonly XName BootstrapperApplicationDllElementName = WixNamespace + "BootstrapperApplicationDll"; |
| 45 | private static readonly XName BootstrapperApplicationRefElementName = WixNamespace + "BootstrapperApplicationRef"; | 45 | private static readonly XName BootstrapperApplicationRefElementName = WixNamespace + "BootstrapperApplicationRef"; |
| 46 | private static readonly XName ApprovedExeForElevationElementName = WixNamespace + "ApprovedExeForElevation"; | ||
| 46 | private static readonly XName EmbeddedChainerElementName = WixNamespace + "EmbeddedChainer"; | 47 | private static readonly XName EmbeddedChainerElementName = WixNamespace + "EmbeddedChainer"; |
| 47 | private static readonly XName CatalogElementName = WixNamespace + "Catalog"; | 48 | private static readonly XName CatalogElementName = WixNamespace + "Catalog"; |
| 48 | private static readonly XName ColumnElementName = WixNamespace + "Column"; | 49 | private static readonly XName ColumnElementName = WixNamespace + "Column"; |
| @@ -73,6 +74,7 @@ namespace WixToolset.Converters | |||
| 73 | private static readonly XName PublishElementName = WixNamespace + "Publish"; | 74 | private static readonly XName PublishElementName = WixNamespace + "Publish"; |
| 74 | private static readonly XName MultiStringValueElementName = WixNamespace + "MultiStringValue"; | 75 | private static readonly XName MultiStringValueElementName = WixNamespace + "MultiStringValue"; |
| 75 | private static readonly XName RemotePayloadElementName = WixNamespace + "RemotePayload"; | 76 | private static readonly XName RemotePayloadElementName = WixNamespace + "RemotePayload"; |
| 77 | private static readonly XName RegistrySearchElementName = WixNamespace + "RegistrySearch"; | ||
| 76 | private static readonly XName RequiredPrivilegeElementName = WixNamespace + "RequiredPrivilege"; | 78 | private static readonly XName RequiredPrivilegeElementName = WixNamespace + "RequiredPrivilege"; |
| 77 | private static readonly XName ServiceArgumentElementName = WixNamespace + "ServiceArgument"; | 79 | private static readonly XName ServiceArgumentElementName = WixNamespace + "ServiceArgument"; |
| 78 | private static readonly XName SetDirectoryElementName = WixNamespace + "SetDirectory"; | 80 | private static readonly XName SetDirectoryElementName = WixNamespace + "SetDirectory"; |
| @@ -151,6 +153,7 @@ namespace WixToolset.Converters | |||
| 151 | { WixConverter.InstallExecuteSequenceElementName, this.ConvertSequenceElement }, | 153 | { WixConverter.InstallExecuteSequenceElementName, this.ConvertSequenceElement }, |
| 152 | { WixConverter.BootstrapperApplicationElementName, this.ConvertBootstrapperApplicationElement }, | 154 | { WixConverter.BootstrapperApplicationElementName, this.ConvertBootstrapperApplicationElement }, |
| 153 | { WixConverter.BootstrapperApplicationRefElementName, this.ConvertBootstrapperApplicationRefElement }, | 155 | { WixConverter.BootstrapperApplicationRefElementName, this.ConvertBootstrapperApplicationRefElement }, |
| 156 | { WixConverter.ApprovedExeForElevationElementName, this.ConvertApprovedExeForElevationElement }, | ||
| 154 | { WixConverter.CatalogElementName, this.ConvertCatalogElement }, | 157 | { WixConverter.CatalogElementName, this.ConvertCatalogElement }, |
| 155 | { WixConverter.ColumnElementName, this.ConvertColumnElement }, | 158 | { WixConverter.ColumnElementName, this.ConvertColumnElement }, |
| 156 | { WixConverter.CustomTableElementName, this.ConvertCustomTableElement }, | 159 | { WixConverter.CustomTableElementName, this.ConvertCustomTableElement }, |
| @@ -175,6 +178,7 @@ namespace WixToolset.Converters | |||
| 175 | { WixConverter.ProgressTextElementName, this.ConvertProgressTextElement }, | 178 | { WixConverter.ProgressTextElementName, this.ConvertProgressTextElement }, |
| 176 | { WixConverter.PublishElementName, this.ConvertPublishElement }, | 179 | { WixConverter.PublishElementName, this.ConvertPublishElement }, |
| 177 | { WixConverter.MultiStringValueElementName, this.ConvertMultiStringValueElement }, | 180 | { WixConverter.MultiStringValueElementName, this.ConvertMultiStringValueElement }, |
| 181 | { WixConverter.RegistrySearchElementName, this.ConvertRegistrySearchElement }, | ||
| 178 | { WixConverter.RemotePayloadElementName, this.ConvertRemotePayloadElement }, | 182 | { WixConverter.RemotePayloadElementName, this.ConvertRemotePayloadElement }, |
| 179 | { WixConverter.RequiredPrivilegeElementName, this.ConvertRequiredPrivilegeElement }, | 183 | { WixConverter.RequiredPrivilegeElementName, this.ConvertRequiredPrivilegeElement }, |
| 180 | { WixConverter.CustomActionElementName, this.ConvertCustomActionElement }, | 184 | { WixConverter.CustomActionElementName, this.ConvertCustomActionElement }, |
| @@ -625,6 +629,20 @@ namespace WixToolset.Converters | |||
| 625 | } | 629 | } |
| 626 | } | 630 | } |
| 627 | 631 | ||
| 632 | private void ConvertApprovedExeForElevationElement(XElement element) | ||
| 633 | { | ||
| 634 | if (this.SourceVersion < 4) | ||
| 635 | { | ||
| 636 | var win64 = element.Attribute("Win64"); | ||
| 637 | if (win64 != null && this.OnError(ConverterTestType.Win64AttributeRenamed, element, "The Win64 attribute has been renamed. Use the Bitness attribute instead.")) | ||
| 638 | { | ||
| 639 | var value = win64.Value; | ||
| 640 | element.Add(new XAttribute("Bitness", value == "yes" ? "always64" : "always32")); | ||
| 641 | win64.Remove(); | ||
| 642 | } | ||
| 643 | } | ||
| 644 | } | ||
| 645 | |||
| 628 | private void ConvertBalBootstrapperApplicationRef(XElement element, string theme, XName balBAElementName, XName oldBalBAElementName = null) | 646 | private void ConvertBalBootstrapperApplicationRef(XElement element, string theme, XName balBAElementName, XName oldBalBAElementName = null) |
| 629 | { | 647 | { |
| 630 | var xBalBa = element.Element(oldBalBAElementName ?? balBAElementName); | 648 | var xBalBa = element.Element(oldBalBAElementName ?? balBAElementName); |
| @@ -733,6 +751,14 @@ namespace WixToolset.Converters | |||
| 733 | xCondition.Remove(); | 751 | xCondition.Remove(); |
| 734 | } | 752 | } |
| 735 | } | 753 | } |
| 754 | |||
| 755 | var win64 = element.Attribute("Win64"); | ||
| 756 | if (win64 != null && this.OnError(ConverterTestType.Win64AttributeRenamed, element, "The Win64 attribute has been renamed. Use the Bitness attribute instead.")) | ||
| 757 | { | ||
| 758 | var value = win64.Value; | ||
| 759 | element.Add(new XAttribute("Bitness", value == "yes" ? "always64" : "always32")); | ||
| 760 | win64.Remove(); | ||
| 761 | } | ||
| 736 | } | 762 | } |
| 737 | 763 | ||
| 738 | private void ConvertDirectoryElement(XElement element) | 764 | private void ConvertDirectoryElement(XElement element) |
| @@ -1071,6 +1097,20 @@ namespace WixToolset.Converters | |||
| 1071 | } | 1097 | } |
| 1072 | } | 1098 | } |
| 1073 | 1099 | ||
| 1100 | private void ConvertRegistrySearchElement(XElement element) | ||
| 1101 | { | ||
| 1102 | if (this.SourceVersion < 4) | ||
| 1103 | { | ||
| 1104 | var win64 = element.Attribute("Win64"); | ||
| 1105 | if (win64 != null && this.OnError(ConverterTestType.Win64AttributeRenamed, element, "The Win64 attribute has been renamed. Use the Bitness attribute instead.")) | ||
| 1106 | { | ||
| 1107 | var value = win64.Value; | ||
| 1108 | element.Add(new XAttribute("Bitness", value == "yes" ? "always64" : "always32")); | ||
| 1109 | win64.Remove(); | ||
| 1110 | } | ||
| 1111 | } | ||
| 1112 | } | ||
| 1113 | |||
| 1074 | private void ConvertRequiredPrivilegeElement(XElement element) => this.ConvertInnerTextToAttribute(element, "Name"); | 1114 | private void ConvertRequiredPrivilegeElement(XElement element) => this.ConvertInnerTextToAttribute(element, "Name"); |
| 1075 | 1115 | ||
| 1076 | private void ConvertRowElement(XElement element) => this.ConvertInnerTextToAttribute(element, "Value"); | 1116 | private void ConvertRowElement(XElement element) => this.ConvertInnerTextToAttribute(element, "Value"); |
| @@ -1241,7 +1281,7 @@ namespace WixToolset.Converters | |||
| 1241 | var inheritable = element.Parent.Name == CreateFolderElementName; | 1281 | var inheritable = element.Parent.Name == CreateFolderElementName; |
| 1242 | if (!inheritable) | 1282 | if (!inheritable) |
| 1243 | { | 1283 | { |
| 1244 | if (this.OnError(ConverterTestType.AssignPermissionExInheritable, element, "The PermissionEx Inheritable attribute is being set to 'no' to ensure it remains the same as the v3 default")) | 1284 | if (this.OnError(ConverterTestType.AssignPermissionExInheritable, element, "The PermissionEx Inheritable attribute is being set to 'no' to ensure it remains the same as the v3 default.")) |
| 1245 | { | 1285 | { |
| 1246 | element.Add(new XAttribute("Inheritable", "no")); | 1286 | element.Add(new XAttribute("Inheritable", "no")); |
| 1247 | } | 1287 | } |
| @@ -1253,6 +1293,14 @@ namespace WixToolset.Converters | |||
| 1253 | { | 1293 | { |
| 1254 | if (this.SourceVersion < 4) | 1294 | if (this.SourceVersion < 4) |
| 1255 | { | 1295 | { |
| 1296 | var win64 = element.Attribute("Win64"); | ||
| 1297 | if (win64 != null && this.OnError(ConverterTestType.Win64AttributeRenamed, element, "The Win64 attribute has been renamed. Use the Bitness attribute instead.")) | ||
| 1298 | { | ||
| 1299 | var value = win64.Value; | ||
| 1300 | element.Add(new XAttribute("Bitness", value == "yes" ? "always64" : "always32")); | ||
| 1301 | win64.Remove(); | ||
| 1302 | } | ||
| 1303 | |||
| 1256 | var result = element.Attribute("Result")?.Value; | 1304 | var result = element.Attribute("Result")?.Value; |
| 1257 | if (result == null || result == "value") | 1305 | if (result == null || result == "value") |
| 1258 | { | 1306 | { |
| @@ -1742,6 +1790,11 @@ namespace WixToolset.Converters | |||
| 1742 | /// The ExePackage elements "XxxCommand" attributes have been renamed to "XxxArguments". | 1790 | /// The ExePackage elements "XxxCommand" attributes have been renamed to "XxxArguments". |
| 1743 | /// </summary> | 1791 | /// </summary> |
| 1744 | RenameExePackageCommandToArguments, | 1792 | RenameExePackageCommandToArguments, |
| 1793 | |||
| 1794 | /// <summary> | ||
| 1795 | /// The Win64 attribute has been renamed. Use the Bitness attribute instead. | ||
| 1796 | /// </summary> | ||
| 1797 | Win64AttributeRenamed, | ||
| 1745 | } | 1798 | } |
| 1746 | } | 1799 | } |
| 1747 | } | 1800 | } |
