@echo off setlocal chcp 65001 >nul 2>&1 set "ROOT=%~dp0" set "PAUSE_ON_ERROR=1" for %%A in (%*) do ( if /I "%%~A"=="--no-pause" set "PAUSE_ON_ERROR=0" ) if "%ROOT:~-1%"=="\" set "ROOT=%ROOT:~0,-1%" cd /d "%ROOT%" set "POWERSHELL_EXE=%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" if not exist "%POWERSHELL_EXE%" set "POWERSHELL_EXE=powershell.exe" echo ======================================== echo YMhut Box - WinUI 3 Build echo ======================================== echo. "%POWERSHELL_EXE%" -NoLogo -NoProfile -ExecutionPolicy Bypass -File "%ROOT%\scripts\build-winui.ps1" %* set "EXITCODE=%ERRORLEVEL%" if not "%EXITCODE%"=="0" ( echo. echo [ERROR] WinUI build failed with exit code %EXITCODE%. echo [ERROR] Detailed logs: %ROOT%\build\winui\logs if "%PAUSE_ON_ERROR%"=="1" pause exit /b %EXITCODE% ) exit /b 0