fix(build): the game's exe has Longshot's icon, in every build #1680
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1680
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/Longshot:fix/exe-icon"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: fix · Risk: low · Tested on: Windows 11 (game-free checks only; not yet run in the game) · Needs: Windows, any GPU: a build with it, its window and taskbar icon
TL;DR
The game's own window and taskbar entry on Windows showed Windows' blank program icon, while the launcher and the builder show Longshot's. A release's game was built with no icon at all. This PR gives the game Longshot's icon in every build, releases included. A new game-free test checks the icon that is linked; it has not been run in the game yet, so it stays WIP until it has.
Breakdown
tests/test_exe_icon.py(new) reads the linked icon back; the icon resource was linked into a small program with llvm-mingw and is there.Why
The game's window on Windows has no icon of its own: the taskbar and the window's corner show Windows' blank program icon.
nx2/build.pylinked an icon only when the builder had made one from the game's .nup (work/longshot_game.res) or a developer had made one from a picture (work/longshot.res). The release builds have neither, and the .nup a player builds from may hold no icon either (the one this was found with holds neither a name nor an icon). Longshot's own icon,builder/setup/longshot.ico, was used only by the builder's setup.What changed
The exe links Longshot's icon in every build, beside the game's name when the builder read one.
exe_resources()innx2/build.pymakeswork/longshot_brand.resfrombuilder/setup/longshot.ico(icon 1, whichhost/display.cloads for the window) and links it always, withwork/longshot_game.resbeside it when there is one. A developer'swork/longshot.resis no longer linked.images_of_ico()innx2/make_icon.pyreads an .ico's PNG images as they are, so the builders that make releases need no Pillow.game_title.write_res()innx2/game_title.pywrites the game's name alone (version strings), no longer its icon, so the two resources never clash.tests/test_exe_icon.py.Measurements
Nothing to measure: a resource linked into the exe.
Flags and settings
None.
Testing
Tested: on Windows 11, without the game:
tests/test_exe_icon.pypasses (every size oflongshot.icoin the resource, icon group 1, the same resource each build, the game's name resource with no icon of its own, both linked when the game has a name). The resource linked into a small program with the Builder's llvm-mingw gives its ICON and GROUP_ICON (llvm-readobj --coff-resources). The checks near it pass;test_build_long_pathsfails here as it does onmain. The whole oftests/run_all.pyhas not been run on this branch yet.Not tested: a build with this PR in the game: the window's and the taskbar's icon.
Must be tested:
Risks
What could break: a build whose
builder/setup/longshot.icocan't be read links no icon, as before; nothing else reads these resources.Turning it off: revert the commits.
Compatibility: Nothing changes for a player but the icon.
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named). (The checks near it pass; the whole suite is still to run.)third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.mainand passing here.🤖 Generated with Claude Code
Possibly related, for context:
WIP: fix(build): the game's exe has Longshot's icon, in every buildto fix(build): the game's exe has Longshot's icon, in every buildmooki referenced this pull request2026-11-19 02:00:05 +00:00
mooki referenced this pull request2026-11-19 02:03:41 +00:00