From e04459f33e38691b65936cfd6881f52b180a70bd Mon Sep 17 00:00:00 2001 From: sansan <77180927+sansan0@users.noreply.github.com> Date: Fri, 7 Nov 2025 13:26:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=84=9A=E6=9C=AC=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 3 ++- setup-windows-en.bat | 45 +++++++++++++++++++++++--------------------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/readme.md b/readme.md index 9863741..23efc27 100644 --- a/readme.md +++ b/readme.md @@ -47,7 +47,7 @@ - 感谢**关注[公众号](#问题答疑与1元点赞)** 的读者们,你们的留言、点赞、分享和推荐等积极互动让内容更有温度😎。
-👉 点击查看致谢名单 (当前 🔥44🔥 位) +👉 点击查看致谢名单 (当前 🔥45🔥 位) ### 数据支持 @@ -67,6 +67,7 @@ | 点赞人 | 金额 | 日期 | 备注 | | :-------------------------: | :----: | :----: | :-----------------------: | +| Q*Q | 6.66 | 2025.11.07 | 感谢开源! | | C*e | 1 | 2025.11.05 | | | Peter Fan | 20 | 2025.10.29 | | | M*n | 1 | 2025.10.27 | 感谢开源 | diff --git a/setup-windows-en.bat b/setup-windows-en.bat index d54a8a2..9edcdc6 100644 --- a/setup-windows-en.bat +++ b/setup-windows-en.bat @@ -1,17 +1,19 @@ @echo off -chcp 65001 >nul +:: 使用系统默认编码而不是强制 UTF-8 setlocal enabledelayedexpansion + echo ========================================== echo TrendRadar MCP Setup (Windows) echo ========================================== -echo. +echo: REM Get current directory set "PROJECT_ROOT=%CD%" echo Project Directory: %PROJECT_ROOT% -echo. +echo: REM Check Python +echo Checking Python... python --version >nul 2>&1 if %errorlevel% neq 0 ( echo [ERROR] Python not detected. Please install Python 3.10+ @@ -19,19 +21,22 @@ if %errorlevel% neq 0 ( pause exit /b 1 ) +echo Python OK +echo: REM Check UV +echo Checking UV... where uv >nul 2>&1 if %errorlevel% neq 0 ( echo [1/3] UV not installed, installing automatically... - echo. + echo: REM Use Bypass execution policy powershell -ExecutionPolicy Bypass -Command "irm https://astral.sh/uv/install.ps1 | iex" if %errorlevel% neq 0 ( echo [ERROR] UV installation failed - echo. + echo: echo Please install UV manually: echo Method 1: Visit https://docs.astral.sh/uv/getting-started/installation/ echo Method 2: Use pip install uv @@ -39,30 +44,30 @@ if %errorlevel% neq 0 ( exit /b 1 ) - echo. + echo: echo [SUCCESS] UV installed successfully echo [IMPORTANT] Please follow these steps: echo 1. Close this window - echo 2. Reopen Command Prompt (or PowerShell) + echo 2. Reopen Command Prompt or PowerShell echo 3. Navigate to project directory: cd "%PROJECT_ROOT%" echo 4. Run this script again: setup-windows.bat - echo. + echo: pause exit /b 0 ) else ( echo [1/3] UV already installed uv --version ) +echo: -echo. echo [2/3] Installing project dependencies... -echo. +echo: REM Install dependencies with UV uv sync if %errorlevel% neq 0 ( echo [ERROR] Dependency installation failed - echo. + echo: echo Possible causes: echo - Missing pyproject.toml file echo - Network connection issues @@ -70,37 +75,35 @@ if %errorlevel% neq 0 ( pause exit /b 1 ) +echo: -echo. echo [3/3] Checking configuration file... - if not exist "config\config.yaml" ( echo [WARNING] Configuration file not found: config\config.yaml if exist "config\config.example.yaml" ( echo Tip: Example config found, please copy and modify: echo copy config\config.example.yaml config\config.yaml ) - echo. + echo: ) REM Get UV path for /f "tokens=*" %%i in ('where uv 2^>nul') do set "UV_PATH=%%i" - if not defined UV_PATH ( echo [WARNING] Unable to get UV path, please find it manually set "UV_PATH=uv" ) -echo. +echo: echo ========================================== echo Setup Complete! echo ========================================== -echo. +echo: echo MCP Server Configuration: -echo. +echo: echo Command: %UV_PATH% echo Working Directory: %PROJECT_ROOT% -echo. +echo: echo Arguments (one per line): echo --directory echo %PROJECT_ROOT% @@ -108,7 +111,7 @@ echo run echo python echo -m echo mcp_server.server -echo. +echo: echo Documentation: README-Cherry-Studio.md -echo. +echo: pause \ No newline at end of file