diff --git a/src/main/bootstrap/index.ts b/src/main/bootstrap/index.ts index 6d8c259..1d41427 100644 --- a/src/main/bootstrap/index.ts +++ b/src/main/bootstrap/index.ts @@ -7,6 +7,8 @@ import { ErrorModal } from '../window/windows/error-modal' import { createTray } from './create-tray' import { createShortcut } from './create-shortcut' import { attach } from '../framework/runtime-events' +import { RunnerWindow } from '../window/windows/runner' +import { autoUpdater } from 'electron-updater' export interface BootstrapContext { app: App @@ -33,6 +35,12 @@ export async function boostrap(context: BootstrapContext): Promise { app.quit() } }) + app.on('ready', function () { + autoUpdater + .checkForUpdatesAndNotify() + .then((r) => console.log(r)) + .catch(console.error) + }) attach(context) @@ -48,7 +56,11 @@ export async function boostrap(context: BootstrapContext): Promise { app.on('activate', async function () { // On macOS it's common to re-create a window in the app when the // dock icon is clicked and there are no other windows open. - if (BrowserWindow.getAllWindows().length === 0) await createWindows(context) + if (BrowserWindow.getAllWindows().length === 0) { + await createWindows(context) + } else { + workspace.show(RunnerWindow) + } }) await workspace.commands.load()