fix(icon): the Windows icon is the Longshot logo, in every size #21

Merged
HumanBean merged 1 commit from HumanBean/LongshotLauncher:fix/launcher-icon into main 2026-11-13 08:52:41 +00:00
Owner

Why

The launcher's Windows icon (the exe, taskbar, Alt-Tab) showed the old blue hookshot: App/Assets/longshot.ico was older artwork, not the green Longshot logo in longshot.png.

What changed

  • icon: App/Assets/longshot.ico made again from longshot.png by the new scripts/make_icon.py (Pillow, Lanczos; the same bytes on every run): 16, 20, 24, 32, 40, 48, 64, 96, 128 as 32-bit bitmaps, 256 as a PNG.
  • Windows window: MainWindow.axaml.cs sets Icon to the .ico on Windows (an AvaloniaResource in App/LongshotLauncher.csproj), so Windows gets real small and big icons instead of the 512 px PNG scaled down. Linux keeps the PNG.
  • Linux: Program.BuildAvaloniaApp sets the Wayland app_id and X11 WM_CLASS to Shortcuts.LauncherEntryName (longshot-launcher); the menu entry (Core/Shortcuts.cs) and the AppImage's entry (scripts/package.sh) say StartupWMClass=longshot-launcher.
  • tests: tests/launcher_core/IconChecks.cs (the .ico has every size; its 256 is longshot.png scaled down); InstallChecks.cs (the menu entry's StartupWMClass). README: the script in the layout table.

Flags and settings

None.

Measurements

main: a799805f (2026-11-13)
this PR: fix/launcher-icon @ f81a0f41
Hardware: Linux PC (CachyOS), .NET SDK 10.0.404
Scene: not a game change; the win-x64 single-file exe as scripts/package.sh publishes it
Method: the exe's icon group read with Python pefile, images decoded with Pillow; the launcher's test files
How to reproduce: publish win-x64 as package.sh does and list the exe's icon group; python -I tests/test_launcher_core.py, python -I tests/test_release.py

main @ a799805f this PR @ f81a0f41
Icon sizes in the exe 16, 24, 32, 48, 64, 128, 256 (all PNG) 16, 20, 24, 32, 40, 48, 64, 96, 128 (bitmaps), 256 (PNG)
Artwork old blue hookshot the Longshot logo
The 256 against the logo (mean difference, 0-255) 21.2 0.6
launcher core checks 568 passed 571 passed
test_release.py 28 OK 28 OK

Testing

Tested: both test files before and after; Release builds with warnings as errors, Linux and win-x64 (-p:EnableWindowsTargeting=true), 0 warnings; the published exe's icons extracted and looked at; the icon check fails on main's .ico; the Linux build in a headless sway: swaymsg -t get_tree reports app_id: longshot-launcher.

Not tested: Windows itself (no Windows or Wine here).

Needs other testers:

  • Windows 10/11: the exe in Explorer, the title bar, the taskbar button and Alt-Tab show the green logo, crisp at 100% and 150%, expecting no blue hookshot anywhere (request to open)

Screenshots

The exe's icon resources, every size at 1x (main @ a799805f above, this PR below; this PR's icon is unchanged since the first push):

the exe's icons, main and this PR

The Linux window (sway, Wayland):

the Linux window

Risk and rollback

Only the icon and the Linux window's class change. A Linux compositor rule written for the old app_id LongshotLauncher needs longshot-launcher. Reverting the commit is enough.

Issues

None.

Checklist

For everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description).
  • Rebased on current main.
  • python -I -B tests/run_all.py run and passing (any failure that also fails on main is named above). (This repository's set: tests/test_launcher_core.py and tests/test_release.py.)
  • Tested in the game, or what wasn't is named under Testing.
  • Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests).
  • Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. (Not a performance change: icon sizes and test counts.)
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

If applicable

  • Screenshots for a change that shows on screen.
  • A game-free test added for the fix, failing on main and passing here.
  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. (The .NET Windows and Linux targets.)
  • Docs updated.
## Why The launcher's Windows icon (the exe, taskbar, Alt-Tab) showed the old blue hookshot: `App/Assets/longshot.ico` was older artwork, not the green Longshot logo in `longshot.png`. ## What changed - icon: `App/Assets/longshot.ico` made again from `longshot.png` by the new `scripts/make_icon.py` (Pillow, Lanczos; the same bytes on every run): 16, 20, 24, 32, 40, 48, 64, 96, 128 as 32-bit bitmaps, 256 as a PNG. - Windows window: `MainWindow.axaml.cs` sets `Icon` to the `.ico` on Windows (an `AvaloniaResource` in `App/LongshotLauncher.csproj`), so Windows gets real small and big icons instead of the 512 px PNG scaled down. Linux keeps the PNG. - Linux: `Program.BuildAvaloniaApp` sets the Wayland `app_id` and X11 `WM_CLASS` to `Shortcuts.LauncherEntryName` (`longshot-launcher`); the menu entry (`Core/Shortcuts.cs`) and the AppImage's entry (`scripts/package.sh`) say `StartupWMClass=longshot-launcher`. - tests: `tests/launcher_core/IconChecks.cs` (the `.ico` has every size; its 256 is `longshot.png` scaled down); `InstallChecks.cs` (the menu entry's `StartupWMClass`). README: the script in the layout table. ## Flags and settings None. ## Measurements main: a799805f (2026-11-13) this PR: fix/launcher-icon @ f81a0f41 Hardware: Linux PC (CachyOS), .NET SDK 10.0.404 Scene: not a game change; the win-x64 single-file exe as `scripts/package.sh` publishes it Method: the exe's icon group read with Python `pefile`, images decoded with Pillow; the launcher's test files How to reproduce: publish win-x64 as `package.sh` does and list the exe's icon group; `python -I tests/test_launcher_core.py`, `python -I tests/test_release.py` | | main @ a799805f | this PR @ f81a0f41 | |---|---|---| | Icon sizes in the exe | 16, 24, 32, 48, 64, 128, 256 (all PNG) | 16, 20, 24, 32, 40, 48, 64, 96, 128 (bitmaps), 256 (PNG) | | Artwork | old blue hookshot | the Longshot logo | | The 256 against the logo (mean difference, 0-255) | 21.2 | 0.6 | | launcher core checks | 568 passed | 571 passed | | test_release.py | 28 OK | 28 OK | ## Testing **Tested:** both test files before and after; Release builds with warnings as errors, Linux and win-x64 (`-p:EnableWindowsTargeting=true`), 0 warnings; the published exe's icons extracted and looked at; the icon check fails on main's `.ico`; the Linux build in a headless sway: `swaymsg -t get_tree` reports `app_id: longshot-launcher`. **Not tested:** Windows itself (no Windows or Wine here). **Needs other testers:** - Windows 10/11: the exe in Explorer, the title bar, the taskbar button and Alt-Tab show the green logo, crisp at 100% and 150%, expecting no blue hookshot anywhere (request to open) ## Screenshots The exe's icon resources, every size at 1x (main @ a799805f above, this PR below; this PR's icon is unchanged since the first push): ![the exe's icons, main and this PR](https://git.magicbean.dev/HumanBean/LongshotLauncher/raw/branch/pr-assets-icon/pr21/exe-icons.png) The Linux window (sway, Wayland): ![the Linux window](https://git.magicbean.dev/HumanBean/LongshotLauncher/raw/branch/pr-assets-icon/pr21/linux-window.png) ## Risk and rollback Only the icon and the Linux window's class change. A Linux compositor rule written for the old `app_id` `LongshotLauncher` needs `longshot-launcher`. Reverting the commit is enough. ## Issues None. ## Checklist ### For everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`). - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` run and passing (any failure that also fails on `main` is named above). (This repository's set: `tests/test_launcher_core.py` and `tests/test_release.py`.) - [x] Tested in the game, or what wasn't is named under Testing. - [x] Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests). - [x] Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. (Not a performance change: icon sizes and test counts.) - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### If applicable - [x] Screenshots for a change that shows on screen. - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. (The .NET Windows and Linux targets.) - [x] Docs updated.
HumanBean force-pushed fix/launcher-icon from 3855ed7335
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
to f81a0f412d
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
2026-11-13 08:50:48 +00:00
Compare
HumanBean changed title from fix(icon): the Longshot logo in every size, and the launcher's own taskbar identity to fix(icon): the Windows icon is the Longshot logo, in every size 2026-11-13 08:51:07 +00:00
HumanBean deleted branch fix/launcher-icon 2026-11-13 08:52:41 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!21
No description provided.