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:
@@ -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() })
|
||||
|
||||
Reference in New Issue
Block a user