From b71298aa50a2d8291227eecf986ef389b2aa0520 Mon Sep 17 00:00:00 2001 From: Danny Qiu Date: Fri, 1 May 2020 05:36:17 -0700 Subject: Review launch on startup for macOS, start Ferdi app, not renderer (#696) --- src/stores/AppStore.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 96142787e..153fdb2c8 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js @@ -33,8 +33,11 @@ const { const mainWindow = remote.getCurrentWindow(); const defaultLocale = DEFAULT_APP_SETTINGS.locale; + +const executablePath = isMac ? remote.process.execPath : process.execPath; const autoLauncher = new AutoLaunch({ name: 'Ferdi', + path: executablePath, }); const CATALINA_NOTIFICATION_HACK_KEY = '_temp_askedForCatalinaNotificationPermissions'; @@ -324,8 +327,10 @@ export default class AppStore extends Store { try { if (enable) { + debug('enabling launch on startup', executablePath); autoLauncher.enable(); } else { + debug('disabling launch on startup'); autoLauncher.disable(); } } catch (err) { -- cgit v1.2.3-54-g00ecf