Repository navigation
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
Merged
Conversation
…, 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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'szlib(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.--accentfromsrc/styles/accent.css, orsidebar: { colour: "logo" }(the icon's most common colour, leaving out white, black and grey), or"#rrggbb". The icon isbuild.linux.icon, refused if it isn't a PNG.config()setsnsis.installerSidebarandnsis.uninstallerSidebar(the same image) and refuses an app that sets either./tmpnever stops a build.src/assets/icon.png(512 px, from its logo) aslinux.icon.docs/building.md: the sidebar,build.linux.iconneeded, 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.