From d23f381dfa7d85acfa198a20d5cf5b202676b297 Mon Sep 17 00:00:00 2001 From: Rosalie Wanders Date: Fri, 5 Dec 2025 17:53:54 +0100 Subject: [PATCH] RMG: allow different updater filename in UpdateDialog.cpp --- .../Dialog/Update/UpdateDialog.cpp | 30 ++++++------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/Source/RMG/UserInterface/Dialog/Update/UpdateDialog.cpp b/Source/RMG/UserInterface/Dialog/Update/UpdateDialog.cpp index 69b84320..912c8011 100644 --- a/Source/RMG/UserInterface/Dialog/Update/UpdateDialog.cpp +++ b/Source/RMG/UserInterface/Dialog/Update/UpdateDialog.cpp @@ -83,30 +83,18 @@ void UpdateDialog::accept(void) QString url = object.value("browser_download_url").toString(); #ifdef _WIN32 - if (this->isWin32Setup) + if (((QSysInfo::buildCpuArchitecture() == "x86_64" && lowerFilename.contains("windows64")) || + lowerFilename.contains("windows-" + QSysInfo::buildCpuArchitecture())) && + lowerFilename.contains(this->isWin32Setup ? "setup" : "portable") && + lowerFilename.endsWith(this->isWin32Setup ? ".exe" : ".zip")) { - if (lowerFilename.contains("windows64") && - lowerFilename.contains("setup") && - lowerFilename.endsWith(".exe")) - { - filenameToDownload = filename; - urlToDownload = QUrl(url); - break; - } - } - else - { - if (lowerFilename.contains("windows64") && - lowerFilename.contains("portable") && - lowerFilename.endsWith(".zip")) - { - filenameToDownload = filename; - urlToDownload = QUrl(url); - break; - } + filenameToDownload = filename; + urlToDownload = QUrl(url); + break; } #else - if (lowerFilename.contains("linux64") && + if (((QSysInfo::buildCpuArchitecture() == "x86_64" && lowerFilename.contains("linux64")) || + lowerFilename.contains("linux-" + QSysInfo::buildCpuArchitecture())) && lowerFilename.contains("portable") && lowerFilename.endsWith(".appimage")) {