Add self-update feature via GitHub Releases

Checks for updates on startup (silent, badge on button if available)
and on manual click. Downloads new portable .exe to temp dir, creates
a batch script to swap the running executable after quit, then relaunches.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Zac
2026-02-09 22:23:48 -05:00
parent cccb20bd31
commit 7309d78344
6 changed files with 555 additions and 1 deletions
+14
View File
@@ -19,5 +19,19 @@ contextBridge.exposeInMainWorld('electronAPI', {
console.error('Extension cookie handler error:', error);
}
});
},
// Self-update functionality
checkForUpdates: () => ipcRenderer.invoke('check-for-updates'),
downloadAndInstallUpdate: (params) => ipcRenderer.invoke('download-and-install-update', params),
getCurrentVersion: () => ipcRenderer.invoke('get-current-version'),
onUpdateDownloadProgress: (callback) => {
ipcRenderer.on('update-download-progress', (event, data) => {
try {
callback(data);
} catch (error) {
console.error('Update download progress handler error:', error);
}
});
}
});