mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-24 12:32:42 +00:00
GH-4014 change updater to recognize new Qt 5.15.2 builds
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user