From 4fbcf0e3196f26dc04b51a8bf0ce4fd9f533ae3d Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Mon, 9 Dec 2024 11:51:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=94=99=E8=AF=AF=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.js b/main.js index b13d136..48e23c6 100644 --- a/main.js +++ b/main.js @@ -8,6 +8,7 @@ const { ipcMain, clipboard, dialog, + crashReporter, desktopCapturer, } = require('electron'); const path = require('node:path') @@ -100,6 +101,11 @@ const additionalData = { myKey: 'myValue' } app.on('ready', () => { const gotTheLock = app.requestSingleInstanceLock(additionalData) if (gotTheLock) { + app.getPath('crashDumps') + crashReporter.start({ + uploadToServer: false, + ignoreSystemCrashHandler: false + }) env = process.argv.find((arg) => arg.startsWith('--env='))?.split('=')[1]; if (env === 'development') { Object.defineProperty(app, 'isPackaged', {