添加错误日志
This commit is contained in:
parent
a20c833de0
commit
4fbcf0e319
6
main.js
6
main.js
|
|
@ -8,6 +8,7 @@ const {
|
||||||
ipcMain,
|
ipcMain,
|
||||||
clipboard,
|
clipboard,
|
||||||
dialog,
|
dialog,
|
||||||
|
crashReporter,
|
||||||
desktopCapturer,
|
desktopCapturer,
|
||||||
} = require('electron');
|
} = require('electron');
|
||||||
const path = require('node:path')
|
const path = require('node:path')
|
||||||
|
|
@ -100,6 +101,11 @@ const additionalData = { myKey: 'myValue' }
|
||||||
app.on('ready', () => {
|
app.on('ready', () => {
|
||||||
const gotTheLock = app.requestSingleInstanceLock(additionalData)
|
const gotTheLock = app.requestSingleInstanceLock(additionalData)
|
||||||
if (gotTheLock) {
|
if (gotTheLock) {
|
||||||
|
app.getPath('crashDumps')
|
||||||
|
crashReporter.start({
|
||||||
|
uploadToServer: false,
|
||||||
|
ignoreSystemCrashHandler: false
|
||||||
|
})
|
||||||
env = process.argv.find((arg) => arg.startsWith('--env='))?.split('=')[1];
|
env = process.argv.find((arg) => arg.startsWith('--env='))?.split('=')[1];
|
||||||
if (env === 'development') {
|
if (env === 'development') {
|
||||||
Object.defineProperty(app, 'isPackaged', {
|
Object.defineProperty(app, 'isPackaged', {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue