rem ============================================================
rem  麦哨启动器（文本版）
rem  SkillHub 不允许 .bat 文件直接上传，故以 .txt 保留原启动器全部内容。
rem  需要双击启动时：把本文件另存为「启动麦哨.bat」即可，本文件内容可直接作为 bat 运行。
rem  也可以直接在本目录运行：python MicWhistle.py
rem ============================================================
@echo off
rem MicWhistle launcher . Uses %~dp0 so it works from any directory.
cd /d "%~dp0"

where py >nul 2>nul
if %errorlevel%==0 (
    py -3 "MicWhistle.py"
    goto :after
)

where python >nul 2>nul
if %errorlevel%==0 (
    python "MicWhistle.py"
    goto :after
)

echo [micwhistle] Python not found. Install Python 3.10+ and ensure 'py -3' or 'python' is on PATH.
pause
exit /b 1

:after
if not %errorlevel%==0 (
    echo.
    echo [micwhistle] Exited with error code %errorlevel%. See messages above.
    pause
)
exit /b 0
