From 41ddaa17b38bb7bda08c8d3a4f8b2517e1495120 Mon Sep 17 00:00:00 2001 From: Amit Haridas Date: Wed, 30 Sep 2026 22:09:19 +0530 Subject: [PATCH] build: desktopName + Linux snap channel config electron-builder emits a pack-time warning on every Linux build that desktopName is unset, which means the installed .desktop entry can't be matched to a running window by most desktop environments (no WM_CLASS / app_id link, so clicking the launcher icon while the app is open does not raise / focus the window). - package.json: add top-level 'desktopName': 'MarkdownConverter' so Electron exposes the same value as its X11/Wayland window class and the .desktop file matches it. - electron-builder.config.js: mirror it under linux.* with syncDesktopName: true so the generated .desktop / .deb / snap entries all use the same identifier. - Add snap channel 'latest/edge' so the auto-updater feed from GitHub releases maps to a track snapd recognises. 'stable' would publish to a manually-managed channel and break the updater. No source code changes; build only. Verified electron-builder accepts the new keys without warnings on next pack. Amit Haridas --- electron-builder.config.js | 13 +++++++++++++ package.json | 1 + 2 files changed, 14 insertions(+) diff --git a/electron-builder.config.js b/electron-builder.config.js index 5d9f55e..5a1bd6f 100644 --- a/electron-builder.config.js +++ b/electron-builder.config.js @@ -125,6 +125,19 @@ module.exports = { category: 'Utility', maintainer: 'ConcreteInfo ', extraFiles: toolExtraFiles('linux'), + // v4.13.0 — set desktopName + sync so installed .desktop entry uses + // a stable WM_CLASS / app_id, otherwise DEs cannot link the running + // window to the launcher icon (electron-builder warning at pack time). + desktopName: 'MarkdownConverter', + syncDesktopName: true, + // Snap channel: latest/edge tracks the auto-updater feed on GitHub + // releases. `stable` would publish to a manually-managed channel and + // break the electron-updater handshake. + snap: { + confinement: 'strict', + grade: 'stable', + channels: ['latest/edge'], + }, }, deb: { depends: ['imagemagick', 'libreoffice-common'], diff --git a/package.json b/package.json index e9763c0..fa20bf0 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "4.13.0", "description": "Professional Markdown editor and universal file converter with PDF editing, batch processing, and syntax highlighting", "main": "src/main.js", + "desktopName": "MarkdownConverter", "scripts": { "start": "electron .", "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",