import electronDebug from 'electron-debug' ; import { debug , error } from 'electron-log' ; import { sync } from 'shell-env' ; import { initLogger } from '../src/shared/utils' ; import { IS_DEV } from './constants' ; import { initWindowsDarkHack } from './hacks/windows' ; import WindowManager from './windowManager' ; initLogger ( ) ; process . env . ELECTRON_DISABLE_SECURITY_WARNINGS = `${ IS_DEV }` ; debug ( `Starting Electron main process` ) ; electronDebug ( { isEnabled : IS_DEV } ) ; process . env = { ... process . env , ... sync ( ) , } ; if ( IS_DEV && initWindowsDarkHack ( ) ) { debug ( '*** Applied Windows 10 Dark Mode Hack ***' ) ; } try { const windowManager = new WindowManager ( ) ; windowManager . start ( ) ; } catch ( e ) { error ( 'Unable to start WindowManager' , e ) ; }