fix: 修复linux中so库加载的问题

This commit is contained in:
H3CoF6 committed 2026-03-18 03:54:38 +08:00
1 parent be7d173746
commit f4ad6bf263
2 files changed
+5 -1

No files matched your search

+2 -1
View File
@@ -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()
+3
View File
@@ -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)) {