Merge branch 'master' into linux

This commit is contained in:
Cheng Zhao 2014-02-19 11:04:15 +00:00
commit d89fb15daf
12 changed files with 49 additions and 13 deletions

View file

@ -80,7 +80,9 @@ void AutoUpdater::CheckForUpdates(
void AutoUpdater::QuitAndInstall(
const v8::FunctionCallbackInfo<v8::Value>& args) {
AutoUpdater* self = AutoUpdater::Unwrap<AutoUpdater>(args.This());
self->quit_and_install_.Run();
if (!self->quit_and_install_.is_null())
self->quit_and_install_.Run();
}
// static

View file

@ -8,4 +8,18 @@ autoUpdater.on 'update-downloaded-raw', (args...) ->
args[3] = new Date(args[3]) # releaseDate
@emit 'update-downloaded', args..., => @quitAndInstall()
autoUpdater.quitAndInstall = ->
# If we don't have any window then quitAndInstall immediately.
BrowserWindow = require 'browser-window'
windows = BrowserWindow.getAllWindows()
if windows.length is 0
AutoUpdater::quitAndInstall.call this
return
# Do the restart after all windows have been closed.
app = require 'app'
app.removeAllListeners 'window-all-closed'
app.once 'window-all-closed', AutoUpdater::quitAndInstall.bind(this)
win.close() for win in windows
module.exports = autoUpdater

View file

@ -5,6 +5,7 @@ sendWrap = (channel, processId, routingId, args...) ->
BrowserWindow = require 'browser-window'
if processId?.constructor is BrowserWindow
window = processId
args = [routingId, args...]
processId = window.getProcessId()
routingId = window.getRoutingId()

View file

@ -11,7 +11,7 @@
<key>CFBundleIconFile</key>
<string>atom.icns</string>
<key>CFBundleVersion</key>
<string>0.9.2</string>
<string>0.9.3</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>

View file

@ -50,8 +50,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,9,2,0
PRODUCTVERSION 0,9,2,0
FILEVERSION 0,9,3,0
PRODUCTVERSION 0,9,3,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -68,12 +68,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "GitHub, Inc."
VALUE "FileDescription", "Atom-Shell"
VALUE "FileVersion", "0.9.2"
VALUE "FileVersion", "0.9.3"
VALUE "InternalName", "atom.exe"
VALUE "LegalCopyright", "Copyright (C) 2013 GitHub, Inc. All rights reserved."
VALUE "OriginalFilename", "atom.exe"
VALUE "ProductName", "Atom-Shell"
VALUE "ProductVersion", "0.9.2"
VALUE "ProductVersion", "0.9.3"
END
END
BLOCK "VarFileInfo"