2020-05-21 07:38:44 +02:00
|
|
|
import SingleInstance from "single-instance";
|
2020-05-22 10:25:19 +02:00
|
|
|
import {app} from "electron";
|
2020-01-03 15:01:15 +01:00
|
|
|
|
2020-01-10 15:02:21 +01:00
|
|
|
import Meta from "./Meta";
|
2020-05-22 10:25:19 +02:00
|
|
|
import Application from "./Application";
|
2020-01-03 15:01:15 +01:00
|
|
|
|
2020-11-17 12:11:41 +01:00
|
|
|
// Fix for twitter (and others) in webviews - pending https://github.com/electron/electron/issues/25469
|
|
|
|
app.commandLine.appendSwitch('disable-features', 'CrossOriginOpenerPolicy');
|
|
|
|
|
2020-05-22 10:25:19 +02:00
|
|
|
const application = new Application(Meta.isDevMode());
|
2020-05-21 07:38:44 +02:00
|
|
|
|
|
|
|
// Check if application is already running
|
|
|
|
const lock = new SingleInstance('tabs-app');
|
|
|
|
lock.lock().then(() => {
|
|
|
|
app.on('ready', () => {
|
2020-05-22 10:25:19 +02:00
|
|
|
application.start().catch(console.error);
|
2020-05-21 07:38:44 +02:00
|
|
|
});
|
|
|
|
}).catch(err => {
|
|
|
|
console.error(err);
|
|
|
|
process.exit(0);
|
2020-04-18 15:14:13 +02:00
|
|
|
});
|