Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ jobs:
name: Download artifacts
with:
path: release-artifacts/
merge-multiple: true

- name: Rename artifacts
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/create-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ jobs:
- uses: actions/download-artifact@v7
with:
path: build/
merge-multiple: true

- name: Download artifact
uses: dawidd6/action-download-artifact@v14
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.c7.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- Dev: Bumped Qt to 6.9.3 on Windows and macOS due to CVE-2025-10728 and CVE-2025-10729 (74077350da2d4cfff2ede0ce0ebb11654253b440)
- Dev: Updated the macOS Homebrew bottles on x86_64 to Sonoma as Ventura was EOL'd 2025-Sep-15 (#336)
- Dev: Preemptively treat version comparisons between `7.x.x` and `2.y.y` as upgrades (#372)
- Dev: Chatterino7 now provides ARM builds for Windows. These are still considered experimental. (#377)
- Dev: Chatterino7 now provides ARM builds for Windows. These are still considered experimental. (#377, #392)

## 7.5.4

Expand Down
46 changes: 27 additions & 19 deletions src/singletons/Updates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,27 @@ const QString CHATTERINO_OS = u"freebsd"_s;
const QString CHATTERINO_OS = u"unknown"_s;
#endif

QJsonValue getForArchitecture(const QJsonObject &obj, const QString &key)
{
auto val = obj[key];

#ifdef Q_PROCESSOR_ARM
QString armKey = key % u"_arm";
if (obj[armKey].isString())
{
val = obj[armKey];
}
#elifdef Q_PROCESSOR_X86
QString x86Key = key % u"_x86";
if (obj[x86Key].isString())
{
val = obj[x86Key];
}
#endif

return val;
}

} // namespace

namespace chatterino {
Expand Down Expand Up @@ -350,6 +371,10 @@ void Updates::checkForUpdates()

/// Version available on every platform
auto version = object["version"];
if (object["v2_version"_L1].isString())
{
version = object["v2_version"_L1].toString();
}

if (!version.isString())
{
Expand All @@ -361,24 +386,7 @@ void Updates::checkForUpdates()

# if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
/// Downloads an installer for the new version
auto updateExeUrl = object["updateexe"_L1];

# if defined(Q_PROCESSOR_ARM)

if (object["update_arm"_L1].isString())
{
updateExeUrl = object["update_arm"_L1];
}

# elif defined(Q_PROCESSOR_X86)

if (object["update_x86"_L1].isString())
{
updateExeUrl = object["update_x86"_L1];
}

# endif

auto updateExeUrl = getForArchitecture(object, u"updateexe"_s);
if (!updateExeUrl.isString())
{
this->setStatus_(SearchFailed);
Expand All @@ -391,7 +399,7 @@ void Updates::checkForUpdates()

# ifdef Q_OS_WIN
/// Windows portable
auto portableUrl = object["portable_download"];
auto portableUrl = getForArchitecture(object, "portable_download");
if (!portableUrl.isString())
{
this->setStatus_(SearchFailed);
Expand Down
Loading