How to use the electron-updater.autoUpdater.checkForUpdatesAndNotify function in electron-updater

To help you get started, we’ve selected a few electron-updater examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github chrisknepper / android-messages-desktop / src / background.js View on Github external
// As of Electron 3 or 4, setting checked property (even to false) of multiple items in radio group results in
      // the first one always being checked, so we have to set it just on the one where checked should == true
      const checkedItemIndex = (trayManager.clickShortcut === 'double-click') ? 0 : 1;
      trayClickShortcutMenuItem.submenu.items[checkedItemIndex].checked = true;
   }

    notificationSoundEnabledMenuItem.checked = notificationSoundEnabled;
    pressEnterToSendMenuItem.checked = pressEnterToSendEnabled;
    hideNotificationContentMenuItem.checked = hideNotificationContent;
    useSystemDarkModeMenuItem.checked = useSystemDarkMode;

    state.notificationSoundEnabled = notificationSoundEnabled;
    state.notificationContentHidden = hideNotificationContent;
    state.useSystemDarkMode = useSystemDarkMode;

    autoUpdater.checkForUpdatesAndNotify();

    const mainWindowOptions = {
      width: 1100,
      height: 800,
      autoHideMenuBar: autoHideMenuBar,
      show: !(startInTray),  //Starts in tray if set
      titleBarStyle: IS_MAC ? 'hiddenInset' : 'default', //Turn on hidden frame on a Mac
      webPreferences: {
        contextIsolation: false,
        nodeIntegration: true,
        webviewTag: true
      }
    };

    if (IS_LINUX) {
      // Setting the icon in Linux tends to be finicky without explicitly setting it like this.
github eyasliu / electron-startkit / src / main / libs / core / updater.js View on Github external
constructor(options) {
    const { autoUpdater } = require('electron-updater')
    // const autoUpdater = new AppUpdater({
    //   autoInstallOnAppQuit: false,
    //   autoDownload: false,
    //   // logger:
    // })
    autoUpdater.quitAndInstallCalled = false
    // autoUpdater.autoDownload = false
    if (options.logger) {
      autoUpdater.logger = options.logger
      // autoUpdater.logger.transports.file.level = 'info'
    }
    autoUpdater.checkForUpdatesAndNotify()
    return autoUpdater
  }
}
github desertkun / hiera-editor / src / main.ts View on Github external
async function initialize() 
{
    autoUpdater.checkForUpdatesAndNotify();
    await init();
    projects_window.show();
}
github Gisto / Gisto / src / electron / main.js View on Github external
const createWindow = () => {
  log.transports.file.level = 'debug';
  autoUpdater.logger = log;
  autoUpdater.checkForUpdatesAndNotify();

  if (isDev) {
    helpers.setBadge('DEV');
    setTimeout(() => helpers.setBadge(app.getVersion()), 8000);
    helpers.installDevToolsExtentions();
  } else {
    helpers.setBadge(app.getVersion());
    setTimeout(() => helpers.setBadge(''), 8000);
  }

  const backgroundColor = settings.get('color', '#3F84A8');

  splashWindow = new BrowserWindow({
    width: 484,
    height: 272,
    backgroundColor,
github iotexproject / iotex-explorer / src / electron / src / main.js View on Github external
app.on("ready", function() {
  autoUpdater.checkForUpdatesAndNotify();
});
github hypermodules / hyperamp / main / index.js View on Github external
setTimeout(() => {
      autoUpdater.checkForUpdatesAndNotify()
    }, 500)
  }
github daftspunk / pond / version2 / app / main.dev.js View on Github external
constructor() {
    log.transports.file.level = 'info';
    autoUpdater.logger = log;
    autoUpdater.checkForUpdatesAndNotify();
  }
}
github mdyna / mdyna-app / index.js View on Github external
mainWindow.on('ready-to-show', () => {
    splash.destroy();
    mainWindow.show();

    logger.info(autoUpdater.checkForUpdatesAndNotify());
    logger.info('checkForUpdatesAndNotify');
  });
  mainWindow.on('focus', () => {
github macav / hotelier / public / electron.js View on Github external
const electron = require('electron');
const { app, BrowserWindow, ipcMain, Tray, Menu } = electron;
const path = require('path');
const url = require('url');
const positioner = require('electron-traywindow-positioner');
var EventSource = require('eventsource');
const { hotelUrl } = require('./hotel-config');
const { autoUpdater } = require("electron-updater")

autoUpdater.checkForUpdatesAndNotify();

const assetsDirectory = path.join(__dirname, './assets');

const output = new EventSource(`${hotelUrl}/_/events/output`);
output.addEventListener('message', event => {
  logsWindow.webContents.send('output', JSON.parse(event.data));
  window.webContents.send('output', JSON.parse(event.data));
});

const events = new EventSource(`${hotelUrl}/_/events`);
events.addEventListener('message', event => {
  logsWindow.webContents.send('events', JSON.parse(event.data));
  window.webContents.send('events', JSON.parse(event.data));
});

let tray;
github apsavin / pgrights / src / main.dev.js View on Github external
constructor() {
    log.transports.file.level = 'info';
    autoUpdater.logger = log;
    autoUpdater.checkForUpdatesAndNotify();
  }
}