remove unused beta file endings (#3338)
This commit is contained in:
parent
283ce23111
commit
f1eab4e26a
1 changed files with 2 additions and 6 deletions
|
@ -9,8 +9,8 @@
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
|
|
||||||
#define STABLERELEASE_URL "https://api.github.com/repos/Cockatrice/Cockatrice/releases/latest"
|
#define STABLERELEASE_URL "https://api.github.com/repos/Cockatrice/Cockatrice/releases/latest"
|
||||||
#define STABLETAG_URL "https://api.github.com/repos/Cockatrice/Cockatrice/git/refs/tags/"
|
|
||||||
#define STABLEMANUALDOWNLOAD_URL "https://github.com/Cockatrice/Cockatrice/releases/latest"
|
#define STABLEMANUALDOWNLOAD_URL "https://github.com/Cockatrice/Cockatrice/releases/latest"
|
||||||
|
#define STABLETAG_URL "https://api.github.com/repos/Cockatrice/Cockatrice/git/refs/tags/"
|
||||||
|
|
||||||
#define BETARELEASE_URL "https://api.github.com/repos/Cockatrice/Cockatrice/releases"
|
#define BETARELEASE_URL "https://api.github.com/repos/Cockatrice/Cockatrice/releases"
|
||||||
#define BETAMANUALDOWNLOAD_URL "https://github.com/Cockatrice/Cockatrice/releases/"
|
#define BETAMANUALDOWNLOAD_URL "https://github.com/Cockatrice/Cockatrice/releases/"
|
||||||
|
@ -53,22 +53,18 @@ bool ReleaseChannel::downloadMatchesCurrentOS(const QString &fileName)
|
||||||
{
|
{
|
||||||
QString wordSize = QSysInfo::buildAbi().split('-')[2];
|
QString wordSize = QSysInfo::buildAbi().split('-')[2];
|
||||||
QString arch;
|
QString arch;
|
||||||
QString betaEnd;
|
|
||||||
|
|
||||||
if (wordSize == "llp64") {
|
if (wordSize == "llp64") {
|
||||||
arch = "win64";
|
arch = "win64";
|
||||||
betaEnd = "-x86_64_qt5";
|
|
||||||
} else if (wordSize == "ilp32") {
|
} else if (wordSize == "ilp32") {
|
||||||
arch = "win32";
|
arch = "win32";
|
||||||
betaEnd = "-x86_qt5";
|
|
||||||
} else {
|
} else {
|
||||||
qWarning() << "Error checking for upgrade version: wordSize is" << wordSize;
|
qWarning() << "Error checking for upgrade version: wordSize is" << wordSize;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto exeName = arch + ".exe";
|
auto exeName = arch + ".exe";
|
||||||
auto exeBetaName = betaEnd + ".exe";
|
return (fileName.endsWith(exeName));
|
||||||
return (fileName.endsWith(exeName) || fileName.endsWith(exeBetaName));
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue