aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2020-07-21 14:31:53 -0700
committerRob Mensching <rob@firegiant.com>2020-07-21 14:41:12 -0700
commitb62a7a0beb7ceb7987de28ec768c7814cadb83b9 (patch)
tree69a9183a3182334f0d48a39ab8e411ee3fc3aecd /src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs
parent414c07f7adce9c9fd0132ab0fade0267f743f665 (diff)
downloadwix-b62a7a0beb7ceb7987de28ec768c7814cadb83b9.tar.gz
wix-b62a7a0beb7ceb7987de28ec768c7814cadb83b9.tar.bz2
wix-b62a7a0beb7ceb7987de28ec768c7814cadb83b9.zip
Support implicit standard directory reference and "3264" platform folders
Completes wixtoolset/issues#5798 and wixtoolset/issues#5835
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs
index 82688edf..63691016 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs
@@ -32,6 +32,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
32 32
33 public int InstallerVersion { get; private set; } 33 public int InstallerVersion { get; private set; }
34 34
35 public Platform Platform { get; private set; }
36
35 /// <summary> 37 /// <summary>
36 /// Modularization guid, or null if the output is not a module. 38 /// Modularization guid, or null if the output is not a module.
37 /// </summary> 39 /// </summary>
@@ -66,6 +68,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
66 summaryInformationSymbol.Value = Common.GetValidCodePage(codepage, false, false, summaryInformationSymbol.SourceLineNumbers).ToString(CultureInfo.InvariantCulture); 68 summaryInformationSymbol.Value = Common.GetValidCodePage(codepage, false, false, summaryInformationSymbol.SourceLineNumbers).ToString(CultureInfo.InvariantCulture);
67 } 69 }
68 break; 70 break;
71 case SummaryInformationType.PlatformAndLanguage:
72 this.Platform = GetPlatformFromSummaryInformation(summaryInformationSymbol.Value);
73 break;
74
69 case SummaryInformationType.PackageCode: // PID_REVNUMBER 75 case SummaryInformationType.PackageCode: // PID_REVNUMBER
70 var packageCode = summaryInformationSymbol.Value; 76 var packageCode = summaryInformationSymbol.Value;
71 77
@@ -137,5 +143,30 @@ namespace WixToolset.Core.WindowsInstaller.Bind
137 }); 143 });
138 } 144 }
139 } 145 }
146
147 private static Platform GetPlatformFromSummaryInformation(string value)
148 {
149 var separatorIndex = value.IndexOf(';');
150 var platformValue = separatorIndex > 0 ? value.Substring(0, separatorIndex) : value;
151
152 switch (platformValue)
153 {
154 case "x64":
155 return Platform.X64;
156
157 case "Arm":
158 return Platform.ARM;
159
160 case "Arm64":
161 return Platform.ARM64;
162
163 case "Intel64":
164 return Platform.IA64;
165
166 case "Intel":
167 default:
168 return Platform.X86;
169 }
170 }
140 } 171 }
141} 172}