App icon: hummingbird-key mark for window and packaged Linux builds

This commit is contained in:
Avi 2026-08-24 11:33:45 -05:00
commit 8a644afd80
4 changed files with 14 additions and 0 deletions

BIN
frontend/build/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -82,6 +82,18 @@ function resolveBackendPath(): string {
return path.join(app.getAppPath(), '..', 'target', 'release', 'keynectr'); return path.join(app.getAppPath(), '..', 'target', 'release', 'keynectr');
} }
/**
* The app icon ships inside the bundle: Vite copies `public/icon.png` into
* `dist/`, so the packaged app finds it next to the loaded page. In dev the
* Vite project's `public/` folder is the same file.
*/
function resolveWindowIcon(): string {
const base = app.isPackaged
? path.join(app.getAppPath(), 'dist')
: path.join(app.getAppPath(), 'public');
return path.join(base, 'icon.png');
}
function startBackend(): void { function startBackend(): void {
if (backendStarted && backend && backend.exitCode === null) { if (backendStarted && backend && backend.exitCode === null) {
return; return;
@ -500,6 +512,7 @@ function createWindow(): void {
minWidth: 920, minWidth: 920,
minHeight: 640, minHeight: 640,
title: 'Keynectr', title: 'Keynectr',
icon: resolveWindowIcon(),
backgroundColor: '#f6f4f0', backgroundColor: '#f6f4f0',
autoHideMenuBar: true, autoHideMenuBar: true,
webPreferences: { webPreferences: {

View file

@ -65,6 +65,7 @@
"target": [ "target": [
"dir" "dir"
], ],
"icon": "build/icon.png",
"category": "Network", "category": "Network",
"executableName": "keynectr" "executableName": "keynectr"
} }

BIN
frontend/public/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB