From b62a7a0beb7ceb7987de28ec768c7814cadb83b9 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 21 Jul 2020 14:31:53 -0700 Subject: Support implicit standard directory reference and "3264" platform folders Completes wixtoolset/issues#5798 and wixtoolset/issues#5835 --- .../Bind/BindSummaryInfoCommand.cs | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs') 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 public int InstallerVersion { get; private set; } + public Platform Platform { get; private set; } + /// /// Modularization guid, or null if the output is not a module. /// @@ -66,6 +68,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind summaryInformationSymbol.Value = Common.GetValidCodePage(codepage, false, false, summaryInformationSymbol.SourceLineNumbers).ToString(CultureInfo.InvariantCulture); } break; + case SummaryInformationType.PlatformAndLanguage: + this.Platform = GetPlatformFromSummaryInformation(summaryInformationSymbol.Value); + break; + case SummaryInformationType.PackageCode: // PID_REVNUMBER var packageCode = summaryInformationSymbol.Value; @@ -137,5 +143,30 @@ namespace WixToolset.Core.WindowsInstaller.Bind }); } } + + private static Platform GetPlatformFromSummaryInformation(string value) + { + var separatorIndex = value.IndexOf(';'); + var platformValue = separatorIndex > 0 ? value.Substring(0, separatorIndex) : value; + + switch (platformValue) + { + case "x64": + return Platform.X64; + + case "Arm": + return Platform.ARM; + + case "Arm64": + return Platform.ARM64; + + case "Intel64": + return Platform.IA64; + + case "Intel": + default: + return Platform.X86; + } + } } } -- cgit v1.2.3-55-g6feb