24 lines
451 B
Batchfile
24 lines
451 B
Batchfile
|
|
@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
|