Files
feiqiu-ETL/etl_billiards/run_gui.ps1
2026-01-27 22:45:50 +08:00

43 lines
1.1 KiB
PowerShell
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PowerShell 启动脚本
# 飞球 ETL 管理系统
$ErrorActionPreference = "Stop"
$OutputEncoding = [System.Text.Encoding]::UTF8
Write-Host "===================================="
Write-Host " 飞球 ETL 管理系统"
Write-Host "===================================="
Write-Host ""
# 切换到脚本目录
Set-Location $PSScriptRoot
# 检查 Python
try {
$pythonVersion = python --version 2>&1
Write-Host "Python 版本: $pythonVersion"
} catch {
Write-Host "[错误] 未找到 Python请先安装 Python 3.10+" -ForegroundColor Red
Read-Host "按回车键退出"
exit 1
}
# 检查 PySide6
$hasPySide6 = python -c "import PySide6" 2>&1
if ($LASTEXITCODE -ne 0) {
Write-Host "[提示] 正在安装 GUI 依赖..." -ForegroundColor Yellow
pip install PySide6
}
# 启动 GUI
Write-Host ""
Write-Host "正在启动 GUI..." -ForegroundColor Cyan
python -m gui.main
if ($LASTEXITCODE -ne 0) {
Write-Host ""
Write-Host "[错误] 启动失败" -ForegroundColor Red
Write-Host "请运行: pip install -r requirements.txt"
Read-Host "按回车键退出"
}