All Projects → megahertz → Electron Simple Updater

megahertz / Electron Simple Updater

Licence: mit
Simple way to enable update for the electron application

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Electron Simple Updater

terraform-module-versions
CLI tool that checks Terraform code for module updates. Single binary, no dependencies. linux, osx, windows. #golang #cli #terraform
Stars: ✭ 143 (-51.03%)
Mutual labels:  update
no-ip
Noip.com Dynamic DNS update client built in Node.js
Stars: ✭ 33 (-88.7%)
Mutual labels:  update
Appimageupdate
AppImageUpdate lets you update AppImages in a decentral way using information embedded in the AppImage itself.
Stars: ✭ 261 (-10.62%)
Mutual labels:  update
grunt-dev-update
Automate the updating of your package.json packages with a grunt task
Stars: ✭ 29 (-90.07%)
Mutual labels:  update
kali-wsl
KALI LINUX : WINDOWS SUBSYSTEM FOR LINUX
Stars: ✭ 56 (-80.82%)
Mutual labels:  update
BM
The Utility to Install Songs, Install Mods, Install/Update BMBF, Install HitSounds, download automatically made Playlists, get better support, switch between the modded and unmodded Version of Beat Saber, do full Backups and way more
Stars: ✭ 33 (-88.7%)
Mutual labels:  update
AndroidUpdate
update library for android
Stars: ✭ 24 (-91.78%)
Mutual labels:  update
Gandalf
Easily notify a user with a simple alert, inform them of an optional update, and in dire situations block the user from accessing older versions of the application completely.
Stars: ✭ 286 (-2.05%)
Mutual labels:  update
pf4j-update
Update mechanism for PF4J
Stars: ✭ 56 (-80.82%)
Mutual labels:  update
Graphql To Mongodb
Allows for generic run-time generation of filter types for existing graphql types and parsing client requests to mongodb find queries
Stars: ✭ 261 (-10.62%)
Mutual labels:  update
Steam-Apps-Management-API
A basic Steam Application Management API and Valve Data Format (VDF) reader/writer.
Stars: ✭ 24 (-91.78%)
Mutual labels:  update
iQuail
Easy to use cross-platform installer & updater for desktop applications
Stars: ✭ 20 (-93.15%)
Mutual labels:  update
Xam.Plugin.AutoUpdate
Xamarin Forms plugin that auto updates your Android or UWP sideloaded application.
Stars: ✭ 22 (-92.47%)
Mutual labels:  update
SSAppUpdater
SSAppUpdater is an open-source framework that compares the current version of the app with the store version and returns the essential details of it like app URL, new app version number, new release note, etc. So you can either redirect or notify the user to update their app.
Stars: ✭ 58 (-80.14%)
Mutual labels:  update
Routeros Scripts
a collection of scripts for Mikrotik RouterOS
Stars: ✭ 270 (-7.53%)
Mutual labels:  update
UserCenter
Personal open source user center
Stars: ✭ 28 (-90.41%)
Mutual labels:  update
gitea-auto-update
A script which can update gitea via crontab automatically to a new version.
Stars: ✭ 25 (-91.44%)
Mutual labels:  update
Cordova Plugin App Update
App updater for Cordova/PhoneGap
Stars: ✭ 290 (-0.68%)
Mutual labels:  update
Onova
Unopinionated auto-update framework for desktop applications
Stars: ✭ 280 (-4.11%)
Mutual labels:  update
amazon-workmail-lambda-templates
Serverless applications for Amazon WorkMail.
Stars: ✭ 17 (-94.18%)
Mutual labels:  update

logo

electron-simple-updater

Build Status npm version

Description

This module allows to automatically update your application. You only need to install this module and write two lines of code! To publish your updates you just need a simple file hosting, it does not require a dedicated server.

Supported OS:

Differences between electron-simple-updater and built-in autoUpdater

  • Actually, autoUpdater is used inside.
  • Linux support.
  • It handles Squirrel.Windows install/update command line arguments.
  • It doesn't require a dedicated release server.
  • You need only 2 lines of code to make it work.

Installation

Install with npm:

npm install --save electron-simple-updater

Usage

Publish a new release

  1. Insert a link to a hosting where you will store updates.json to main.js. You can find a sample of updates.json in the example

    // Just place this code at the entry point of your application:
    const updater = require('src/index');
    updater.init('https://raw.githubusercontent.com/megahertz/electron-simple-updater/master/example/updates.json');
    

    You can set this link in package.json:updater.url instead of init() argument.

  2. Build your release using electron-builder or another tool. Note: Your application must be signed for automatic updates on macOS. This is a requirement of Squirrel.Mac.

  3. Upload your release with update.json to a hosting. You can do it manually or use electron-simple-publisher to simplify this process. Note: Squirrel.Mac requires a properly prepared release.json file. A release in the property url must be zipped .app file.

  4. That's it!

    Now your application will check for updates on start and download it automatically if an update is available. After app is restarted a new version will be loaded. But you can customize it to ask a user if he would like to install updates. See the example for details.

API

Options

You can set options when calling init() method or in package.json:updater section.

Name Default Description
autoDownload true Automatically download an update when it's found in updates.json
channel 'prod' An application which is built for channel like 'beta' will receive updates only from this channel
checkUpdateOnStart true Check for updates immediately when init() is called
disabled false Disable update feature. This option is set to true automatically for applications built for Mac App Store or Windows Store
logger console You can pass electron-log, winston or another logger with the following interface: { debug(), info(), warn() }. Set it to false if you would like to disable a logging feature
version app.getVersion() Current app version. In most cases, you should not pass this options manually, it is read by electron from version at package.json
url* undefined The only required parameter. This is a URL to updates.json file. You can use templates '{platform}', '{arch}' and '{channel}' in a file name.

Method

init(options)

Initialize a package. By default it finish the process if is run by Squirrel.Windows installer.

setFeedURL(url) deprecated

Sets the url and initialize the electron-simple-updater. Instead of built-in auto-updater init(), this method receives a URL to updates.json.

getFeedURL() deprecated

Return the current updates.json URL.

checkForUpdates()

Asks the server whether there is an update. url must be set before this call. Instead of built-in auto-updater, this method does not start downloading if autoDownload options is set to false.

downloadUpdate()

Start downloading update manually. You can use this method if autoDownload option is set to false

quitAndInstall()

Restarts the app and installs the update after it has been downloaded. It should only be called after update-downloaded has been emitted.

setOptions(name, value)

Set one or a few options. Pass an object as the name for multiple set.

Properties (read only)

These properties are mapped to options

  • build
  • channel
  • version
  • buildId - this string contains a build, a channel and version

Events

meta object of some events is a data from updates.json

error(err)

Emitted when there is an error while updating.

checking-for-update

Emitted when start downloading update.json file.

update-available(meta)

Emitted when there is an available update.

update-not-available

Emitted when there is no available update.

update-downloading(meta)

Emitted when star downloading an update.

update-downloaded(meta)

Emitted when an update has been downloaded.

squirrel-win-installer(event)

Emitted when the app is run by Squirrel.Windows when installing. The SimpleUpdater creates/removes shortcuts and finishes the process by default.

  • event.preventDefault - set to true if you would like to customize this action
  • event.squirrelAction - squirrel-install, squirrel-updated, squirrel-uninstall, squirrel-obsolete

Related

  • electron-builder - A complete solution to package and build an Electron app. Also it contains alternative implementation of update package.
  • electron-simple-publisher - Simple way to publish releases for electron-simple-updater

License

Licensed under MIT.

Logo was designed by prolko base on the original electron logo.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].