2013-05-17 15:39:44 +08:00
|
|
|
bindings = process.atomBinding 'app'
|
2013-05-03 00:05:09 +08:00
|
|
|
EventEmitter = require('events').EventEmitter
|
|
|
|
|
2013-05-17 15:39:44 +08:00
|
|
|
Application = bindings.Application
|
|
|
|
Application::__proto__ = EventEmitter.prototype
|
|
|
|
|
|
|
|
app = new Application
|
|
|
|
|
2013-06-19 13:49:58 +08:00
|
|
|
app.getHomeDir = ->
|
|
|
|
process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME']
|
|
|
|
|
2013-05-17 15:39:44 +08:00
|
|
|
app.commandLine =
|
|
|
|
appendSwitch: bindings.appendSwitch,
|
|
|
|
appendArgument: bindings.appendArgument
|
2013-05-03 00:05:09 +08:00
|
|
|
|
2013-05-03 10:53:54 +08:00
|
|
|
# Only one App object pemitted.
|
2013-05-17 15:39:44 +08:00
|
|
|
module.exports = app
|