 require 'coffee-react/register'
-path = require 'path-extra'
+{join} = require 'path-extra'
 fs = require 'fs-extra'
 os = require 'os'
 semver = require 'semver'


# Environments
window.remote = require('electron').remote
window.ROOT = path.join(__dirname, '..')
window.Tray = remote.require('electron').Tray
window.EXROOT = remote.getGlobal 'EXROOT'
window.APPDATA_PATH = remote.getGlobal 'APPDATA_PATH'
window.PLUGIN_PATH = path.join window.APPDATA_PATH, 'plugins'
window.POI_VERSION = remote.getGlobal 'POI_VERSION'
window.SERVER_HOSTNAME = remote.getGlobal 'SERVER_HOSTNAME'
window.MODULE_PATH = remote.getGlobal 'MODULE_PATH'
fs.ensureDirSync window.PLUGIN_PATH
fs.ensureDirSync path.join window.PLUGIN_PATH, 'node_modules'

# Shortcuts and Components
(window.dbg = require path.join(ROOT, 'lib', 'debug')).init()
window._ = require 'underscore'
window.$ = (param) -> document.querySelector(param)
window.$$ = (param) -> document.querySelectorAll(param)
window.jQuery = require path.join(ROOT, 'components/jquery/dist/jquery')
window.React = require 'react'
window.ReactDOM = require 'react-dom'
window.ReactBootstrap = require 'react-bootstrap'

        body: msg
        silent: true
    else
      appIcon = new Tray(join(ROOT, 'assets', 'icons', 'poi.ico'));
      appIcon.displayBalloon
        title: title
        icon: icon
