From f4ad6bf2637a9d0e8855f3367ff06f5c33c34f3c Mon Sep 17 00:00:00 2001 From: H3CoF6 Date: Wed, 18 Mar 2026 03:54:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dlinux=E4=B8=ADso?= =?UTF-8?q?=E5=BA=93=E5=8A=A0=E8=BD=BD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/main.ts | 3 ++- electron/services/wcdbCore.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/electron/main.ts b/electron/main.ts index 62e5574..dd113d7 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -17,6 +17,7 @@ import { annualReportService } from './services/annualReportService' import { exportService, ExportOptions, ExportProgress } from './services/exportService' import { KeyService } from './services/keyService' import { KeyServiceMac } from './services/keyServiceMac' +import { KeyServiceLinux} from "./services/keyServiceLinux" import { voiceTranscribeService } from './services/voiceTranscribeService' import { videoService } from './services/videoService' import { snsService, isVideoUrl } from './services/snsService' @@ -95,7 +96,7 @@ let keyService: any if (process.platform === 'darwin') { keyService = new KeyServiceMac() } else if (process.platform === 'linux') { - const { KeyServiceLinux } = require('./services/keyServiceLinux') + // const { KeyServiceLinux } = require('./services/keyServiceLinux') keyService = new KeyServiceLinux() } else { keyService = new KeyService() diff --git a/electron/services/wcdbCore.ts b/electron/services/wcdbCore.ts index b946a67..a54a460 100644 --- a/electron/services/wcdbCore.ts +++ b/electron/services/wcdbCore.ts @@ -551,6 +551,7 @@ export class WcdbCore { const dllDir = dirname(dllPath) const isMac = process.platform === 'darwin' + const isLinux = process.platform === 'linux' // 预加载依赖库 if (isMac) { @@ -564,6 +565,8 @@ export class WcdbCore { this.writeLog(`预加载 libWCDB.dylib 失败: ${String(e)}`) } } + } else if (isLinux) { + // 如果有libWCDB.so的话, 没有就算了 } else { const wcdbCorePath = join(dllDir, 'WCDB.dll') if (existsSync(wcdbCorePath)) {