2016-11-20 17:02:27 +05:30
|
|
|
#pragma once
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
namespace Sys
|
|
|
|
{
|
2021-06-23 14:25:09 +05:30
|
|
|
const uint64_t mebibyte = 1024ull * 1024ull;
|
2021-09-05 00:57:09 +05:30
|
|
|
|
|
|
|
enum class KernelType {
|
|
|
|
Undetermined,
|
|
|
|
Windows,
|
|
|
|
Darwin,
|
|
|
|
Linux
|
|
|
|
};
|
|
|
|
|
2016-11-26 06:48:05 +05:30
|
|
|
struct KernelInfo
|
|
|
|
{
|
2018-07-15 18:21:05 +05:30
|
|
|
QString kernelName;
|
|
|
|
QString kernelVersion;
|
2021-09-05 00:57:09 +05:30
|
|
|
|
|
|
|
KernelType kernelType = KernelType::Undetermined;
|
|
|
|
int kernelMajor = 0;
|
|
|
|
int kernelMinor = 0;
|
|
|
|
int kernelPatch = 0;
|
|
|
|
bool isCursed = false;
|
2016-11-26 06:48:05 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
KernelInfo getKernelInfo();
|
2016-11-22 05:27:15 +05:30
|
|
|
|
2018-03-12 03:30:54 +05:30
|
|
|
struct DistributionInfo
|
|
|
|
{
|
2018-07-15 18:21:05 +05:30
|
|
|
DistributionInfo operator+(const DistributionInfo& rhs) const
|
|
|
|
{
|
|
|
|
DistributionInfo out;
|
|
|
|
if(!distributionName.isEmpty())
|
|
|
|
{
|
|
|
|
out.distributionName = distributionName;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
out.distributionName = rhs.distributionName;
|
|
|
|
}
|
|
|
|
if(!distributionVersion.isEmpty())
|
|
|
|
{
|
|
|
|
out.distributionVersion = distributionVersion;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
out.distributionVersion = rhs.distributionVersion;
|
|
|
|
}
|
|
|
|
return out;
|
|
|
|
}
|
|
|
|
QString distributionName;
|
|
|
|
QString distributionVersion;
|
2018-03-12 03:30:54 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
DistributionInfo getDistributionInfo();
|
|
|
|
|
2016-11-22 05:27:15 +05:30
|
|
|
uint64_t getSystemRam();
|
|
|
|
|
|
|
|
bool isSystem64bit();
|
|
|
|
|
|
|
|
bool isCPU64bit();
|
2016-11-20 17:02:27 +05:30
|
|
|
}
|