Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Raven from 'raven';
- import { app, globalShortcut } from 'electron';
- import { ApplicationManager, MainWindow } from './app';
- let mainWindow = null;
- let dev = false;
- if (process.defaultApp || /[\\/]electron[\\/]/.test(process.execPath)) {
- dev = true;
- }
- global.dev = dev;
- if (!dev) {
- Raven.config('https://c561764525994abbb3ca1faae8e6f460@sentry.gamecredits.org/6', {
- release: app.getVersion()
- }).install();
- }
- app.on('ready', () => {
- mainWindow = new MainWindow(dev, __dirname, ApplicationManager);
- ApplicationManager.init(mainWindow);
- globalShortcut.register('CommandOrControl+Shift+K', () => {
- mainWindow.browserWindow.webContents.openDevTools();
- });
- });
- app.on('window-all-closed', () => {
- ApplicationManager.close();
- // On macOS it is common for applications and their menu bar
- // to stay active until the user quits explicitly with Cmd + Q
- if (process.platform !== 'darwin') {
- app.quit();
- }
- });
- app.on('activate', () => {
- // On macOS it's common to re-create a window in the app when the
- // dock icon is clicked and there are no other windows open.
- if (mainWindow === null) {
- mainWindow = new MainWindow(dev);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement