Overview
ZZAR uses PyInstaller to create standalone executables that bundle Python, dependencies, and assets into a single distributable file. The build configuration is defined inZZAR.spec.
Prerequisites
Before building, ensure you have:- Python 3.14+ installed
- All dependencies from
requirements.txtinstalled - PyInstaller installed:
pip install pyinstaller - A working ZZAR development environment (see Getting Started)
Build Configuration
TheZZAR.spec file controls the PyInstaller build. Key sections:
Included Files
Hidden Imports
Modules that PyInstaller can’t auto-detect:Platform-Specific Settings
Windows
- Bundles application icon:
src/gui/assets/ZZAR-Logo2.ico - Creates windowed executable (no console)
- Uses UPX compression
Linux
- Bundles GStreamer plugins (for audio playback)
- Bundles Qt Wayland plugins (for native Wayland support)
- Bundles QtGraphicalEffects QML module
- Excludes system libraries (libwayland, libssl) to avoid ABI mismatches
Flatpak Builds
For Flatpak builds, set the environment variable:Building on Windows
Run PyInstaller
Build the Windows executable:This creates:
build/- Temporary build files (can be deleted)dist/ZZAR.exe- Standalone executable
Test the Executable
Run the built executable:Verify:
- Application launches
- GUI renders correctly
- Audio conversion works
- Mod installation works
Building on Linux
Run PyInstaller
Build the Linux executable:This creates:
build/- Temporary build files (can be deleted)dist/ZZAR- Standalone executable
Test the Executable
Run the built executable:Verify:
- Application launches on Wayland and X11
- Audio playback works (GStreamer)
- Wwise conversion works (via Wine)
- Mod installation works
Build Options
Debug Build
For debugging, enable console output:Clean Build
Remove build artifacts before rebuilding:Disable UPX Compression
If UPX causes issues (some antivirus flags it), disable it:Troubleshooting
ImportError in Built Executable
Problem: Module not found when running built executable Solution: Add the module tohiddenimports in ZZAR.spec:
Missing QML Files
Problem: GUI doesn’t render, QML errors Solution: Verify QML files are included inadded_files:
GStreamer Not Found (Linux)
Problem: Audio playback fails Solution: GStreamer plugins may not be bundled correctly. CheckZZAR.spec lines 38-54:
libwayland ABI Mismatch (Linux)
Problem: Application crashes on startup with Wayland errors Solution: This is intentional. ZZAR excludes libwayland from the bundle (lines 150-152 inZZAR.spec):
Wwise Test Fails
Problem: Wwise conversion doesn’t work in built executable Solution: Ensuresetup_wwise.py is bundled:
Build Automation
For CI/CD, automate builds with GitHub Actions:Release Checklist
Before releasing:- Update version in
ZZAR.py(__version__) - Update
README.mdwith new version - Test build on Windows
- Test build on Linux
- Verify audio playback works
- Verify Wwise conversion works
- Verify mod installation works
- Create GitHub release with binaries
- Update documentation site
Next Steps
- Read the Development Guide to understand the codebase
- Check GitHub Releases for build examples
- Report build issues on GitHub Issues