From 9293ef766badc26156281089b9fe7d45765a3eac Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 19 Nov 2014 13:55:10 -0800 Subject: [PATCH 1/4] Add update menus on Windows --- menus/win32.cson | 3 +++ 1 file changed, 3 insertions(+) diff --git a/menus/win32.cson b/menus/win32.cson index 3ce871942..e670d8c22 100644 --- a/menus/win32.cson +++ b/menus/win32.cson @@ -164,6 +164,9 @@ { label: 'View &Terms of Use', command: 'application:open-terms-of-use' } { label: 'View &License', command: 'application:open-license' } { label: 'VERSION', enabled: false } + { label: 'Restart and Install Update', command: 'application:install-update', visible: false} + { label: 'Check for Update', command: 'application:check-for-update', visible: false} + { label: 'Downloading Update', enabled: false, visible: false} { type: 'separator' } { label: '&Documentation', command: 'application:open-documentation' } { label: 'Roadmap', command: 'application:open-roadmap' } From 1c0c8db0425145e78d35c4e6b04ab09ab3c6a22c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 19 Nov 2014 14:05:12 -0800 Subject: [PATCH 2/4] Add unsupported state to update manager --- src/browser/auto-update-manager.coffee | 7 +++++++ src/browser/auto-updater-win32.coffee | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/browser/auto-update-manager.coffee b/src/browser/auto-update-manager.coffee index c9cd339ec..65b3ef14d 100644 --- a/src/browser/auto-update-manager.coffee +++ b/src/browser/auto-update-manager.coffee @@ -7,6 +7,7 @@ CheckingState = 'checking' DownladingState = 'downloading' UpdateAvailableState = 'update-available' NoUpdateAvailableState = 'no-update-available' +UnsupportedState = 'unsupported' ErrorState = 'error' module.exports = @@ -53,6 +54,12 @@ class AutoUpdateManager unless /\w{7}/.test(@version) @check(hidePopups: true) + switch process.platform + when 'win32' + @setState(UnsupportedState) unless autoUpdater.supportsUpdates() + when 'linux' + @setState(UnsupportedState) + emitUpdateAvailableEvent: (windows...) -> return unless @releaseVersion? and @releaseNotes for atomWindow in windows diff --git a/src/browser/auto-updater-win32.coffee b/src/browser/auto-updater-win32.coffee index 31af1a7aa..72e1d46ab 100644 --- a/src/browser/auto-updater-win32.coffee +++ b/src/browser/auto-updater-win32.coffee @@ -36,6 +36,9 @@ class AutoUpdater installUpdate: (callback) -> SquirrelUpdate.spawn(['--update', @updateUrl], callback) + supportsUpdates: -> + SquirrelUpdate.existsSync() + checkForUpdates: -> throw new Error('Update URL is not set') unless @updateUrl From 2a06ece3dfa510225115d1e4c06655ee471954ae Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 20 Nov 2014 12:40:04 -0800 Subject: [PATCH 3/4] :arrow_up: atom-shell@0.19.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b76115e8a..49b85fd89 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "url": "http://github.com/atom/atom/raw/master/LICENSE.md" } ], - "atomShellVersion": "0.19.4", + "atomShellVersion": "0.19.3", "dependencies": { "async": "0.2.6", "atom-keymap": "^2.3.0", From 66d6af54bf8bc56b03362950cf38d09b42b3ad18 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 21 Nov 2014 14:03:43 -0800 Subject: [PATCH 4/4] :arrow_up: atom-shell@0.19.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 49b85fd89..b76115e8a 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "url": "http://github.com/atom/atom/raw/master/LICENSE.md" } ], - "atomShellVersion": "0.19.3", + "atomShellVersion": "0.19.4", "dependencies": { "async": "0.2.6", "atom-keymap": "^2.3.0",