Skip to content

fix(plugin): the GraalVM AppX gets its logos, at every scale and target size - #894

Merged
kdroidFilter merged 1 commit into
nucleus-3.0from
fix/graalvm-appx-assets
Oct 31, 2026
Merged

kdroidFilter merged 1 commit into
nucleus-3.0from
fix/graalvm-appx-assets

Conversation

@kdroidFilter

Copy link
Copy Markdown
Collaborator

Problem

A GraalVM AppX (packageGraalvmAppX) shipped electron-builder's sample logos (the Electron atom), and the Microsoft Store rejects it as a generic icon. Seen on Zayit's submission: the appx.mapping of electron-builder maps SampleAppx.*.png to every assets\*Logo.png.

  • configureGraalvmPlatformPackageSettings never set the appx { } logos on the task: only the JVM pipeline (configureElectronBuilderPackageTask) did.
  • The fallback, the Windows icon, is a .ico, which ImageIO cannot read; the Linux PNG was not wired on Windows for GraalVM. So nothing was staged in build/appx.

Even with the logos wired, each one was a single unscaled image: Windows stretched the 44 px app icon for the taskbar and Start at high display scaling, on a plate.

Fix

  • The GraalVM pipeline wires the four logos and the Linux PNG fallback, as the JVM one does.
  • readIconImage reads .ico files: the largest entry, PNG or 32/24 bit bitmap (with its AND mask).
  • AppXAssets.kt: each logo is generated at scale-100/125/150/200/400, and the app icon (Square44x44Logo) at targetsize-16/24/32/48/256, plated, altform-unplated and altform-lightunplated, as Visual Studio does. Only qualified names, so electron-builder runs makepri and indexes them in resources.pri. A logo may now be an image of any size (≥ 4× recommended); a warning names the files a small source is enlarged for, and another when a logo falls back to electron-builder's sample.

Verification

  • AppXAssetsTest (10 tests): file names and sizes, fitting on a transparent canvas, enlargement report, ICO PNG / 32 bit / 24 bit masked entries, invalid input.
  • ktlintCheck, detektMain, ElectronBuilderPackageTaskInputsTest pass.
  • A real packageGraalvmAppX of Zayit with this plugin (--include-build): the package carries the 35 assets, resources.pri and resources.scale-*.pri, and the logos are Zayit's.

…et size

packageGraalvmAppX never received the appx { } logos (only the JVM task did), and its
fallback, the Windows .ico, cannot be read by ImageIO: nothing was staged and the package
shipped electron-builder's sample logos, which the Microsoft Store rejects as generic.

- the GraalVM pipeline wires the four logos and the Linux PNG fallback, as the JVM one
- the fallback reads .ico files (their largest PNG or 32/24 bit bitmap entry)
- each logo is generated at scale-100 to 400 and the app icon at targetsize-16 to 256,
  plated and unplated, so electron-builder indexes them in resources.pri and Windows picks
  the one for the display instead of stretching a single 44 px image
@kdroidFilter
kdroidFilter merged commit 3602b51 into nucleus-3.0 Oct 31, 2026
13 checks passed
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