import "source-map-support/register" ; import { app } from "electron" ; import { platform } from "os" ; import { update as initAutoLaunch } from "./managers/launchManager" ; import { init as initSocket } from "./managers/socketManager" ; import { TrayManager } from "./managers/trayManager" ; import { checkForUpdate } from "./util/updateChecker" ; export let trayManager ; export let updateCheckerInterval = null ; let singleInstanceLock = app . requestSingleInstanceLock ( ) ; if ( ! singleInstanceLock ) app . quit ( ) ; app . setAppUserModelId ( "Timeraa.PreMiD" ) ; app . whenReady ( ) . then ( async ( ) => { trayManager = new TrayManager ( ) ; await Promise . all ( [ checkForUpdate ( true ) , initAutoLaunch ( ) , initSocket ( ) ] ) ; app . isPackaged ? ( updateCheckerInterval = setInterval ( checkForUpdate , 15 * 1000 * 60 ) ) : undefined ; if ( platform ( ) === "darwin" ) app . dock . hide ( ) ; } ) ;