mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-04 04:23:55 -07:00
remove 32bit
This commit is contained in:
parent
9d4cf57c70
commit
3f9baf5cc8
1 changed files with 4 additions and 10 deletions
|
|
@ -27,8 +27,6 @@
|
||||||
#define GIT_SHORT_HASH_LEN 7
|
#define GIT_SHORT_HASH_LEN 7
|
||||||
|
|
||||||
ReleaseChannel::ReleaseChannel() : netMan(new QNetworkAccessManager(this)), response(nullptr), lastRelease(nullptr)
|
ReleaseChannel::ReleaseChannel() : netMan(new QNetworkAccessManager(this)), response(nullptr), lastRelease(nullptr)
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ReleaseChannel::~ReleaseChannel()
|
ReleaseChannel::~ReleaseChannel()
|
||||||
{
|
{
|
||||||
|
|
@ -45,7 +43,7 @@ void ReleaseChannel::checkForUpdates()
|
||||||
|
|
||||||
// Different release channel checking functions for different operating systems
|
// Different release channel checking functions for different operating systems
|
||||||
bool ReleaseChannel::downloadMatchesCurrentOS(const QString &fileName)
|
bool ReleaseChannel::downloadMatchesCurrentOS(const QString &fileName)
|
||||||
{
|
|
||||||
#if defined(Q_OS_MACOS)
|
#if defined(Q_OS_MACOS)
|
||||||
static QRegularExpression version_regex("macOS(\\d+)");
|
static QRegularExpression version_regex("macOS(\\d+)");
|
||||||
auto match = version_regex.match(fileName);
|
auto match = version_regex.match(fileName);
|
||||||
|
|
@ -59,7 +57,7 @@ bool ReleaseChannel::downloadMatchesCurrentOS(const QString &fileName)
|
||||||
char arch[255];
|
char arch[255];
|
||||||
size_t len = sizeof(arch);
|
size_t len = sizeof(arch);
|
||||||
if (sysctlbyname("machdep.cpu.brand_string", arch, &len, nullptr, 0) == 0) {
|
if (sysctlbyname("machdep.cpu.brand_string", arch, &len, nullptr, 0) == 0) {
|
||||||
// Intel mac is only supported on macOS 13 versions
|
// Intel Mac is only supported on macOS 13 versions
|
||||||
if (QString::fromUtf8(arch).contains("Intel")) {
|
if (QString::fromUtf8(arch).contains("Intel")) {
|
||||||
return 13;
|
return 13;
|
||||||
}
|
}
|
||||||
|
|
@ -74,13 +72,9 @@ bool ReleaseChannel::downloadMatchesCurrentOS(const QString &fileName)
|
||||||
return rel_maj == sys_maj;
|
return rel_maj == sys_maj;
|
||||||
|
|
||||||
#elif defined(Q_OS_WIN)
|
#elif defined(Q_OS_WIN)
|
||||||
#if Q_PROCESSOR_WORDSIZE == 4
|
#if Q_PROCESSOR_WORDSIZE == 8 // 64-bit
|
||||||
return fileName.contains("32bit");
|
|
||||||
#elif Q_PROCESSOR_WORDSIZE == 8
|
|
||||||
const QString &version = QSysInfo::productVersion();
|
const QString &version = QSysInfo::productVersion();
|
||||||
if (version.startsWith("7") || version.startsWith("8")) {
|
if (version.startsWith("10") {
|
||||||
return fileName.contains("Win7");
|
|
||||||
} else {
|
|
||||||
return fileName.contains("Win10");
|
return fileName.contains("Win10");
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue