How to use the electron-updater.autoUpdater.downloadUpdate 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 z------------- / CPod / main.js View on Github external
dialog.showMessageBox(win, messageBoxOptions, (responseIndex) => {
              if (responseIndex === messageBoxOptions.defaultId) {
                autoUpdater.downloadUpdate(updateCheckResult.cancellationToken)
              } else if (responseIndex !== -1) {
                fs.writeFile(
                  path.join(app.getPath("userData"), "skip_version"),
                  info.version.toString(),
                  (err) => {
                    if (err) {
                      console.log("Error writing to skip_version file")
                    } else {
                      console.log("Wrote to skip_version file")
                    }
                  }
                )
              }
            })
          } catch (e) {
github MD-AZMAL / Sharp-Tune / main.js View on Github external
}, function (res) {
        if (res === 0) {
            autoUpdater.downloadUpdate();
        }
    });
});
github Criptext / Criptext-Email-React-Client / electron_app / src / updater.js View on Github external
const downloadUpdate = () => {
  autoUpdater.downloadUpdate();
  isDownloadingUpdate = true;
};
github crowbartools / Firebot / lib / autoUpdateManager.js View on Github external
function startDownload() {
    autoUpdater.checkForUpdates();
    autoUpdater.downloadUpdate();
}
github marktext / marktext / src / main / menu / actions / marktext.js View on Github external
ipcMain.on('mt::NEED_UPDATE', (e, { needUpdate }) => {
  if (needUpdate) {
    autoUpdater.downloadUpdate()
  } else {
    runningUpdate = false
  }
})
github eveningkid / reacto / public / window / updater.js View on Github external
buttonIndex => {
      if (buttonIndex === 0) {
        autoUpdater.downloadUpdate();
      } else {
        updater.enabled = true;
        updater = null;
      }
    }
  );
github padloc / padloc / packages / electron / src / main.ts View on Github external
return;
    }

    const { response, checkboxChecked } = await dialog.showMessageBox(win, {
        type: "info",
        message: `A new version of Padloc is available! (v${versionInfo.version})`,
        detail: htmlToText(versionInfo.releaseNotes as string),
        checkboxLabel: "Automatically download and install updates in the future (recommended)",
        buttons: ["Remind Me Later", "Download And Install"],
        defaultId: 1
    });

    settings.set("autoDownloadUpdates", checkboxChecked);

    if (response === 1) {
        autoUpdater.downloadUpdate();

        dialog.showMessageBox(win, {
            message: "Downloading Update...",
            detail: "The new version is being downloaded. You'll be notified when it is ready to be installed!"
        });
    }
}
github Gisto / Gisto / src / electron / updater.js View on Github external
(buttonIndex) => {
      if (buttonIndex === 0) {
        autoUpdater.downloadUpdate();
      } else {
        updater.enabled = true;
        updater = null;
      }
    }
  );
github anther / smashladder-desktop / app / main.dev.js View on Github external
ipcMain.on('autoUpdate-start', () => {
	autoUpdater.downloadUpdate();
});
ipcMain.on('windowFocusEvents', (event) => {
github changkun / changkun-blog-clients / desktop / src / handlers / updater.js View on Github external
}, (buttonIndex) => {
    if (buttonIndex === 0) {
      autoUpdater.downloadUpdate()
    } else {
      updater.enabled = true
      updater = null
    }
  })
})