From 18aa23c5d8d6dafd4c9d05a931e09aa288849e05 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Tue, 28 May 2019 22:17:54 -0500 Subject: [PATCH] Fix Linux icon --- package.json | 1 - public/electron.js | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 501db0b..26e8f81 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,6 @@ ], "linux": { "category": "Utility", - "icon": "./build/logo.png", "target": "AppImage" }, "mac": { diff --git a/public/electron.js b/public/electron.js index 9ddeebf..6168316 100644 --- a/public/electron.js +++ b/public/electron.js @@ -31,6 +31,7 @@ let firstMountCheck = true; let manualMountDetection = {}; let isQuiting = false; + app.on('before-quit', function () { isQuiting = true; }); @@ -66,6 +67,13 @@ function setWindowVisibility(show) { function createWindow() { loadUiSettings(); + let extra = {}; + if (os.platform() === 'linux') { + extra = { + icon: path.join(__dirname, '../', 'icon.png'), + } + } + // Create the browser window. const height = (process.env.ELECTRON_START_URL || (os.platform() === 'darwin') ? 364 : 344) - ((os.platform() === 'win32') ? 0 : 20); mainWindow = new BrowserWindow({ @@ -75,6 +83,7 @@ function createWindow() { resizable: false, show: !launchHidden, title: 'Repertory UI', + ...extra, webPreferences: { webSecurity: !process.env.ELECTRON_START_URL }