@echo off rem ============================================================ rem LVGL PC simulator one-shot build (VS2019/2022/2026 auto-detect, x64) rem Usage (from repo root, any shell): rem & "simulator\build_sim.bat" incremental build rem & "simulator\build_sim.bat" -Clean full rebuild rem & "simulator\build_sim.bat" -Config Release Release build rem Logic lives in build_sim.ps1 (vswhere probe -> generator mapping); rem this bat only bypasses the PowerShell execution policy and rem forwards the arguments. Exit code = build result (0 ok / 1 fail / 3 env). rem NOTE: keep this file PURE ASCII - cmd parses .bat in the ANSI rem codepage; UTF-8 Chinese here corrupts the command lines. rem ============================================================ setlocal where pwsh >nul 2>nul if %errorlevel%==0 ( pwsh -NoProfile -ExecutionPolicy Bypass -File "%~dp0build_sim.ps1" %* goto :done ) powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0build_sim.ps1" %* :done exit /b %errorlevel%