mirror of
https://github.com/atom/atom.git
synced 2026-02-02 10:45:14 -05:00
Setup crash reporter on 'will-finish-launching' event.
This commit is contained in:
@@ -2,7 +2,6 @@ AtomWindow = require './atom-window'
|
||||
BrowserWindow = require 'browser-window'
|
||||
Menu = require 'menu'
|
||||
autoUpdater = require 'auto-updater'
|
||||
crashReporter = require 'crash-reporter'
|
||||
app = require 'app'
|
||||
ipc = require 'ipc'
|
||||
dialog = require 'dialog'
|
||||
@@ -45,7 +44,6 @@ class AtomApplication
|
||||
@pathsToOpen ?= []
|
||||
@windows = []
|
||||
|
||||
@setupCrashReporter()
|
||||
@listenForArgumentsFromNewProcess()
|
||||
@setupNodePath()
|
||||
@setupJavaScriptArguments()
|
||||
@@ -89,11 +87,6 @@ class AtomApplication
|
||||
|
||||
process.env['NODE_PATH'] = resourcePaths.join path.delimiter
|
||||
|
||||
setupCrashReporter: ->
|
||||
crashReporter.setCompanyName 'GitHub'
|
||||
crashReporter.setSubmissionUrl 'https://speakeasy.githubapp.com/submit_crash_log'
|
||||
crashReporter.setAutoSubmit true
|
||||
|
||||
listenForArgumentsFromNewProcess: ->
|
||||
fs.unlinkSync socketPath if fs.existsSync(socketPath)
|
||||
server = net.createServer (connection) =>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
AtomApplication = require './atom-application'
|
||||
autoUpdater = require 'auto-updater'
|
||||
crashReporter = require 'crash-reporter'
|
||||
delegate = require 'atom-delegate'
|
||||
app = require 'app'
|
||||
fs = require 'fs'
|
||||
@@ -23,10 +24,8 @@ delegate.browserMainParts.preMainMessageLoopRun = ->
|
||||
app.on 'open-file', addPathToOpen
|
||||
|
||||
app.on 'will-finish-launching', ->
|
||||
autoUpdater.setFeedUrl 'https://speakeasy.githubapp.com/apps/27/appcast.xml'
|
||||
autoUpdater.setAutomaticallyChecksForUpdates true
|
||||
autoUpdater.setAutomaticallyDownloadsUpdates true
|
||||
autoUpdater.checkForUpdatesInBackground()
|
||||
setupCrashReporter()
|
||||
setupAutoUpdater()
|
||||
|
||||
app.on 'finish-launching', ->
|
||||
app.removeListener 'open-file', addPathToOpen
|
||||
@@ -39,6 +38,17 @@ delegate.browserMainParts.preMainMessageLoopRun = ->
|
||||
getHomeDir = ->
|
||||
process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME']
|
||||
|
||||
setupCrashReporter = ->
|
||||
crashReporter.setCompanyName 'GitHub'
|
||||
crashReporter.setSubmissionUrl 'https://speakeasy.githubapp.com/submit_crash_log'
|
||||
crashReporter.setAutoSubmit true
|
||||
|
||||
setupAutoUpdater = ->
|
||||
autoUpdater.setFeedUrl 'https://speakeasy.githubapp.com/apps/27/appcast.xml'
|
||||
autoUpdater.setAutomaticallyChecksForUpdates true
|
||||
autoUpdater.setAutomaticallyDownloadsUpdates true
|
||||
autoUpdater.checkForUpdatesInBackground()
|
||||
|
||||
parseCommandLine = ->
|
||||
version = fs.readFileSync(path.join(__dirname, '..', '..', 'version'), 'utf8')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user