Skip to content

Switch Windows packaging from Nuitka to PyInstaller#3

Open
masonasons wants to merge 1 commit into
lower-elements:mainfrom
masonasons:build/switch-to-pyinstaller
Open

Switch Windows packaging from Nuitka to PyInstaller#3
masonasons wants to merge 1 commit into
lower-elements:mainfrom
masonasons:build/switch-to-pyinstaller

Conversation

@masonasons

Copy link
Copy Markdown

Why

The Nuitka standalone build shipped an Add Source dialog whose OK/Cancel buttons were invisible. The frozen app rendered the dialog differently than running from source — running from source (and under PyInstaller) lays the dialog out correctly, so this is a freeze-time difference (DPI-awareness / manifest), not a bug in the dialog code. PyInstaller freezes the same code without the problem.

While switching, this also fixes a second latent bug: the native hook binaries were never bundled. Nuitka's --include-data-dir silently skips .dll/.exe files, so audio_hook32.dll, audio_hook64.dll, and injector32.exe never shipped and LegacyCapture was broken in every release. PyInstaller's --add-data copies them into native/dist/, where capture_legacy.py looks for them.

Changes

  • build.py — rewritten to drive PyInstaller (one-dir, windowed by default; --console for a debug build with tracebacks). Bundles the data dirs, the native binaries, and the packages PyInstaller's hooks don't fully discover on their own.
  • CI (.github/workflows/build.yml) — build with PyInstaller; artifact and tagged release now come from dist/PubStreamer/. Drops the Nuitka/MinGW cache steps.
  • pyproject.toml — swap the nuitka dev dependency for pyinstaller.
  • README.md — document the PyInstaller build.

Notes

  • The native build step (build_native.ps1) is unchanged and still runs first in CI so the hook binaries exist to bundle.
  • Output layout changes from Nuitka's main.dist/ to PyInstaller's dist/PubStreamer/ (launcher at dist/PubStreamer/PubStreamer.exe, dependencies under _internal/).

Built locally and verified: the app launches, the native binaries land in _internal/native/dist/, and the Add Source dialog renders correctly with its buttons.

🤖 Generated with Claude Code

The Nuitka standalone build shipped an Add Source dialog whose OK/Cancel
buttons were not visible — the frozen app rendered the dialog differently
than running from source (a DPI/manifest difference in the freeze, not a
bug in the dialog code, which lays out correctly from source and under
PyInstaller). PyInstaller freezes the same code without that problem.

While here, this also fixes native binaries never being bundled: Nuitka's
--include-data-dir silently skips .dll/.exe files, so audio_hook32.dll,
audio_hook64.dll, and injector32.exe never shipped and LegacyCapture was
broken in every release. PyInstaller's --add-data copies them into
native/dist/ where capture_legacy.py looks.

- build.py: rewritten to drive PyInstaller (one-dir, windowed by default,
  --console for debugging); bundles data dirs, native binaries, and the
  packages PyInstaller's hooks miss.
- CI: build with PyInstaller; artifact/release now from dist/PubStreamer/.
- pyproject: swap the nuitka dev dep for pyinstaller.
- README: document the PyInstaller build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant