Skip to content
This repository was archived by the owner on Mar 25, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 5 additions & 0 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
"speech_start_speaking": "Start Speaking",
"speech_stop_speaking": "Stop Speaking"
},
"eol": {
"no_more_updates": "You are running an unsupported version of macOS. Please upgrade to receive %(brand)s updates.",
"title": "System unsupported",
"warning": "You are running an unsupported version of macOS. Please upgrade to ensure %(brand)s keeps working."
},
"file_menu": {
"label": "File"
},
Expand Down
32 changes: 31 additions & 1 deletion src/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ Please see LICENSE files in the repository root for full details.

import { app, autoUpdater, ipcMain } from "electron";
import fs from "node:fs/promises";
import os from "node:os";

import { getSquirrelExecutable } from "./squirrelhooks.js";
import { _t } from "./language-helper.js";

const UPDATE_POLL_INTERVAL_MS = 60 * 60 * 1000;
const INITIAL_UPDATE_DELAY_MS = 30 * 1000;
Expand Down Expand Up @@ -128,7 +130,35 @@ async function available(updateBaseUrl?: string): Promise<boolean> {
}

// Otherwise we're either on macOS or Windows with Squirrel
return !!updateBaseUrl;
if (!updateBaseUrl) {
return false;
}

if (process.platform === "darwin") {
// OS release returns the Darwin kernel version, not the macOS version, see
// https://en.wikipedia.org/wiki/Darwin_(operating_system)#Release_history to interpret it
const release = os.release();
const major = parseInt(release.split(".")[0], 10);

if (major < 21) {
// If the macOS version is too old for modern Electron support then disable auto update to prevent the app updating and bricking itself.
// The oldest macOS version supported by Chromium/Electron 38 is Monterey (12.x) which started with Darwin 21.0
ipcMain.emit("showToast", {
title: _t("eol|title"),
description: _t("eol|no_more_updates", { brand: global.trayConfig.brand }),
});
return false;
} else if (major < 22) {
// If the macOS version is EOL then show a warning message.
// The oldest macOS version still supported by Apple is Ventura (13.x) which started with Darwin 22.0
ipcMain.emit("showToast", {
title: _t("eol|title"),
description: _t("eol|warning", { brand: global.trayConfig.brand }),
});
}
}

return true;
Comment thread
t3chguy marked this conversation as resolved.
}

ipcMain.on("install_update", installUpdate);
Expand Down
Loading