From 76a4de692e7a18c4c5a7f7de950c6b750cc5742c Mon Sep 17 00:00:00 2001 From: Sean Darcy Date: Fri, 1 Jul 2022 03:29:56 +0000 Subject: [PATCH] configure desktop icon for linux appImages --- ts/mains/main_node.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ts/mains/main_node.ts b/ts/mains/main_node.ts index 0c486ad005..dff2c2255e 100644 --- a/ts/mains/main_node.ts +++ b/ts/mains/main_node.ts @@ -13,6 +13,7 @@ import { } from 'electron'; import path, { join } from 'path'; +import { platform as osPlatform } from 'process'; import url from 'url'; import os from 'os'; import fs from 'fs'; @@ -291,8 +292,11 @@ async function createWindow() { nativeWindowOpen: true, spellcheck: await getSpellCheckSetting(), }, + // only set icon for Linux, the executable one will be used by default for other platforms + icon: + (osPlatform === 'linux' && path.join(getAppRootPath(), 'images/session/session_icon.png')) || + undefined, ...picked, - // don't setup icon, the executable one will be used by default }; if (!_.isNumber(windowOptions.width) || windowOptions.width < minWidth) {