feat: 浏览器自动化操作开发
This commit is contained in:
@@ -3,21 +3,23 @@ import { CONFIG_KEYS } from '@common/constants'
|
||||
import { setupMainWindow } from './wins';
|
||||
import started from 'electron-squirrel-startup'
|
||||
import configManager from '@main/service/config-service'
|
||||
import logManager from '@main/service/logger'
|
||||
import { runTaskOperationService } from '@main/process/runTaskOperationService'
|
||||
import log from 'electron-log';
|
||||
// import logManager from '@main/service/logger'
|
||||
|
||||
|
||||
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
|
||||
if (started) {
|
||||
app.quit();
|
||||
}
|
||||
|
||||
process.on('uncaughtException', (err) => {
|
||||
logManager.error('uncaughtException', err);
|
||||
});
|
||||
// process.on('uncaughtException', (err) => {
|
||||
// logManager.error('uncaughtException', err);
|
||||
// });
|
||||
|
||||
process.on('unhandledRejection', (reason, promise) => {
|
||||
logManager.error('unhandledRejection', reason, promise);
|
||||
});
|
||||
// process.on('unhandledRejection', (reason, promise) => {
|
||||
// logManager.error('unhandledRejection', reason, promise);
|
||||
// });
|
||||
|
||||
app.whenReady().then(() => {
|
||||
setupMainWindow();
|
||||
@@ -33,7 +35,7 @@ app.whenReady().then(() => {
|
||||
// explicitly with Cmd + Q.
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin' && !configManager.get(CONFIG_KEYS.MINIMIZE_TO_TRAY)) {
|
||||
logManager.info('app closing due to all windows being closed');
|
||||
log.info('app closing due to all windows being closed');
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user