mirror of
https://github.com/cupcakearmy/unpixel.git
synced 2026-04-02 12:25:22 +00:00
initial commit
This commit is contained in:
33
src/back/index.ts
Normal file
33
src/back/index.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
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
|
||||
})
|
||||
Reference in New Issue
Block a user