refactor: 重构环境检查逻辑,添加环境不完整提示页面

This commit is contained in:
2025-09-14 02:04:31 +08:00
parent a15b2bd8ce
commit 4d8d71f294
6 changed files with 296 additions and 34 deletions

View File

@@ -19,9 +19,11 @@ contextBridge.exposeInMainWorld('electronAPI', {
// 初始化相关API
checkEnvironment: () => ipcRenderer.invoke('check-environment'),
checkCriticalFiles: () => ipcRenderer.invoke('check-critical-files'),
downloadPython: (mirror?: string) => ipcRenderer.invoke('download-python', mirror),
installPip: () => ipcRenderer.invoke('install-pip'),
downloadGit: () => ipcRenderer.invoke('download-git'),
checkGitUpdate: () => ipcRenderer.invoke('check-git-update'),
installDependencies: (mirror?: string) => ipcRenderer.invoke('install-dependencies', mirror),
cloneBackend: (repoUrl?: string) => ipcRenderer.invoke('clone-backend', repoUrl),
updateBackend: (repoUrl?: string) => ipcRenderer.invoke('update-backend', repoUrl),