Skip to content

0.1.0-beta.9

Pre-release
Pre-release

Choose a tag to compare

@WillTDA WillTDA released this 12 Oct 23:12
· 18 commits to master since this release
8dc7fdf

@diamonddigitaldev/electron-kit | Beta Preview (v0.1.0-beta.9)

Important

A beta: the API can still change between 0.x versions. It's published under npm's next tag.

The Windows installer gets its own look and clearer pages: a welcome page, file types as a tree, a page for the shortcuts, and a sidebar made from the app's icon and accent. The uninstaller can remove the app's settings and logs. An app on 0.1.0-beta.8 runs on it without a change to its config() call, as long as its build.linux.icon is a PNG and it has src/styles/accent.css (or gives sidebar.colour): see Changed.

npm install @diamonddigitaldev/electron-kit@next

New

  • A welcome page opens the installer: "Welcome to Setup", the version, and what it'll ask (who it's for, then the files it opens and its shortcuts, where the app has them). An update skips it.
  • Choose File Types is a tree: a branch per file type group, expanded, with a box per extension, and the Open With line above it. It scrolls, so the page's column limit, Tick All and Untick All are gone. An update skips it.
  • Shortcuts & Right-Click Menu, a page of its own: "Add a desktop shortcut", "Add a Start menu shortcut" and the right-click entry, all ticked (an app without an entry gets "Shortcuts"). The choices are kept, so an update never brings back a shortcut that was unticked, and never makes one the person deleted. Silently, /NODESKTOPSHORTCUT (or electron-builder's --no-desktop-shortcut) and /NOSTARTMENUSHORTCUT, beside /FILETYPES= and /NOCONTEXTMENU.
  • "Also remove settings and logs", an unticked box on the uninstaller's welcome page. Ticked, or with --delete-app-data, the app's data folders go too, retrying for a few seconds if Windows still holds one. A silent uninstall or an update keeps them.
  • The sidebar on the welcome and finish pages, the installer's and the uninstaller's, is made from the app's icon on a gradient in its accent, instead of electron-builder's stock picture. sidebar: { colour: "logo" } takes the icon's own main colour instead, and "#rrggbb" any colour. The kit makes it itself, with no image library.

Changed

  • build.linux.icon must be the app's icon as a PNG (512 × 512, 8-bit, not interlaced): the sidebar is made from it. config() says so if it isn't.
  • The sidebar is in --accent from src/styles/accent.css unless sidebar.colour says otherwise; without either, config() says what to give.
  • config() now also sets, and refuses from an app, nsis.installerSidebar, nsis.uninstallerSidebar, nsis.deleteAppDataOnUninstall and nsis.removeDefaultUninstallWelcomePage. A file type group's name can't start with - or !.
  • config() writes the installer's include and the sidebar to a temp folder of the user's own, so one another user made in a shared /tmp never stops a build.
  • electron-updater's own lines go to the kit's log, redacted, at debug, instead of to the console: its error dump (the URL with its query, the response headers, the stack) no longer reaches a terminal. The kit's one-line warning for a failed check, download or install is still logged as before.

Known

  • Without a Start menu shortcut, Windows doesn't deliver an app's notifications, though Electron still reports them shown. An app that relies on its notifications should say so near the box.

Docs

  • Building: the installer's pages, the switches, the sidebar and build.linux.icon, the uninstaller's box, the notifications note.
  • Updates: electron-updater's lines in the log.

The docs are in the repository: start at docs/README.md.

Found something wrong? Open an issue.