diff --git a/package.json b/package.json index a0fa0c84..47b7126f 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/main/startup.js b/src/main/startup.js index 443c69c8..7f05e600 100644 --- a/src/main/startup.js +++ b/src/main/startup.js @@ -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 })