detect custom builds

This commit is contained in:
13xforever
2025-07-28 21:43:05 +05:00
parent f3a759cd36
commit 3237cb2d11
3 changed files with 12 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ internal static partial class LogParserResult
items["build_full_version"] = $"{items["build_version"]}.{items["build_number"]}";
items["build_commit"] = buildInfo.Groups["commit"].Value.Trim();
items["build_branch"] = buildInfo.Groups["branch"].Value.Trim();
items["build_unknown"] = buildInfo.Groups["unknown"].Value.Trim();
var fwVersion = buildInfo.Groups["fw_version_installed"].Value;
if (!string.IsNullOrEmpty(fwVersion))
items["fw_version_installed"] = fwVersion;

View File

@@ -438,6 +438,7 @@ internal static partial class LogParserResult
var updateInfo = await CheckForUpdateAsync(items).ConfigureAwait(false);
var buildBranch = items["build_branch"]?.ToLowerInvariant();
if (updateInfo is not null
&& items["build_unknown"] is not {Length: >0}
&& (buildBranch is "master" or "head" or "spu_perf"
|| buildBranch is not {Length: >0}
&& (updateInfo.X64?.CurrentBuild is not null || updateInfo.Arm?.CurrentBuild is not null)))
@@ -465,6 +466,15 @@ internal static partial class LogParserResult
if (buildBranch == "spu_perf")
notes.Add($"😱 `{buildBranch}` build is obsolete, current master build offers at least the same level of performance and includes many additional improvements");
}
else if (items["build_unknown"] is "local_build")
{
if (items["build_commit"] is { Length: > 0 } commit && commit.Contains("AUR"))
notes.Add("❌ Unofficial AUR builds are not supported");
else if (items["build_number"] is "1" && items["os_type"] is "Linux")
notes.Add("❌ Flatpak builds are not supported");
else
notes.Add("❌ Unofficial builds are not supported");
}
if (DesIds.Contains(serial))
notes.Add(" If you experience infinite load screen, clear game cache via `File` → `All games` → `Remove Disk Cache`");

View File

@@ -24,7 +24,7 @@ internal static partial class LogParserResult
// RPCS3 v0.0.5-7104-a19113025 Alpha | HEAD
// RPCS3 v0.0.5-42b4ce13a Alpha | minor
// RPCS3 v0.0.18-local_build Alpha | local_build
[GeneratedRegex(@"RPCS3 v(?<version_string>(?<version>(\d|\.)+)(-(?<build>\d+))?-(?<commit>[0-9a-z_]+|unknown))( (?<stage>\w+))?( \| (?<branch>[^|\r\n]+))?( \| Firmware version: (?<fw_version_installed>[^|\r\n]+))?( \| (?<unknown>.*))?\r?$", DefaultSingleLine)]
[GeneratedRegex(@"RPCS3 v(?<version_string>(?<version>(\d|\.)+)(-(?<build>(\d|\.)+))?-(?<commit>([0-9a-z_]+|unknown)( \S+)??))( (?<stage>\w+))?( \| (?<branch>[^|\r\n]+))?( \| Firmware version: (?<fw_version_installed>[^|\r\n]+))?( \| (?<unknown>.*))?\r?$", DefaultSingleLine)]
private static partial Regex BuildInfoInLog();
[GeneratedRegex(@"(\d{1,2}(th|rd|nd|st) Gen)?(?<cpu_model>[^|@]+?)\s*(((CPU\s*)?@\s*(?<cpu_speed>.+)\s*GHz\s*)|((APU with|((with|w/) )?Radeon|R\d, \d+ Compute) [^|]+)|((\w+[\- ]Core )?Processor))?\s* \| (?<thread_count>\d+) Threads \| (?<memory_amount>[0-9\.\,]+) GiB RAM( \| TSC: (?<tsc>\S+))?( \| (?<cpu_extensions>.*?))?\r?$", DefaultSingleLine)]
private static partial Regex CpuInfoInLog();