mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-12 03:56:15 -08:00
36 lines
1006 B
TypeScript
36 lines
1006 B
TypeScript
import { app, BrowserWindow } from 'electron';
|
|
import App from './app/app';
|
|
import ElectronEvents from './app/events/electron.events';
|
|
import PlaylistEvents from './app/events/playlist.events';
|
|
import SquirrelEvents from './app/events/squirrel.events';
|
|
|
|
export default class Main {
|
|
static initialize() {
|
|
if (SquirrelEvents.handleEvents()) {
|
|
// squirrel event handled (except first run event) and app will exit in 1000ms, so don't do anything else
|
|
app.quit();
|
|
}
|
|
}
|
|
|
|
static bootstrapApp() {
|
|
App.main(app, BrowserWindow);
|
|
}
|
|
|
|
static bootstrapAppEvents() {
|
|
ElectronEvents.bootstrapElectronEvents();
|
|
PlaylistEvents.bootstrapPlaylistEvents();
|
|
|
|
// initialize auto updater service
|
|
if (!App.isDevelopmentMode()) {
|
|
// UpdateEvents.initAutoUpdateService();
|
|
}
|
|
}
|
|
}
|
|
|
|
// handle setup events as quickly as possible
|
|
Main.initialize();
|
|
|
|
// bootstrap app
|
|
Main.bootstrapApp();
|
|
Main.bootstrapAppEvents();
|