2016-11-20 11:32:27 +00:00
|
|
|
#pragma once
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
namespace Sys
|
|
|
|
{
|
2017-07-11 21:43:35 +01:00
|
|
|
const uint64_t megabyte = 1024ull * 1024ull;
|
2016-11-26 01:18:05 +00:00
|
|
|
struct KernelInfo
|
|
|
|
{
|
|
|
|
QString kernelName;
|
|
|
|
QString kernelVersion;
|
|
|
|
};
|
|
|
|
|
|
|
|
KernelInfo getKernelInfo();
|
2016-11-21 23:57:15 +00:00
|
|
|
|
2018-03-11 22:00:54 +00:00
|
|
|
struct DistributionInfo
|
|
|
|
{
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
|
|
|
DistributionInfo getDistributionInfo();
|
|
|
|
|
2016-11-21 23:57:15 +00:00
|
|
|
uint64_t getSystemRam();
|
|
|
|
|
|
|
|
bool isSystem64bit();
|
|
|
|
|
|
|
|
bool isCPU64bit();
|
2016-11-20 11:32:27 +00:00
|
|
|
}
|