From 555149963ec45781b41a032d0b8d49cd415eb776 Mon Sep 17 00:00:00 2001 From: Vedant <83997633+vedantmgoyal2009@users.noreply.github.com> Date: Sun, 11 Feb 2024 12:08:09 +0530 Subject: [PATCH] Match more architectures from URL --- src/WingetCreateCore/Common/PackageParser.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/WingetCreateCore/Common/PackageParser.cs b/src/WingetCreateCore/Common/PackageParser.cs index 3fa5acf8..699ba692 100644 --- a/src/WingetCreateCore/Common/PackageParser.cs +++ b/src/WingetCreateCore/Common/PackageParser.cs @@ -582,21 +582,21 @@ private static bool ParsePackageAndGenerateInstallerNodes(InstallerMetadata inst List archMatches = new List(); // Arm must only be checked if arm64 check fails, otherwise it'll match for arm64 too - if (Regex.Match(url, "arm64|aarch64", RegexOptions.IgnoreCase).Success) + if (Regex.Match(url, "arm64|aarch64(ec)?", RegexOptions.IgnoreCase).Success) { archMatches.Add(Architecture.Arm64); } - else if (Regex.Match(url, @"\barm\b|armv[567]", RegexOptions.IgnoreCase).Success) + else if (Regex.Match(url, @"\barm\b|armv[567]|\baarch\b", RegexOptions.IgnoreCase).Success) { archMatches.Add(Architecture.Arm); } - if (Regex.Match(url, "x64|win64|_64|64-bit|amd64", RegexOptions.IgnoreCase).Success) + if (Regex.Match(url, "x64|winx?64|_64|64-?bit|ia64|amd64|x86(-|_)64", RegexOptions.IgnoreCase).Success) { archMatches.Add(Architecture.X64); } - if (Regex.Match(url, @"x86|win32|ia32|_86|32-bit|i386|\b386\b", RegexOptions.IgnoreCase).Success) + if (Regex.Match(url, @"x86|win32|winx86|_86|32-?bit|ia32|i[3456]86|\b[3456]86\b", RegexOptions.IgnoreCase).Success) { archMatches.Add(Architecture.X86); }