From 4be0bf390962e108509a176e559cdab35f27daf9 Mon Sep 17 00:00:00 2001 From: Union Palenshus Date: Wed, 9 Jun 2021 16:51:23 -0700 Subject: [PATCH] Adding parsing logic for Burn installerType --- src/WingetCreateCore/Common/PackageParser.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/WingetCreateCore/Common/PackageParser.cs b/src/WingetCreateCore/Common/PackageParser.cs index 40e95d5d..7aa36568 100644 --- a/src/WingetCreateCore/Common/PackageParser.cs +++ b/src/WingetCreateCore/Common/PackageParser.cs @@ -38,7 +38,6 @@ public static class PackageParser private static readonly string[] KnownInstallerResourceNames = new[] { "inno", - "wix", "nullsoft", }; @@ -254,7 +253,20 @@ private static bool ParseExeInstallerType(string path, Installer installer) .Split(' ').First() .ToLowerInvariant(); - installer.InstallerType = KnownInstallerResourceNames.Contains(installerType) ? installerType.ToEnumOrDefault() : InstallerType.Exe; + if (installerType.EqualsIC("wix")) + { + // See https://github.com/microsoft/winget-create/issues/26, a Burn installer is an exe-installer produced by the WiX toolset. + installer.InstallerType = InstallerType.Burn; + } + else if (KnownInstallerResourceNames.Contains(installerType)) + { + // If it's a known exe installer type, set as appropriately + installer.InstallerType = installerType.ToEnumOrDefault(); + } + else + { + installer.InstallerType = InstallerType.Exe; + } return true; }