Electron-builder: feature request: add a pure out-of-box mode

Created on 31 Jul 2017  Â·  2Comments  Â·  Source: electron-userland/electron-builder

currently app have to do something manually like request check update, when available draw a UI, and handle callback when user confirm, do restart

it's complex and unstable, if app got exception, update may not work.

request add a pure out-of-box mode, app don't need to write code to handle update, or design UI. electron-builder implement a common flow and UI, like sparkle

electron-updater feature

Most helpful comment

Now (electron-updater 2.9.1) you can use autoUpdateer.checkForUpdatesAndNotify()

Your minimal app code (here we also set log to file):

import { autoUpdater } from "electron-updater"

export default class AppUpdater {
  constructor() {
    const log = require("electron-log")
    log.transports.file.level = "info"
    autoUpdater.logger = log
    autoUpdater.checkForUpdatesAndNotify()
  }
}

Please note — we just show system notification. I am totally agree with Electron Team in this aspect.

All 2 comments

Now (electron-updater 2.9.1) you can use autoUpdateer.checkForUpdatesAndNotify()

Your minimal app code (here we also set log to file):

import { autoUpdater } from "electron-updater"

export default class AppUpdater {
  constructor() {
    const log = require("electron-log")
    log.transports.file.level = "info"
    autoUpdater.logger = log
    autoUpdater.checkForUpdatesAndNotify()
  }
}

Please note — we just show system notification. I am totally agree with Electron Team in this aspect.

@devlar could you add an example image of what this experience looks like on GitHub or in the official documentation somewhere? I haven't been able to find one, it hard to know if this is the solution I'm looking for without first implementing it

Was this page helpful?
0 / 5 - 0 ratings