Skip to content

Commit

Permalink
Adding parsing logic for Burn installerType (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
palenshus authored Jun 10, 2021
1 parent 97b45d3 commit 6295f53
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/WingetCreateCore/Common/PackageParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public static class PackageParser
private static readonly string[] KnownInstallerResourceNames = new[]
{
"inno",
"wix",
"nullsoft",
};

Expand Down Expand Up @@ -254,7 +253,20 @@ private static bool ParseExeInstallerType(string path, Installer installer)
.Split(' ').First()
.ToLowerInvariant();

installer.InstallerType = KnownInstallerResourceNames.Contains(installerType) ? installerType.ToEnumOrDefault<InstallerType>() : 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<InstallerType>();
}
else
{
installer.InstallerType = InstallerType.Exe;
}

return true;
}
Expand Down

0 comments on commit 6295f53

Please sign in to comment.