[*] Improve Linux AuSwInfo
This commit is contained in:
parent
de739b8e1f
commit
5951724374
@ -92,13 +92,26 @@ namespace Aurora::SWInfo
|
||||
}
|
||||
});
|
||||
|
||||
for (const auto &line : versionNumbers)
|
||||
std::sort(versionNumbers.begin(), versionNumbers.end(), [](const AuString &str, const AuString &strb)
|
||||
{
|
||||
return str.length() >= strb.length();
|
||||
});
|
||||
|
||||
for (auto &line : versionNumbers)
|
||||
{
|
||||
if (line.size() > 2 && line[0] == '"' && line[line.size() - 1] == '"')
|
||||
{
|
||||
line = line.substr(1, line.size() - 2);
|
||||
}
|
||||
|
||||
if (ProcessVersionLine(osInfo, line))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// generic server/*erver (Server/server) distros
|
||||
osInfo.bIsServer |= osRel.find("erver") != AuString::npos;
|
||||
}
|
||||
|
||||
static bool ProcessVersionLineParts(OSInformation &osInfo, const AuString &line)
|
||||
@ -187,7 +200,7 @@ namespace Aurora::SWInfo
|
||||
|
||||
void InitLinuxInfo(OSInformation &osInfo)
|
||||
{
|
||||
osInfo = AuMove(OSInformation(&gKernelString, &gUserlandBrand, &gUserlandDesktopEnv, &gBuildString, Aurora::Build::EPlatform::eEnumInvalid));
|
||||
osInfo = AuMove(OSInformation(&gKernelString, &gUserlandBrand, &gUserlandDesktopEnv, &gBuildString, Aurora::Build::EPlatform::kEPlatformEnumInvalid));
|
||||
|
||||
SetProcVersion();
|
||||
SetVersion(osInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user