diff options
author | Rob Mensching <rob@firegiant.com> | 2021-02-11 15:22:03 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-02-11 15:25:22 -0800 |
commit | bfba90f1714724ab661e43af5cc48bc148bdef70 (patch) | |
tree | a5ef8e1d156a935f00ee7f31c23a2259511f759b /src/wixext | |
parent | b4a31404325d3fdd95d67fd41eda8e48e3491629 (diff) | |
download | wix-bfba90f1714724ab661e43af5cc48bc148bdef70.tar.gz wix-bfba90f1714724ab661e43af5cc48bc148bdef70.tar.bz2 wix-bfba90f1714724ab661e43af5cc48bc148bdef70.zip |
Replace Win64 attribute with Bitness attribute
Diffstat (limited to 'src/wixext')
-rw-r--r-- | src/wixext/UtilCompiler.cs | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/wixext/UtilCompiler.cs b/src/wixext/UtilCompiler.cs index 7314570e..183f286b 100644 --- a/src/wixext/UtilCompiler.cs +++ b/src/wixext/UtilCompiler.cs | |||
@@ -2684,7 +2684,7 @@ namespace WixToolset.Util | |||
2684 | string key = null; | 2684 | string key = null; |
2685 | string value = null; | 2685 | string value = null; |
2686 | var expand = YesNoType.NotSet; | 2686 | var expand = YesNoType.NotSet; |
2687 | var win64 = YesNoType.NotSet; | 2687 | var win64 = this.Context.IsCurrentPlatform64Bit; |
2688 | var attributes = WixRegistrySearchAttributes.Raw | WixRegistrySearchAttributes.WantValue; | 2688 | var attributes = WixRegistrySearchAttributes.Raw | WixRegistrySearchAttributes.WantValue; |
2689 | 2689 | ||
2690 | foreach (var attrib in element.Attributes()) | 2690 | foreach (var attrib in element.Attributes()) |
@@ -2699,6 +2699,24 @@ namespace WixToolset.Util | |||
2699 | case "After": | 2699 | case "After": |
2700 | this.ParseCommonSearchAttributes(sourceLineNumbers, attrib, ref id, ref variable, ref condition, ref after); | 2700 | this.ParseCommonSearchAttributes(sourceLineNumbers, attrib, ref id, ref variable, ref condition, ref after); |
2701 | break; | 2701 | break; |
2702 | case "Bitness": | ||
2703 | var bitnessValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
2704 | switch (bitnessValue) | ||
2705 | { | ||
2706 | case "always32": | ||
2707 | win64 = false; | ||
2708 | break; | ||
2709 | case "always64": | ||
2710 | win64 = true; | ||
2711 | break; | ||
2712 | case "default": | ||
2713 | case "": | ||
2714 | break; | ||
2715 | default: | ||
2716 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, attrib.Name.LocalName, attrib.Name.LocalName, bitnessValue, "default", "always32", "always64")); | ||
2717 | break; | ||
2718 | } | ||
2719 | break; | ||
2702 | case "Root": | 2720 | case "Root": |
2703 | root = this.ParseHelper.GetAttributeRegistryRootValue(sourceLineNumbers, attrib, false); | 2721 | root = this.ParseHelper.GetAttributeRegistryRootValue(sourceLineNumbers, attrib, false); |
2704 | break; | 2722 | break; |
@@ -2741,9 +2759,6 @@ namespace WixToolset.Util | |||
2741 | break; | 2759 | break; |
2742 | } | 2760 | } |
2743 | break; | 2761 | break; |
2744 | case "Win64": | ||
2745 | win64 = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); | ||
2746 | break; | ||
2747 | default: | 2762 | default: |
2748 | this.ParseHelper.UnexpectedAttribute(element, attrib); | 2763 | this.ParseHelper.UnexpectedAttribute(element, attrib); |
2749 | break; | 2764 | break; |
@@ -2780,7 +2795,7 @@ namespace WixToolset.Util | |||
2780 | attributes |= WixRegistrySearchAttributes.ExpandEnvironmentVariables; | 2795 | attributes |= WixRegistrySearchAttributes.ExpandEnvironmentVariables; |
2781 | } | 2796 | } |
2782 | 2797 | ||
2783 | if (win64 == YesNoType.Yes) | 2798 | if (win64) |
2784 | { | 2799 | { |
2785 | attributes |= WixRegistrySearchAttributes.Win64; | 2800 | attributes |= WixRegistrySearchAttributes.Win64; |
2786 | } | 2801 | } |