From 4cc1e8a62ba129c194ff2716afcf7c7c84565847 Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Thu, 8 Feb 2018 01:48:59 +0300 Subject: [PATCH] fix(unix): resolve problem with icon part at some systems Fix #3 --- src/background/background.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/background/background.js b/src/background/background.js index ea2edf3..e4b58ce 100644 --- a/src/background/background.js +++ b/src/background/background.js @@ -37,6 +37,8 @@ if (env.name !== "production") { app.setPath("userData", `${userDataPath} (${env.name})`); } +const resourcesPath = env.name === "production" ? process.resourcesPath : 'resources' + const spiderCall = require('./spider') const appConfig = require('./config') @@ -249,7 +251,7 @@ app.on("ready", () => { mainWindow.openDevTools(); } - tray = new Tray('resources/icons/512x512.png') + tray = new Tray(`${resourcesPath}/icons/512x512.png`) tray.on('click', () => { mainWindow.isVisible() ? mainWindow.hide() : mainWindow.show()