@echo off setlocal cd /d "%~dp0" title readcard-c package where powershell.exe >nul 2>&1 if errorlevel 1 ( echo [ERROR] PowerShell was not found. pause exit /b 1 ) powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0build.ps1" set "RESULT=%ERRORLEVEL%" echo. if not "%RESULT%"=="0" ( echo Packaging failed. Review the error above. pause exit /b %RESULT% ) echo Packaging completed. Output: %~dp0dist start "" "%~dp0dist" pause