mirror of
https://github.com/HiMeditator/auto-caption.git
synced 2026-02-23 18:24:44 +08:00
feat(main): 修改 python 子进程与主程序的通信方式,由 WebSocket 改为 IPC 通信
This commit is contained in:
@@ -2,9 +2,9 @@ import { app, BrowserWindow } from 'electron'
|
||||
import { electronApp, optimizer } from '@electron-toolkit/utils'
|
||||
import { controlWindow } from './control'
|
||||
import { captionWindow } from './caption'
|
||||
import { WebSocketConnector } from './wsConnector'
|
||||
|
||||
const wsConnector = new WebSocketConnector()
|
||||
import { PythonProcess } from './pythonProcess'
|
||||
const pySubProcess = new PythonProcess()
|
||||
|
||||
app.whenReady().then(() => {
|
||||
electronApp.setAppUserModelId('com.himeditator.autocaption')
|
||||
@@ -18,7 +18,7 @@ app.whenReady().then(() => {
|
||||
|
||||
controlWindow.createWindow()
|
||||
|
||||
wsConnector.connect()
|
||||
pySubProcess.start()
|
||||
|
||||
app.on('activate', function () {
|
||||
if (BrowserWindow.getAllWindows().length === 0){
|
||||
|
||||
Reference in New Issue
Block a user