Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron Auto Updater [Main Process] #1289

Closed
Kronenberg opened this issue Oct 29, 2017 · 5 comments
Closed

Electron Auto Updater [Main Process] #1289

Kronenberg opened this issue Oct 29, 2017 · 5 comments

Comments

@Kronenberg
Copy link

Question is: as i understand correctly i can run Auto Updater only from main process, but in this boilerplate how i can hook the main process, does anyone can provide me an example.
Great Thx!

@Nantris
Copy link
Contributor

Nantris commented Dec 2, 2017

In main.dev.js

import AppUpdater from "./AppUpdater";
// Put the next line within the window creation function
new AppUpdater();

In a new file named AppUpdater

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()
  }
}

@deadcoder0904
Copy link

@slapbox I think this should be put in the docs itself as this was a hard find. I mean the main.dev.js contents :)

@Nantris
Copy link
Contributor

Nantris commented Aug 11, 2018

@deadcoder0904
Copy link

@slapbox Thanks but I thought this was Electron Builder Repo lol 😂 & I came looking from there. But anyways thank you.

@Nantris
Copy link
Contributor

Nantris commented Aug 12, 2018

Haha I'd hope it would be easier to find in their docs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants