From 40adf507024b099522336f8bcf569d6d096343b3 Mon Sep 17 00:00:00 2001 From: panda <1415243231@qq.com> Date: Sat, 23 May 2026 09:15:44 +0800 Subject: [PATCH] fix: add chcp 65001 and .venv check to startup scripts --- start.bat | 8 ++++++++ start_all.bat | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/start.bat b/start.bat index bd142ca..53e6c58 100644 --- a/start.bat +++ b/start.bat @@ -1,10 +1,18 @@ @echo off +chcp 65001 >nul setlocal enabledelayedexpansion echo ================================================ echo agent_jrxml 启动 (API + 验证) echo ================================================ cd /d "%~dp0" +:: 环境检查 +if not exist "%~dp0.venv\Scripts\python.exe" ( + echo [错误] 未找到 .venv,请先创建虚拟环境 + pause + exit /b 1 +) + :: 清理残留进程 echo [清理] 检查残留进程... for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":8000.*LISTENING"') do ( diff --git a/start_all.bat b/start_all.bat index fa54f21..72309b3 100644 --- a/start_all.bat +++ b/start_all.bat @@ -1,10 +1,18 @@ @echo off +chcp 65001 >nul setlocal enabledelayedexpansion echo ================================================ echo agent_jrxml 启动 (全栈) echo ================================================ cd /d "%~dp0" +:: 环境检查 +if not exist "%~dp0.venv\Scripts\python.exe" ( + echo [错误] 未找到 .venv,请先创建虚拟环境 + pause + exit /b 1 +) + :: 清理残留进程 echo [清理] 检查残留进程... for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":8000.*LISTENING"') do taskkill /F /PID %%a >nul 2>&1