feat: start脚本支持 conda activate stock

This commit is contained in:
2026-01-28 00:22:01 +08:00
parent 086af75b3e
commit 7ae3d16a5e
6 changed files with 637 additions and 381 deletions

View File

@@ -20,13 +20,31 @@ set MAX_RETRIES=10
set RETRY_COUNT=0
set RETRY_WAIT=10
:: 6. 日志目录 (仅在 SHOW_OUTPUT=0 时生效)
:: 6. 是否使用 Conda 环境 (1=是, 0=否)
set USE_CONDA=0
:: 7. 日志目录 (仅在 SHOW_OUTPUT=0 时生效)
set "LOG_DIR=%WORK_DIR%logs\launcher"
:: ===========================================
:: 解析命令行参数
:PARSE_ARGS
if "%~1"=="" goto :END_ARGS
if /i "%~1"=="--conda" set USE_CONDA=1
if /i "%~1"=="-c" set USE_CONDA=1
shift
goto :PARSE_ARGS
:END_ARGS
cd /d "%WORK_DIR%"
title QMT 自动化交易系统 [准备中]
:: 激活 Conda 环境
if "%USE_CONDA%"=="1" (
echo [%time%] 正在激活 Conda 环境 [stock]...
call conda activate stock
)
:: 构建启动命令前缀
if "%USE_UV%"=="1" (
set "CMD_PREFIX=uv run python"