meteor-desktop icon indicating copy to clipboard operation
meteor-desktop copied to clipboard

How to AutoUpdate?

Open advancedsoftwarecanada opened this issue 6 years ago • 2 comments

It isn't precisely clear how to have my desktop client update to the latest version.

I have Windows + Meteor + AndroidSDK + Java running fine. I've built the installer, works great. I can connect to my production URL and it works.

However, I do not understand what exactly is required in an easy to understand tutorial how to make this work.

  • AutoUpdate URL?
  • Do I need to have source code on GitHub? I'm writing proprietary software..
  • Does this Meteor-Desktop package take care of all the head aches for me?

Sincerely, Andy

advancedsoftwarecanada avatar Aug 19 '18 20:08 advancedsoftwarecanada

It looks like using electron-updater would be the right solution here, at least if you're using electron-builder and not electron-packager

lunafi-evan avatar Aug 22 '18 16:08 lunafi-evan

electron-updater has to be run in the main process. Within the design of meteor-desktop, you only have access to the main process in your .desktop/desktop.js file, so it seems like you could just add the electron-updater npm package to your project and use it like the example in the docs, granted you've set up your publishing pipeline correctly.

import { autoUpdater } from "electron-updater"

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

lunafi-evan avatar Aug 25 '18 00:08 lunafi-evan