new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Electron · API · all subjects

autoupdater/platform

6 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

autoUpdater platform support

The autoUpdater module supports macOS and Windows. Linux does not have built-in auto-updater support and should use the distribution's package manager instead.

macOS autoUpdater implementation

On macOS, autoUpdater is built upon Squirrel.Mac and requires no special setup. The application must be signed for automatic updates to work, as this is a requirement of Squirrel.Mac. App Transport Security (ATS) applies to all requests made during the update process; apps that need to disable ATS can add the NSAllowsArbitraryLoads key to their app's plist.

Windows autoUpdater packaging detection

On Windows, the autoUpdater module automatically selects the appropriate update mechanism based on how the app is packaged. For MSIX packages (created with electron-windows-msix and detected via process.windowsStore), it uses the MSIX updater supporting direct MSIX file links and JSON update feeds. For apps installed via traditional installers (created with electron-winstaller or Electron Forge's Squirrel.Windows maker), it uses Squirrel.Windows for updates. No manual configuration is required.

Squirrel.Windows first-run behavior

Apps built with Squirrel.Windows launch with the --squirrel-firstrun argument immediately after installation. During this time, Squirrel.Windows holds a file lock on the app, causing autoUpdater requests to fail until the lock is released. This means update checks will fail for the first few seconds after installation. Workarounds include checking if process.argv contains --squirrel-firstrun or setting a 10-second timeout on update checks.

Squirrel.Windows app shortcut naming

The installer generated with Squirrel.Windows creates a shortcut icon with an Application User Model ID in the format com.squirrel.PACKAGE_ID.YOUR_EXE_WITHOUT_DOT_EXE, such as com.squirrel.slack.Slack and com.squirrel.code.Code. The same ID must be set with app.setAppUserModelId() for Windows to properly pin the app in the task bar.

MSIX autoUpdater additional functionality

When the app is packaged as MSIX, the autoUpdater module provides additional functionality: the allowAnyVersion option in setFeedURL() allows updates to older versions (downgrades), and it supports both direct MSIX file links and JSON update feeds similar to Squirrel.Mac format.

Give your agent this brain