Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding parsing logic for Burn installerType #73

Merged
merged 1 commit into from
Jun 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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