@echo off
REM Windows one-shot build entry -- wraps build.ps1.
REM Double-click or run `build.cmd` in cmd/PowerShell.
REM Env vars IMAGE_NAME / IMAGE_TAG / OUT_DIR can override defaults.
REM
REM ASCII-only on purpose: cmd.exe defaults to GBK code page; UTF-8 text
REM with non-ASCII bytes gets mis-parsed as commands. See build.ps1 for
REM the full (Chinese) comments.

setlocal
cd /d "%~dp0"

where powershell >nul 2>&1
if errorlevel 1 (
    echo [build.cmd] PowerShell not found. Please install Windows PowerShell or run build.ps1 manually.
    exit /b 1
)

powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0build.ps1" %*
exit /b %ERRORLEVEL%
