@echo off REM ============================================================ REM QMT bridge deploy (elevated) - run this AS ADMINISTRATOR REM Double-click -> UAC prompt -> copies bridge files (8 .py) + REM OpenAPI spec (openapi.yaml/json) into C:\Programs\GJQMT_BIG\python REM ============================================================ net session >nul 2>&1 if %errorlevel% neq 0 ( echo Requesting administrator privileges... powershell -Command "Start-Process '%~f0' -Verb RunAs" exit /b ) set "QMT_PY=C:\Programs\GJQMT_BIG\python" set "SRC=%~dp0src" if not exist "%QMT_PY%" ( echo [ERROR] QMT python dir not found: %QMT_PY% pause exit /b 1 ) echo Deploying bridge modules to %QMT_PY% echo. for %%f in (bridge_main.py bridge_http_server.py bridge_ws_server.py bridge_data_adapter.py bridge_util.py bridge_subscription.py bridge_mcp_server.py qmt_strategy_entry.py) do ( if exist "%SRC%\%%f" ( copy /y "%SRC%\%%f" "%QMT_PY%\%%f" >nul echo [OK] %%f ) else ( echo [MISSING] %%f ) ) REM OpenAPI spec (served by /openapi.yaml + /openapi.json for Apifox URL sync) for %%f in (openapi.yaml openapi.json) do ( if exist "%~dp0docs\api_spec\%%f" ( copy /y "%~dp0docs\api_spec\%%f" "%QMT_PY%\%%f" >nul echo [OK] %%f ) else ( echo [MISSING] %%f ) ) echo. echo Done. You can now start QMT and rerun the strategy. echo. pause