Skip to content

Commit 7c1c3fe

Browse files
Match more architectures from URL (#508)
1 parent 26129d5 commit 7c1c3fe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/WingetCreateCore/Common/PackageParser.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,21 +582,21 @@ private static bool ParsePackageAndGenerateInstallerNodes(InstallerMetadata inst
582582
List<Architecture> archMatches = new List<Architecture>();
583583

584584
// Arm must only be checked if arm64 check fails, otherwise it'll match for arm64 too
585-
if (Regex.Match(url, "arm64|aarch64", RegexOptions.IgnoreCase).Success)
585+
if (Regex.Match(url, "arm64|aarch64(ec)?", RegexOptions.IgnoreCase).Success)
586586
{
587587
archMatches.Add(Architecture.Arm64);
588588
}
589-
else if (Regex.Match(url, @"\barm\b|armv[567]", RegexOptions.IgnoreCase).Success)
589+
else if (Regex.Match(url, @"\barm\b|armv[567]|\baarch\b", RegexOptions.IgnoreCase).Success)
590590
{
591591
archMatches.Add(Architecture.Arm);
592592
}
593593

594-
if (Regex.Match(url, "x64|win64|_64|64-bit|amd64", RegexOptions.IgnoreCase).Success)
594+
if (Regex.Match(url, "x64|winx?64|_64|64-?bit|ia64|amd64|x86(-|_)64", RegexOptions.IgnoreCase).Success)
595595
{
596596
archMatches.Add(Architecture.X64);
597597
}
598598

599-
if (Regex.Match(url, @"x86|win32|ia32|_86|32-bit|i386|\b386\b", RegexOptions.IgnoreCase).Success)
599+
if (Regex.Match(url, @"x86|win32|winx86|_86|32-?bit|ia32|i[3456]86|\b[3456]86\b", RegexOptions.IgnoreCase).Success)
600600
{
601601
archMatches.Add(Architecture.X86);
602602
}

0 commit comments

Comments
 (0)