mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 18:09:59 +03:00
GH-4014 change updater to recognize new Qt 5.15.2 builds
This commit is contained in:
parent
cd87029e6f
commit
938f896bfa
13 changed files with 141 additions and 26 deletions
|
|
@ -2,13 +2,33 @@
|
|||
|
||||
#include <sys/utsname.h>
|
||||
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
Sys::KernelInfo Sys::getKernelInfo()
|
||||
{
|
||||
Sys::KernelInfo out;
|
||||
struct utsname buf;
|
||||
uname(&buf);
|
||||
out.kernelType = KernelType::Darwin;
|
||||
out.kernelName = buf.sysname;
|
||||
out.kernelVersion = buf.release;
|
||||
QString release = out.kernelVersion = buf.release;
|
||||
|
||||
// TODO: figure out how to detect cursed-ness (macOS emulated on linux via mad hacks and so on)
|
||||
out.isCursed = false;
|
||||
|
||||
out.kernelMajor = 0;
|
||||
out.kernelMinor = 0;
|
||||
out.kernelPatch = 0;
|
||||
auto sections = release.split('-');
|
||||
if(sections.size() >= 1) {
|
||||
auto versionParts = sections[0].split('.');
|
||||
if(sections.size() >= 3) {
|
||||
out.kernelMajor = sections[0].toInt();
|
||||
out.kernelMinor = sections[1].toInt();
|
||||
out.kernelPatch = sections[2].toInt();
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue