mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
Revert "Merge pull request #269 from keerthi16/skynet"
This reverts commit1388c835ef, reversing changes made toc9d6229d6d.
This commit is contained in:
committed by
Keerthi Niranjan
parent
5ed8e8f026
commit
3cf9226bf4
25
js/main.js
25
js/main.js
@@ -5,6 +5,7 @@ const electron = require('electron');
|
||||
const app = electron.app;
|
||||
const crashReporter = electron.crashReporter;
|
||||
const nodeURL = require('url');
|
||||
const shellPath = require('shell-path');
|
||||
const squirrelStartup = require('electron-squirrel-startup');
|
||||
const AutoLaunch = require('auto-launch');
|
||||
const urlParser = require('url');
|
||||
@@ -17,9 +18,23 @@ const protocolHandler = require('./protocolHandler');
|
||||
const getCmdLineArg = require('./utils/getCmdLineArg.js');
|
||||
const log = require('./log.js');
|
||||
const logLevels = require('./enums/logLevels.js');
|
||||
const { deleteIndexFolder } = require('./search/search.js');
|
||||
|
||||
require('electron-dl')();
|
||||
|
||||
//setting the env path child_process issue https://github.com/electron/electron/issues/7688
|
||||
shellPath()
|
||||
.then((path) => {
|
||||
process.env.PATH = path
|
||||
})
|
||||
.catch(() => {
|
||||
process.env.PATH = [
|
||||
'./node_modules/.bin',
|
||||
'/usr/local/bin',
|
||||
process.env.PATH
|
||||
].join(':');
|
||||
});
|
||||
|
||||
// used to check if a url was opened when the app was already open
|
||||
let isAppAlreadyOpen = false;
|
||||
|
||||
@@ -40,13 +55,13 @@ getConfigField('url')
|
||||
.catch(app.quit);
|
||||
|
||||
function initializeCrashReporter(podUrl) {
|
||||
|
||||
|
||||
getConfigField('crashReporter')
|
||||
.then((crashReporterConfig) => {
|
||||
crashReporter.start({companyName: crashReporterConfig.companyName, submitURL: crashReporterConfig.submitURL, uploadToServer: crashReporterConfig.uploadToServer, extra: {'process': 'main', podUrl: podUrl}});
|
||||
log.send(logLevels.INFO, 'initialized crash reporter on the main process!');
|
||||
})
|
||||
.catch((err) => {
|
||||
.catch((err) => {
|
||||
log.send(logLevels.ERROR, 'Unable to initialize crash reporter in the main process. Error is -> ' + err);
|
||||
});
|
||||
|
||||
@@ -149,6 +164,12 @@ app.on('activate', function() {
|
||||
}
|
||||
});
|
||||
|
||||
app.on('will-quit', function (e) {
|
||||
e.preventDefault();
|
||||
deleteIndexFolder();
|
||||
app.exit();
|
||||
});
|
||||
|
||||
// adds 'symphony' as a protocol
|
||||
// in the system. plist file in macOS
|
||||
// and registry keys in windows
|
||||
|
||||
Reference in New Issue
Block a user