From 7a13739ed0f3a755a50e4feba372954212afb382 Mon Sep 17 00:00:00 2001 From: Geomitron <22552797+Geomitron@users.noreply.github.com> Date: Tue, 19 May 2020 22:54:27 -0400 Subject: [PATCH] Fix appimage icon --- electron-builder.json | 3 ++- src/electron/main.ts | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/electron-builder.json b/electron-builder.json index 0f41cd2..24ff8c3 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -25,6 +25,7 @@ "compression": "maximum", "target": [ "AppImage" - ] + ], + "category": "utility" } } \ No newline at end of file diff --git a/src/electron/main.ts b/src/electron/main.ts index 4f5036a..75e235b 100644 --- a/src/electron/main.ts +++ b/src/electron/main.ts @@ -95,7 +95,7 @@ function createBridgeWindow() { * Initialize a BrowserWindow object with initial parameters */ function createBrowserWindow(windowState: windowStateKeeper.State) { - return new BrowserWindow({ + let options: Electron.BrowserWindowConstructorOptions = { x: windowState.x, y: windowState.y, width: windowState.width, @@ -109,7 +109,13 @@ function createBrowserWindow(windowState: windowStateKeeper.State) { }, simpleFullscreen: true, fullscreenable: false - }) + } + + if (process.platform == 'linux' && !isDevBuild) { + options = Object.assign(options, { icon: path.join(__dirname, '..', 'assets', 'images', 'system', 'icons', 'png', '48x48.png' ) }) + } + + return new BrowserWindow(options) } /**