@echo off
REM 测试Python设置修复

echo 🔧 Testing Python Setup Fix...
echo.

echo 📋 This script will test the Python environment setup fixes:
echo.

echo 1. 📁 Checking if setup scripts exist...
if exist "scripts\setup_embedded_python.py" (
    echo ✅ Python setup script found
) else (
    echo ❌ Python setup script NOT found
)

if exist "scripts\setup_embedded_python.bat" (
    echo ✅ Batch setup script found
) else (
    echo ❌ Batch setup script NOT found
)

echo.
echo 2. 🐍 Testing Python availability...
python --version >nul 2>&1
if errorlevel 1 (
    echo ❌ Python not available in PATH
    echo You may need to install Python or add it to PATH
) else (
    echo ✅ Python is available
    python --version
)

echo.
echo 3. 📂 Checking current directory...
echo Current directory: %CD%
echo.

echo 4. 🧪 Testing manual script execution...
echo.
echo You can manually test the setup scripts:
echo.
echo Option A - Python script:
echo   python scripts\setup_embedded_python.py
echo.
echo Option B - Batch script:
echo   scripts\setup_embedded_python.bat
echo.

echo 5. 🚀 Starting Tauri application...
echo.
echo After the app starts:
echo 1. Go to Python Environment Manager page
echo 2. Try the "设置嵌入式Python" button
echo 3. If that fails, try "简化设置（批处理）" button
echo 4. Check the console for detailed error messages
echo.

pause

echo Starting Tauri dev server...
cargo tauri dev
