From 2483c7278ff2ca78368af0e9ac413bc302759d7b Mon Sep 17 00:00:00 2001 From: happymy <598176144@qq.com> Date: Sat, 12 Sep 2026 16:04:46 +0800 Subject: [PATCH] =?UTF-8?q?i18n:=20=E5=B0=86=20bat=20=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E6=94=B9=E4=B8=BA=E4=B8=AD=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=8F=8C=E8=AF=AD=20setup/start/start-bg/stop=20=E5=9B=9B?= =?UTF-8?q?=E4=B8=AA=20bat=20=E7=9A=84=20echo=20=E6=94=B9=E4=B8=BA=20Engli?= =?UTF-8?q?sh=20/=20=E4=B8=AD=E6=96=87=20=E5=AF=B9=E7=85=A7=EF=BC=8CGBK+CR?= =?UTF-8?q?LF=20=E4=B8=8D=E5=8F=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.bat | 15 +++++++-------- start-bg.bat | 12 ++++++------ start.bat | 14 +++++++------- stop.bat | 6 +++--- 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/setup.bat b/setup.bat index d829fbc6..21d8275c 100644 --- a/setup.bat +++ b/setup.bat @@ -6,30 +6,29 @@ set BACKEND=%ROOT%calliope-backend set WEB=%ROOT%calliope-web echo ============================================ -echo Calliope 首次安装(幂等,可重复运行) +echo Calliope First-time setup / Calliope 首次安装(幂等,可重复运行) echo ============================================ if not exist "%BACKEND%\.venv\Scripts\python.exe" ( - echo [1/2] 创建虚拟环境并安装后端依赖... + echo [1/2] Creating venv and installing backend deps / 创建虚拟环境并安装后端依赖... cd /d "%BACKEND%" python -m venv .venv call .venv\Scripts\activate.bat .venv\Scripts\python -m pip install --upgrade pip .venv\Scripts\pip install -e ".[dev]" ) else ( - echo [1/2] 后端依赖已安装,跳过。 + echo [1/2] Backend deps already installed - skipping / 后端依赖已安装,跳过。 ) if not exist "%WEB%\node_modules" ( - echo [2/2] 安装前端依赖 npm install... + echo [2/2] Installing frontend deps, running npm install... / 安装前端依赖 npm install... cd /d "%WEB%" call npm install ) else ( - echo [2/2] 前端依赖已安装,跳过。 + echo [2/2] Frontend deps already installed - skipping / 前端依赖已安装,跳过。 ) echo. -echo 安装完成。首次启动前可复制 calliope_config.example.json 为 calliope_config.json 配置 LLM/ComfyUI, -echo 也可以在应用内 Settings 页面配置。 +echo Setup complete / 安装完成。Copy calliope_config.example.json to calliope_config.json before first launch to configure LLM/ComfyUI, or configure in the in-app Settings page / 首次启动前可复制 calliope_config.example.json 为 calliope_config.json 配置 LLM/ComfyUI,也可以在应用内 Settings 页面配置。 echo. -pause \ No newline at end of file +pause diff --git a/start-bg.bat b/start-bg.bat index 6a9753f3..af34da5f 100644 --- a/start-bg.bat +++ b/start-bg.bat @@ -6,24 +6,24 @@ set BACKEND=%ROOT%calliope-backend set WEB=%ROOT%calliope-web if not exist "%BACKEND%\.venv\Scripts\python.exe" ( - echo [错误] 后端未安装,请先运行 setup.bat + echo [Error/错误] Backend not installed - run setup.bat first / 后端未安装,请先运行 setup.bat pause exit /b 1 ) if not exist "%WEB%\node_modules" ( - echo [错误] 前端未安装,请先运行 setup.bat + echo [Error/错误] Frontend not installed - run setup.bat first / 前端未安装,请先运行 setup.bat pause exit /b 1 ) if not exist "%ROOT%logs" mkdir "%ROOT%logs" -echo 后台启动后端... 日志: logs\backend.log +echo Starting backend in background / 后台启动后端... Log/日志: logs\backend.log powershell -NoProfile -Command "$p = Start-Process -FilePath '%ROOT%calliope-backend\.venv\Scripts\python.exe' -ArgumentList '-m','calliope.main','--host','127.0.0.1','--port','8247' -WorkingDirectory '%ROOT%calliope-backend' -RedirectStandardOutput '%ROOT%logs\backend.log' -RedirectStandardError '%ROOT%logs\backend.err.log' -PassThru -WindowStyle Hidden; Write-Host ('Backend PID -> ' + $p.Id)" -echo 后台启动前端... 日志: logs\web.log +echo Starting frontend in background / 后台启动前端... Log/日志: logs\web.log powershell -NoProfile -Command "$p = Start-Process -FilePath 'npm.cmd' -ArgumentList 'run','dev' -WorkingDirectory '%ROOT%calliope-web' -RedirectStandardOutput '%ROOT%logs\web.log' -RedirectStandardError '%ROOT%logs\web.err.log' -PassThru -WindowStyle Hidden; Write-Host ('Web npm PID -> ' + $p.Id)" echo. -echo 后台服务已启动:后端 http://127.0.0.1:8247 前端 http://127.0.0.1:5173 -echo 用 stop.bat 停止。 \ No newline at end of file +echo Background services started / 后台服务已启动:Backend/后端 http://127.0.0.1:8247 Frontend/前端 http://127.0.0.1:5173 +echo Run stop.bat to stop them / 用 stop.bat 停止 diff --git a/start.bat b/start.bat index 71942876..7e1356be 100644 --- a/start.bat +++ b/start.bat @@ -6,20 +6,20 @@ set BACKEND=%ROOT%calliope-backend set WEB=%ROOT%calliope-web if not exist "%BACKEND%\.venv\Scripts\python.exe" ( - echo [错误] 后端未安装,请先运行 setup.bat + echo [Error/错误] Backend not installed - run setup.bat first / 后端未安装,请先运行 setup.bat pause exit /b 1 ) if not exist "%WEB%\node_modules" ( - echo [错误] 前端未安装,请先运行 setup.bat + echo [Error/错误] Frontend not installed - run setup.bat first / 前端未安装,请先运行 setup.bat pause exit /b 1 ) -echo 打开两个窗口: -echo 后端 http://127.0.0.1:8247 -echo 前端 http://127.0.0.1:5173 -echo 关闭窗口即停止对应服务。 +echo Opening two windows / 打开两个窗口: +echo Backend/后端 http://127.0.0.1:8247 +echo Frontend/前端 http://127.0.0.1:5173 +echo Close a window to stop that service / 关闭窗口即停止对应服务 start "Calliope Backend" /D "%BACKEND%" cmd /k ".venv\Scripts\python -m calliope.main --host 127.0.0.1 --port 8247" -start "Calliope Web" /D "%WEB%" cmd /k "npm run dev" \ No newline at end of file +start "Calliope Web" /D "%WEB%" cmd /k "npm run dev" diff --git a/stop.bat b/stop.bat index ede0a262..1746940b 100644 --- a/stop.bat +++ b/stop.bat @@ -3,11 +3,11 @@ chcp 936 >nul setlocal set ROOT=%~dp0 -echo 正在停止 Calliope 后端和前端进程... +echo Stopping Calliope backend and frontend processes / 正在停止 Calliope 后端和前端进程... powershell -NoProfile -Command "Get-CimInstance Win32_Process | Where-Object { $_.Name -match '^(python|node)(\.exe)?$' -and $_.CommandLine -match 'calliope' } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue; Write-Host ('Killed ' + $_.Name + ' PID ' + $_.ProcessId) }" echo. -echo 已停止。若还有残留窗口,可直接关闭对应 cmd 窗口。 +echo Done. If leftover windows remain, close them manually / 已停止。若还有残留窗口,可直接关闭对应 cmd 窗口。 echo. -pause \ No newline at end of file +pause