Files
GOD-CWAK/build_release.bat
Dr Jones 05a32015db Add PyInstaller Windows release build system.
Frozen builds resolve paths correctly, stage portable onedir output, and zip releases for distribution.
2026-05-22 19:20:06 -07:00

52 lines
1.1 KiB
Batchfile

@echo off
setlocal EnableExtensions
title GODCWAK Release Build
color 0B
cd /d "%~dp0\.."
echo.
echo =========================================
echo GODCWAK - Windows Release Build
echo =========================================
echo.
set PYTHON_EXE=
set PYTHON_ARGS=
if exist ".venv\Scripts\python.exe" (
set "PYTHON_EXE=.venv\Scripts\python.exe"
) else (
py -3 --version >nul 2>&1
if %ERRORLEVEL% EQU 0 (
set "PYTHON_EXE=py"
set "PYTHON_ARGS=-3"
) else (
set "PYTHON_EXE=python"
)
)
echo Using: %PYTHON_EXE% %PYTHON_ARGS%
echo.
"%PYTHON_EXE%" %PYTHON_ARGS% -m pip install -q -r requirements-build.txt
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Failed to install build dependencies.
pause
exit /b 1
)
"%PYTHON_EXE%" %PYTHON_ARGS% build\build_release.py --clean %*
set BUILD_EXIT=%ERRORLEVEL%
echo.
if %BUILD_EXIT% EQU 0 (
echo [OK] Release build finished.
echo Output: dist\GODCWAK\
echo Archive: release\
) else (
echo [ERROR] Build failed with exit code %BUILD_EXIT%
)
echo.
pause
exit /b %BUILD_EXIT%