feat: add download and install update functionality in IPC
Some checks failed
Build / increment-version (push) Successful in 6s
Build / build-linux (push) Failing after 51s
Build / build-windows (push) Failing after 2m11s
Build / create-release (push) Has been skipped
Build Paarrot Windows / start-vm (push) Failing after 5m34s
Build Paarrot Windows / build (push) Has been skipped
Some checks failed
Build / increment-version (push) Successful in 6s
Build / build-linux (push) Failing after 51s
Build / build-windows (push) Failing after 2m11s
Build / create-release (push) Has been skipped
Build Paarrot Windows / start-vm (push) Failing after 5m34s
Build Paarrot Windows / build (push) Has been skipped
This commit is contained in:
@@ -934,6 +934,21 @@ ipcMain.handle('install-update', () => {
|
||||
return { success: true };
|
||||
});
|
||||
|
||||
ipcMain.handle('download-and-install-update', async () => {
|
||||
if (isDev) {
|
||||
return { success: false, error: 'Updates are not available in development mode' };
|
||||
}
|
||||
try {
|
||||
const result = await downloadGiteaUpdate();
|
||||
if (!result.opened) {
|
||||
installGiteaUpdate();
|
||||
}
|
||||
return { success: true, data: result };
|
||||
} catch (error) {
|
||||
return { success: false, error: error.message };
|
||||
}
|
||||
});
|
||||
|
||||
// Screen capture / desktopCapturer handler
|
||||
ipcMain.handle('get-desktop-sources', async (event, opts) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user