App icon: hummingbird-key mark for window and packaged Linux builds
This commit is contained in:
parent
48efaad0d9
commit
8a644afd80
4 changed files with 14 additions and 0 deletions
|
|
@ -82,6 +82,18 @@ function resolveBackendPath(): string {
|
|||
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 {
|
||||
if (backendStarted && backend && backend.exitCode === null) {
|
||||
return;
|
||||
|
|
@ -500,6 +512,7 @@ function createWindow(): void {
|
|||
minWidth: 920,
|
||||
minHeight: 640,
|
||||
title: 'Keynectr',
|
||||
icon: resolveWindowIcon(),
|
||||
backgroundColor: '#f6f4f0',
|
||||
autoHideMenuBar: true,
|
||||
webPreferences: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue