Skip to content

Commit

Permalink
Load app menu
Browse files Browse the repository at this point in the history
  • Loading branch information
inukshuk committed Jan 7, 2016
1 parent 1a1f71e commit 91accbb
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/browser/main.js
Expand Up @@ -8,15 +8,22 @@ const opts = args.parse(process.argv.slice(1))
process.env.NODE_ENV = opts.environment
process.env.DEBUG = opts.debug

const { app } = require('electron')
const { app, Menu } = require('electron')
const { join } = require('path')

if (opts.environment !== 'production') {
app.setPath('userData', join(process.cwd(), 'tmp', opts.environment))
}

const { info, verbose } = require('../common/log')(app.getPath('userData'))
const { info, verbose } =
require('../common/log')(app.getPath('userData'))

const tropy = new (require('./tropy'))(opts)
const res = require('../common/res')

res.Menu.open('app').then(menu => {
Menu.setApplicationMenu(Menu.buildFromTemplate(menu.template))
})

if (opts.environment !== 'test') {
if (app.makeSingleInstance(() => tropy.open())) {
Expand Down

0 comments on commit 91accbb

Please sign in to comment.