fix(updater): use desktop host updater from web (#3227)
This commit is contained in:
@@ -96,7 +96,7 @@ Running a packaged Linux AppImage requires FUSE (`libfuse.so.2`, typically `libf
|
||||
|
||||
Desktop clears AppImage `ARGV0` from `process.env` before probing the login shell and starting the in-process server. Leaving it set makes zsh rewrite argv[0] for integrated-terminal and managed-OpenCode child commands to the AppImage path.
|
||||
|
||||
Linux updates are supported only when the packaged app is running from a writable AppImage. Update checks, downloads, and installation report an actionable error when `APPIMAGE` is missing, invalid, or read-only; a missing release feed (`latest-linux.yml` 404 before the first Linux publish) is treated as “no update available”. macOS and Windows updater behavior is unchanged. Release builds keep `latest-linux.yml` (x64) and `latest-linux-arm64.yml` separate and validate each manifest against its AppImage before upload. Linux AppImages download full updates (no `.blockmap` differential channel yet).
|
||||
Linux updates are supported only when the packaged app is running from a writable AppImage. Update checks, downloads, and installation report an actionable error when `APPIMAGE` is missing, invalid, or read-only; a missing release feed (`latest-linux.yml` 404 before the first Linux publish) is treated as “no update available”. Authenticated Web clients connected to the embedded Desktop Host use this same `electron-updater` check, download, and restart flow rather than a package-manager command. macOS and Windows updater behavior is unchanged. Release builds keep `latest-linux.yml` (x64) and `latest-linux-arm64.yml` separate and validate each manifest against its AppImage before upload. Linux AppImages download full updates (no `.blockmap` differential channel yet).
|
||||
|
||||
`desktop_restart` does not answer the renderer before the install is decided. On the apply-update path it calls `quitAndInstall()` and keeps the IPC call open until the app quits or `autoUpdater` emits `error`, which the platform installers do asynchronously (a rejected code signature, or a Squirrel session disabled by an earlier failure). A failed install rejects the IPC call so the update dialog can show it, and the quit/install flags are rolled back because the app is staying up. A still-running app after the grace period resolves the call.
|
||||
|
||||
|
||||
@@ -1621,6 +1621,16 @@ const spawnLocalServer = async () => {
|
||||
apiBaseUrl: state.apiBaseUrl || '',
|
||||
requestHeaders: sanitizeRuntimeRequestHeaders(state.requestHeaders || {}),
|
||||
}),
|
||||
desktopUpdater: {
|
||||
check: () => handleInvoke(null, 'desktop_check_for_updates'),
|
||||
install: async () => {
|
||||
const updateInfo = await handleInvoke(null, 'desktop_check_for_updates');
|
||||
if (!updateInfo.available) return updateInfo;
|
||||
await handleInvoke(null, 'desktop_download_and_install_update');
|
||||
return updateInfo;
|
||||
},
|
||||
restart: () => handleInvoke(null, 'desktop_restart'),
|
||||
},
|
||||
});
|
||||
|
||||
const port = handle.getPort();
|
||||
|
||||
Reference in New Issue
Block a user