@echo off
chcp 65001 >nul
title Update Python Environment List

cd /d "%~dp0"

REM Check if virtual environment exists
if not exist "env\Scripts\python.exe" (
    echo [ERROR] Virtual environment not found at: env
    echo Please run python-enviroment-install.py first to create the virtual environment.
    echo.
    pause
    exit /b 1
)

REM Run Python script to compare and update environment.txt
python "%~dp0update-environment-list.py"

if errorlevel 1 (
    echo.
    echo [ERROR] Update failed
    echo.
    pause
    exit /b 1
) else (
    echo.
    echo [OK] Update completed
    echo.
    pause
)
