feat: auto-updater integration

- Install electron-updater
- New updater.ts: check/download/install with progress events
- IPC: updater:check, updater:download, updater:install, updater:status
- Preload bridge for updater API
- electron-builder publish config (github provider)
- Fix build files path: out -> electron-dist
- i18n keys for updater notifications (zh-CN + en)
This commit is contained in:
2026-07-05 22:13:25 +08:00
parent d131a2732d
commit 405dfa77c4
9 changed files with 163 additions and 11 deletions
+2
View File
@@ -3,6 +3,7 @@ import { app, BrowserWindow, nativeTheme, nativeImage } from 'electron'
import { join } from 'path'
import { restoreAndTrack } from './win-state'
import { registerIpcHandlers } from './ipc-handlers'
import { initUpdater } from './updater'
let mainWindow: BrowserWindow | null = null
@@ -55,6 +56,7 @@ function createWindow(): void {
app.whenReady().then(() => {
registerIpcHandlers()
createWindow()
initUpdater(mainWindow!)
})
app.on('window-all-closed', () => { app.quit() })