Skip to content

Ship another application icon in packaged builds - #169

Open
BeckettFrey wants to merge 1 commit into
mainfrom
feature/app-branding
Open

Ship another application icon in packaged builds#169
BeckettFrey wants to merge 1 commit into
mainfrom
feature/app-branding

Conversation

@BeckettFrey

@BeckettFrey BeckettFrey commented Aug 19, 2026

Copy link
Copy Markdown
Member

Narrowed to the icon only. The splash credit line that originally rode along with this is now #170 (merged).

Correction to the original framing

An earlier version of this description claimed the packaged-build icon was broken. That was wrong — tasks.py has always passed --icon on every platform:

  • tasks.py:189 — Windows: --icon ./assets/voxkit.ico
  • tasks.py:99 — macOS: --icon ./assets/voxkit.icns
  • installer/windows/VoxKit.iss:29SetupIconFile=..\..\assets\voxkit.ico

The .exe in Explorer, the Start menu, and the installer already carried an icon. This PR does not fix that, because it was not broken.

What this actually changes

1. The icon now appears while the app is running — including under uv run main.py. Qt needs it set explicitly and nothing ever called setWindowIcon. main.py sets it at the QApplication level, src/voxkit/gui/__init__.py at the window level; Qt needs both.

2. assets/ is bundled into frozen builds via --add-data, so (1) also holds in a packaged build. get_assets_root() handles the _MEIPASS case exactly as the existing get_config_root() does.

3. New icon artassets/vk.ico and assets/vk.png, added alongside the existing voxkit.ico / voxkit.icns / voxkit.png rather than replacing them.

4. A --icon fallback in scripts/build.py for direct invocation without the flag. The invoke tasks always pass --icon, so this never fires on the shipping path.

Open question: do we want a new icon?

This is the part worth an actual decision, and it is independent of the plumbing above. Because the PR adds a second icon set instead of replacing the first, the two are now wired to different surfaces:

Surface Icon used Set by
.exe in Explorer / Start menu / pinned shortcut voxkit.ico (existing) tasks.py:189
Installer voxkit.ico (existing) VoxKit.iss:29
macOS app bundle voxkit.icns (existing) tasks.py:99
Running window + taskbar + dev server vk.ico / vk.png (new) get_app_icon_path()

As it stands, a Windows user sees the old icon on the shortcut and the new one once the window opens. That wants resolving either way:

  • Keep the new art → repoint tasks.py and VoxKit.iss at vk.*, retire voxkit.*.
  • Keep the old art → drop vk.* and point get_app_icon_path() at voxkit.ico / voxkit.png.

Notes for review

  • assets/vk.png is 4 MB and is the non-Windows runtime icon. That is a lot of weight in every bundle for an icon; downsizing is worth doing whichever art wins.
  • Unverified: no packaged build has been produced. The runtime icon path needs a real PyInstaller run to confirm _MEIPASS resolution actually lands.

Related

The app never set an icon anywhere, so the packaged build reached users
showing PyInstaller's generic executable icon and the generic Python
icon in the taskbar. Three pieces are needed, because they cover
different surfaces:

- scripts/build.py now defaults PyInstaller's --icon to assets/vk.ico on
  Windows. This is the icon Explorer, the Start menu and a pinned
  shortcut read off the .exe itself, before the app has run at all, and
  it was previously an opt-in flag nobody passed. An explicit --icon
  still wins.
- assets/ is bundled via --add-data, so the runtime lookup resolves
  inside a frozen build rather than only under `uv run main.py`.
- QApplication.setWindowIcon and QMainWindow.setWindowIcon set the
  running app's taskbar and window icon; Qt needs both.

get_app_icon_path prefers assets/vk.ico on Windows (multi-resolution, so
it stays sharp at taskbar and title-bar sizes) and falls back to the PNG
elsewhere. It resolves through get_assets_root, which handles the
PyInstaller _MEIPASS case the same way get_config_root already does.

The splash credit line that rode along with this originally is now #170.
@BeckettFrey
BeckettFrey force-pushed the feature/app-branding branch from bc95613 to 65bd138 Compare August 19, 2026 18:32
@BeckettFrey BeckettFrey changed the title Wire up app branding: window icon and splash credit line Ship the application icon in packaged builds Aug 19, 2026
@BeckettFrey BeckettFrey changed the title Ship the application icon in packaged builds Ship another application icon in packaged builds Aug 20, 2026
@BeckettFrey
BeckettFrey requested a review from nrgslp August 20, 2026 20:12
@BeckettFrey
BeckettFrey deleted the feature/app-branding branch August 20, 2026 20:34
@BeckettFrey
BeckettFrey restored the feature/app-branding branch August 20, 2026 20:36
@BeckettFrey BeckettFrey reopened this Aug 20, 2026
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