update auto-launch

This commit is contained in:
Mathias Rasmussen
2018-09-27 19:38:01 +02:00
parent 81e6d7f3a7
commit cde3298920
2 changed files with 3 additions and 11 deletions

View File

@@ -14,7 +14,7 @@
"airplayer": "^2.0.0",
"application-config": "^1.0.0",
"arch": "^2.0.0",
"auto-launch": "^4.0.1",
"auto-launch": "^5.0.5",
"bitfield": "^1.0.2",
"capture-frame": "^2.0.0",
"chokidar": "^2.0.4",

View File

@@ -3,19 +3,11 @@ module.exports = {
uninstall
}
const config = require('../config')
const { APP_NAME } = require('../config')
const AutoLaunch = require('auto-launch')
const { app } = require('electron')
// On Mac, work around a bug in auto-launch where it opens a Terminal window
// See https://github.com/Teamwork/node-auto-launch/issues/28#issuecomment-222194437
const appPath = process.platform === 'darwin'
? app.getPath('exe').replace(/\.app\/Content.*/, '.app')
: undefined // Use the default
const appLauncher = new AutoLaunch({
name: config.APP_NAME,
path: appPath,
name: APP_NAME,
isHidden: true
})