Skip to content

The installer's sidebar is made from the app's icon and accent, and config() writes to a folder of the user's own - #55

Merged
WillTDA merged 2 commits into
masterfrom
installer-sidebar
Oct 11, 2026
Merged

WillTDA merged 2 commits into
masterfrom
installer-sidebar

Conversation

@WillTDA

@WillTDA WillTDA commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

The welcome and finish pages, the installer's and the uninstaller's, show each app's own sidebar instead of electron-builder's stock laptop-and-arrow.

  • builder/sidebar.js, with no image library: a PNG reader on Node's zlib (8-bit RGB or RGBA, not interlaced, all five row filters; anything else refused, saying how to save it again), the icon scaled down by area averaging and centred with a drop shadow, on a gradient in the colour with soft shapes blurred by three box blurs, written as a 24-bit 164 × 314 BMP. The same icon and colour always make the same bytes.
  • The colour is --accent from src/styles/accent.css, or sidebar: { colour: "logo" } (the icon's most common colour, leaving out white, black and grey), or "#rrggbb". The icon is build.linux.icon, refused if it isn't a PNG.
  • config() sets nsis.installerSidebar and nsis.uninstallerSidebar (the same image) and refuses an app that sets either.
  • The include and the sidebar go to the kit's temp folder only when it's the user's own and can be written to; otherwise to a new folder beside it, so a folder another user made in a shared /tmp never stops a build.
  • The demo gains src/assets/icon.png (512 px, from its logo) as linux.icon.
  • docs/building.md: the sidebar, build.linux.icon needed, the two refused keys, the temp folder.

Unit tests: 270 (11 new): the reader with each filter and its refusals, the BMP's header and rows, the logo colour, the same input making the same bytes, config()'s new keys and refusals, and a temp folder that can't be written to. The capture's pictures show the sidebar on the welcome, finish, uninstall-welcome and uninstall-finish pages.

Waits on a yes to the sidebar's look before merging.

…, and writes to a folder of the user's own

builder/sidebar.js reads the app's build.linux.icon (8-bit RGB or RGBA PNG, not interlaced, every row filter, on Node's zlib), scales it down by area, centres it with a drop shadow on a blurred gradient in the colour, and writes a 24-bit 164 x 314 BMP. The colour is --accent from src/styles/accent.css, or sidebar: { colour: "logo" | "#rrggbb" }. config() sets nsis.installerSidebar and nsis.uninstallerSidebar and refuses an app that sets either.

The include and the sidebar go to the kit's temp folder only when it's the user's own and can be written to; otherwise to a new folder beside it, so a folder another user made in a shared /tmp never stops a build.

The demo gains src/assets/icon.png (512 px, from its logo) as linux.icon.
…json is in

The demo's electron-builder.cjs is also required from the kit's root (the Playwright tests), where src/assets/icon.png isn't. config() now takes the app's folder from where the package.json it's given was required, and only falls back to the working directory, electron-builder's own default.
@WillTDA
WillTDA merged commit 5d261b5 into master Oct 11, 2026
9 checks passed
@WillTDA
WillTDA deleted the installer-sidebar branch October 11, 2026 18:00
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