feat(updater): apply updates without restarting the app
New app:selfupdate IPC (main process): npm run build + cargo build --release with the augmented PATH, then kill the backend child, reset the spawn flag so the next request starts the NEW binary, and reloadIgnoringCache every window. The Electron shell keeps running — no manual restart. Settings install now triggers it automatically when restart_required. Honest limits: a change to the Electron main process itself still needs one manual relaunch, and packaged builds report that bundle replacement is the update path.
This commit is contained in:
parent
4cc04812fe
commit
dcc701f88b
4 changed files with 113 additions and 1 deletions
|
|
@ -4,4 +4,6 @@ contextBridge.exposeInMainWorld('backend', {
|
|||
request: (method: string, params?: Record<string, unknown>): Promise<unknown> =>
|
||||
ipcRenderer.invoke('backend:request', { method, params }),
|
||||
copyText: (text: string): Promise<void> => ipcRenderer.invoke('clipboard:write', text),
|
||||
selfUpdate: (): Promise<{ reloaded: boolean; note: string }> =>
|
||||
ipcRenderer.invoke('app:selfupdate'),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue