implement barebones auto updater

This commit is contained in:
Feross Aboukhadijeh
2016-03-21 01:39:24 -07:00
parent 3ba4b563ac
commit e7e7afab3b
3 changed files with 52 additions and 1 deletions

View File

@@ -1,12 +1,18 @@
var applicationConfigPath = require('application-config-path')
var path = require('path')
var APP_VERSION = require('./package.json').version
module.exports = {
APP_COPYRIGHT: 'Copyright © 2014-2016 The WebTorrent Project',
APP_FILE_ICON: path.join(__dirname, 'static', 'WebTorrentFile'),
APP_ICON: path.join(__dirname, 'static', 'WebTorrent'),
APP_NAME: 'WebTorrent',
AUTO_UPDATE_URL: 'https://webtorrent.io/app/updates?version=' + APP_VERSION,
AUTO_UPDATE_CHECK_STARTUP_DELAY: 60 * 1000 /* 1 minute */,
AUTO_UPDATE_CHECK_INTERVAL: 6 * 60 * 60 * 1000 /* 6 hours */,
CONFIG_PATH: applicationConfigPath('WebTorrent'),
CONFIG_POSTER_PATH: path.join(applicationConfigPath('WebTorrent'), 'Posters'),
CONFIG_TORRENT_PATH: path.join(applicationConfigPath('WebTorrent'), 'Torrents'),