Add PyInstaller Windows release build system.

Frozen builds resolve paths correctly, stage portable onedir output, and zip releases for distribution.
This commit is contained in:
Dr Jones
2026-05-22 19:20:06 -07:00
parent bef3de1245
commit 05a32015db
10 changed files with 548 additions and 24 deletions

51
build_release.bat Normal file
View File

@@ -0,0 +1,51 @@
@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%