Revert "bump(electron): 0.35.4 => 0.36.2"

This reverts commit 863bda2f86.
This commit is contained in:
Ben Gotow 2016-01-08 10:06:09 -08:00
parent 2a5c1383f8
commit c0ff88d1b0
7 changed files with 54 additions and 48 deletions

View file

@ -11,7 +11,7 @@
"bugs": {
"url": "https://github.com/nylas/N1/issues"
},
"electronVersion": "0.36.2",
"electronVersion": "0.35.4",
"dependencies": {
"async": "^0.9",
"atom-keymap": "^6.1.1",

View file

@ -48,7 +48,7 @@ function makeSqlite3Command() {
// Use our local version of npm (npm 3x) to build sqlite
var npmPath = '"' + path.resolve(__dirname, '..', 'build', 'node_modules', '.bin', 'npm') + '"';
return npmPath + " install https://github.com/bengotow/node-sqlite3/archive/bengotow/usleep.tar.gz --ignore-scripts && cd node_modules/sqlite3 && "+nodeGypPath+" configure rebuild --target="+targetElectronVersion+" --arch="+targetArch+" --target_platform="+targetPlatform+" --dist-url=https://atom.io/download/atom-shell --module_name=node_sqlite3 --module_path=../lib/binding/node-v47-"+targetPlatform+"-"+targetArch
return npmPath + " install https://github.com/bengotow/node-sqlite3/archive/bengotow/usleep.tar.gz --ignore-scripts && cd node_modules/sqlite3 && "+nodeGypPath+" configure rebuild --target="+targetElectronVersion+" --arch="+targetArch+" --target_platform="+targetPlatform+" --dist-url=https://atom.io/download/atom-shell --module_name=node_sqlite3 --module_path=../lib/binding/node-v46-"+targetPlatform+"-"+targetArch
}
function bootstrap() {

View file

@ -1,5 +1,5 @@
# Start the crash reporter before anything else.
# require('crash-reporter').start(productName: 'N1', companyName: 'Nylas')
require('crash-reporter').start(productName: 'N1', companyName: 'Nylas')
path = require 'path'

View file

@ -85,7 +85,6 @@ class WindowManager
center: true
width: 640
height: 396
minHeight: 396
resizable: false
###

View file

@ -654,16 +654,18 @@ class NylasEnvConstructor extends Model
@deserializeSheetContainer()
@packages.activate()
@keymaps.loadUserKeymap()
@requireUserInitScript() unless safeMode
@menu.update()
@getCurrentWindow().hide()
@showRootWindow()
ipcRenderer.send('window-command', 'window:loaded')
showRootWindow: ->
document.getElementById("application-loading-cover").remove()
document.body.classList.add("window-loaded")
window.requestAnimationFrame =>
window.requestAnimationFrame =>
@restoreWindowDimensions()
@getCurrentWindow().show()
ipcRenderer.send('window-command', 'window:loaded')
@restoreWindowDimensions()
@getCurrentWindow().setMinimumSize(875, 500)
registerCommands: ->
{resourcePath} = @getLoadSettings()
@ -865,6 +867,17 @@ class NylasEnvConstructor extends Model
crashRenderProcess: ->
process.crash()
getUserInitScriptPath: ->
initScriptPath = fs.resolve(@getConfigDirPath(), 'init', ['js', 'coffee'])
initScriptPath ? path.join(@getConfigDirPath(), 'init.coffee')
requireUserInitScript: ->
if userInitScriptPath = @getUserInitScriptPath()
try
require(userInitScriptPath) if fs.isFileSync(userInitScriptPath)
catch error
console.log(error)
# Require the module with the given globals.
#
# The globals will be set on the `window` object and removed after the

View file

@ -3,7 +3,7 @@
<head>
<title></title>
<meta http-equiv="Content-Security-Policy" content="default-src *; script-src 'self'; style-src * 'unsafe-inline'; img-src * data:;">
<meta http-equiv="Content-Security-Policy" content="default-src *; script-src 'self'; style-src * 'unsafe-inline';">
<script src="index.js"></script>
</head>

View file

@ -49,13 +49,13 @@ function setupWindow (loadSettings) {
ModuleCache.add(loadSettings.resourcePath)
// Start the crash reporter before anything else.
// require('crash-reporter').start({
// productName: 'N1',
// companyName: 'Nylas',
// // By explicitly passing the app version here, we could save the call
// // of "require('remote').require('app').getVersion()".
// extra: {_version: loadSettings.appVersion}
// })
require('crash-reporter').start({
productName: 'N1',
companyName: 'Nylas',
// By explicitly passing the app version here, we could save the call
// of "require('remote').require('app').getVersion()".
extra: {_version: loadSettings.appVersion}
})
setupVmCompatibility()
setupCsonCache(CompileCache.getCacheDirectory())
@ -77,39 +77,33 @@ function setupVmCompatibility () {
window.onload = function() {
// wait for first frame, which will be blank
window.requestAnimationFrame(function() {
// wait for second frame, which is correct
window.requestAnimationFrame(function() {
try {
var startTime = Date.now();
try {
var startTime = Date.now();
var fs = require('fs');
var path = require('path');
var fs = require('fs');
var path = require('path');
// Skip "?loadSettings=".
var rawLoadSettings = decodeURIComponent(location.search.substr(14));
var loadSettings;
try {
loadSettings = JSON.parse(rawLoadSettings);
} catch (error) {
console.error("Failed to parse load settings: " + rawLoadSettings);
throw error;
}
// Skip "?loadSettings=".
var rawLoadSettings = decodeURIComponent(location.search.substr(14));
var loadSettings;
try {
loadSettings = JSON.parse(rawLoadSettings);
} catch (error) {
console.error("Failed to parse load settings: " + rawLoadSettings);
throw error;
}
if (loadSettings.loadingMessage) {
document.getElementById("application-loading-text-supplement").innerHTML = loadSettings.loadingMessage
}
if (loadSettings.loadingMessage) {
document.getElementById("application-loading-text-supplement").innerHTML = loadSettings.loadingMessage
}
// Normalize to make sure drive letter case is consistent on Windows
process.resourcesPath = path.normalize(process.resourcesPath);
// Normalize to make sure drive letter case is consistent on Windows
process.resourcesPath = path.normalize(process.resourcesPath);
setupWindow(loadSettings)
setLoadTime(Date.now() - startTime)
}
catch (error) {
handleSetupError(error)
}
});
});
setupWindow(loadSettings)
setLoadTime(Date.now() - startTime)
}
catch (error) {
handleSetupError(error)
}
}