Merge branch 'master' into linux
This commit is contained in:
commit
d89fb15daf
12 changed files with 49 additions and 13 deletions
|
@ -5,6 +5,7 @@
|
||||||
#include "app/atom_main_delegate.h"
|
#include "app/atom_main_delegate.h"
|
||||||
|
|
||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
|
#include "base/debug/stack_trace.h"
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "browser/atom_browser_client.h"
|
#include "browser/atom_browser_client.h"
|
||||||
#include "content/public/common/content_switches.h"
|
#include "content/public/common/content_switches.h"
|
||||||
|
@ -40,6 +41,11 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||||
// Logging with pid and timestamp.
|
// Logging with pid and timestamp.
|
||||||
logging::SetLogItems(true, false, true, false);
|
logging::SetLogItems(true, false, true, false);
|
||||||
|
|
||||||
|
// Enable convient stack printing.
|
||||||
|
#if defined(DEBUG)
|
||||||
|
base::debug::EnableInProcessStackDumping();
|
||||||
|
#endif
|
||||||
|
|
||||||
return brightray::MainDelegate::BasicStartupComplete(exit_code);
|
return brightray::MainDelegate::BasicStartupComplete(exit_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,9 @@ void AutoUpdater::CheckForUpdates(
|
||||||
void AutoUpdater::QuitAndInstall(
|
void AutoUpdater::QuitAndInstall(
|
||||||
const v8::FunctionCallbackInfo<v8::Value>& args) {
|
const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
AutoUpdater* self = AutoUpdater::Unwrap<AutoUpdater>(args.This());
|
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
|
// static
|
||||||
|
|
|
@ -8,4 +8,18 @@ autoUpdater.on 'update-downloaded-raw', (args...) ->
|
||||||
args[3] = new Date(args[3]) # releaseDate
|
args[3] = new Date(args[3]) # releaseDate
|
||||||
@emit 'update-downloaded', args..., => @quitAndInstall()
|
@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
|
module.exports = autoUpdater
|
||||||
|
|
|
@ -5,6 +5,7 @@ sendWrap = (channel, processId, routingId, args...) ->
|
||||||
BrowserWindow = require 'browser-window'
|
BrowserWindow = require 'browser-window'
|
||||||
if processId?.constructor is BrowserWindow
|
if processId?.constructor is BrowserWindow
|
||||||
window = processId
|
window = processId
|
||||||
|
args = [routingId, args...]
|
||||||
processId = window.getProcessId()
|
processId = window.getProcessId()
|
||||||
routingId = window.getRoutingId()
|
routingId = window.getRoutingId()
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>atom.icns</string>
|
<string>atom.icns</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>0.9.2</string>
|
<string>0.9.3</string>
|
||||||
<key>NSMainNibFile</key>
|
<key>NSMainNibFile</key>
|
||||||
<string>MainMenu</string>
|
<string>MainMenu</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
|
|
|
@ -50,8 +50,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 0,9,2,0
|
FILEVERSION 0,9,3,0
|
||||||
PRODUCTVERSION 0,9,2,0
|
PRODUCTVERSION 0,9,3,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -68,12 +68,12 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "GitHub, Inc."
|
VALUE "CompanyName", "GitHub, Inc."
|
||||||
VALUE "FileDescription", "Atom-Shell"
|
VALUE "FileDescription", "Atom-Shell"
|
||||||
VALUE "FileVersion", "0.9.2"
|
VALUE "FileVersion", "0.9.3"
|
||||||
VALUE "InternalName", "atom.exe"
|
VALUE "InternalName", "atom.exe"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2013 GitHub, Inc. All rights reserved."
|
VALUE "LegalCopyright", "Copyright (C) 2013 GitHub, Inc. All rights reserved."
|
||||||
VALUE "OriginalFilename", "atom.exe"
|
VALUE "OriginalFilename", "atom.exe"
|
||||||
VALUE "ProductName", "Atom-Shell"
|
VALUE "ProductName", "Atom-Shell"
|
||||||
VALUE "ProductVersion", "0.9.2"
|
VALUE "ProductVersion", "0.9.3"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#define ATOM_MAJOR_VERSION 0
|
#define ATOM_MAJOR_VERSION 0
|
||||||
#define ATOM_MINOR_VERSION 9
|
#define ATOM_MINOR_VERSION 9
|
||||||
#define ATOM_PATCH_VERSION 2
|
#define ATOM_PATCH_VERSION 3
|
||||||
|
|
||||||
#define ATOM_VERSION_IS_RELEASE 1
|
#define ATOM_VERSION_IS_RELEASE 1
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "atom-shell",
|
"name": "atom-shell",
|
||||||
"version": "0.9.2",
|
"version": "0.9.3",
|
||||||
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"coffee-script": "~1.6.3",
|
"coffee-script": "~1.6.3",
|
||||||
|
|
|
@ -50,6 +50,11 @@ window.onerror = (error) ->
|
||||||
else
|
else
|
||||||
false
|
false
|
||||||
|
|
||||||
|
# Override default window.close, see:
|
||||||
|
# https://github.com/atom/atom-shell/issues/70
|
||||||
|
window.close = ->
|
||||||
|
require('remote').getCurrentWindow().close()
|
||||||
|
|
||||||
# Override default window.open.
|
# Override default window.open.
|
||||||
window.open = (url, name, features) ->
|
window.open = (url, name, features) ->
|
||||||
options = {}
|
options = {}
|
||||||
|
|
|
@ -11,6 +11,8 @@ SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
os.environ['CI'] = '1'
|
||||||
|
|
||||||
rm_rf(os.path.join(SOURCE_ROOT, 'out'))
|
rm_rf(os.path.join(SOURCE_ROOT, 'out'))
|
||||||
rm_rf(os.path.join(SOURCE_ROOT, 'node_modules'))
|
rm_rf(os.path.join(SOURCE_ROOT, 'node_modules'))
|
||||||
rm_rf(os.path.join(SOURCE_ROOT, 'frameworks'))
|
rm_rf(os.path.join(SOURCE_ROOT, 'frameworks'))
|
||||||
|
|
|
@ -36,6 +36,8 @@ def download(text, url, path):
|
||||||
downloaded_size = 0
|
downloaded_size = 0
|
||||||
block_size = 128
|
block_size = 128
|
||||||
|
|
||||||
|
ci = os.environ.get('CI') == '1'
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
buf = web_file.read(block_size)
|
buf = web_file.read(block_size)
|
||||||
if not buf:
|
if not buf:
|
||||||
|
@ -44,11 +46,15 @@ def download(text, url, path):
|
||||||
downloaded_size += len(buf)
|
downloaded_size += len(buf)
|
||||||
local_file.write(buf)
|
local_file.write(buf)
|
||||||
|
|
||||||
percent = downloaded_size * 100. / file_size
|
if not ci:
|
||||||
status = "\r%s %10d [%3.1f%%]" % (text, downloaded_size, percent)
|
percent = downloaded_size * 100. / file_size
|
||||||
print status,
|
status = "\r%s %10d [%3.1f%%]" % (text, downloaded_size, percent)
|
||||||
|
print status,
|
||||||
|
|
||||||
print
|
if ci:
|
||||||
|
print "%s done." % (text)
|
||||||
|
else:
|
||||||
|
print
|
||||||
|
|
||||||
|
|
||||||
def extract_tarball(tarball_path, member, destination):
|
def extract_tarball(tarball_path, member, destination):
|
||||||
|
|
|
@ -33,7 +33,7 @@ describe 'browser-window module', ->
|
||||||
w.loadUrl 'file://' + path.join(fixtures, 'api', 'beforeunload-false.html')
|
w.loadUrl 'file://' + path.join(fixtures, 'api', 'beforeunload-false.html')
|
||||||
|
|
||||||
describe 'window.close()', ->
|
describe 'window.close()', ->
|
||||||
xit 'should emit unload handler', (done) ->
|
it 'should emit unload handler', (done) ->
|
||||||
w = new BrowserWindow(show: false)
|
w = new BrowserWindow(show: false)
|
||||||
w.on 'closed', ->
|
w.on 'closed', ->
|
||||||
test = path.join(fixtures, 'api', 'close')
|
test = path.join(fixtures, 'api', 'close')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue