@@ -55,6 +55,13 @@ import {
5555 installMcpForClient ,
5656 uninstallMcpForClient
5757} from './mcp-integrations'
58+ import {
59+ checkForAppUpdates ,
60+ downloadAppUpdate ,
61+ getAppUpdateState ,
62+ initAppUpdater ,
63+ installAppUpdate
64+ } from './updater'
5865import type { McpClientId , McpInstructionsPayload } from '@shared/mcp-clients'
5966import {
6067 instructionsFilePath ,
@@ -433,6 +440,12 @@ function registerIpc(): void {
433440 console . log ( `listFontFamilies: returning ${ list . length } families` )
434441 return list
435442 } )
443+ ipcMain . handle ( IPC . APP_UPDATER_GET_STATE , ( ) => getAppUpdateState ( ) )
444+ ipcMain . handle ( IPC . APP_UPDATER_CHECK , async ( ) => await checkForAppUpdates ( ) )
445+ ipcMain . handle ( IPC . APP_UPDATER_DOWNLOAD , async ( ) => await downloadAppUpdate ( ) )
446+ ipcMain . handle ( IPC . APP_UPDATER_INSTALL , ( ) => {
447+ installAppUpdate ( )
448+ } )
436449
437450 ipcMain . handle ( IPC . VAULT_GET_CURRENT , async ( ) => {
438451 if ( currentVault ) return currentVault
@@ -781,11 +794,18 @@ function installAppMenu(): void {
781794 submenu : [
782795 { label : 'About ZenNotes' , role : 'about' } ,
783796 { type : 'separator' } ,
797+ {
798+ label : 'Check for Updates…' ,
799+ click : ( ) => {
800+ void checkForAppUpdates ( )
801+ }
802+ } ,
803+ { type : 'separator' } ,
784804 {
785805 label : 'Settings…' ,
786806 accelerator : 'CmdOrCtrl+,' ,
787807 click : ( ) => {
788- mainWindow ?. webContents . send ( 'menu:open-settings' )
808+ mainWindow ?. webContents . send ( IPC . APP_OPEN_SETTINGS )
789809 }
790810 } ,
791811 { type : 'separator' } ,
@@ -877,6 +897,7 @@ app.whenReady().then(async () => {
877897
878898 installAppMenu ( )
879899 registerIpc ( )
900+ initAppUpdater ( )
880901 await createWindow ( )
881902
882903 app . on ( 'activate' , ( ) => {
0 commit comments