mirror of
https://github.com/cupcakearmy/unpixel.git
synced 2024-12-23 00:26:27 +00:00
34 lines
694 B
TypeScript
34 lines
694 B
TypeScript
|
import { app } from 'electron'
|
||
|
import logger from 'electron-log'
|
||
|
|
||
|
import TrayUtility from './tray'
|
||
|
import Settings from './settings'
|
||
|
import Banner from './banner'
|
||
|
|
||
|
export const DEV = !app.isPackaged
|
||
|
|
||
|
// Disable gpu
|
||
|
app.disableHardwareAcceleration()
|
||
|
app.commandLine.appendSwitch('disable-software-rasterizer')
|
||
|
|
||
|
logger.catchErrors({ showDialog: true })
|
||
|
logger.log('Starting')
|
||
|
app
|
||
|
.whenReady()
|
||
|
.then(() => {
|
||
|
logger.log('Initializing')
|
||
|
if (!DEV) app.dock.hide()
|
||
|
TrayUtility.init()
|
||
|
Settings.init()
|
||
|
Banner.init()
|
||
|
logger.log('Done')
|
||
|
})
|
||
|
.catch((e) => {
|
||
|
logger.error(e)
|
||
|
process.exit(1)
|
||
|
})
|
||
|
|
||
|
app.on('window-all-closed', () => {
|
||
|
// Prevent closing of the app
|
||
|
})
|