fix: correct production icon path and refresh icon cache on RPM install

- icon-manager.ts: fix production path from '../dist/public' to '../dist'
  Vite copies public/ assets to the root of dist/, not dist/public/, so
  the old path caused electronAppExists() to return null in packaged
  builds — falling through to Electron's default icon in the taskbar
- rpm-after-install.sh: add gtk-update-icon-cache and
  update-desktop-database so GNOME/KDE picks up the installed icon and
  desktop entry immediately without a session restart

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
DhanushSantosh
2026-02-26 11:20:03 +05:30
parent 46ee34d499
commit 70c9fd77f6
2 changed files with 13 additions and 3 deletions

View File

@@ -28,9 +28,11 @@ export function getIconPath(): string | null {
}
// __dirname is apps/ui/dist-electron (Vite bundles all into single file)
// In production the asar layout is: /dist-electron/main.js and /dist/logo_larger.png
// Vite copies public/ assets to the root of dist/, NOT dist/public/
const iconPath = isDev
? path.join(__dirname, '../public', iconFile)
: path.join(__dirname, '../dist/public', iconFile);
: path.join(__dirname, '../dist', iconFile);
try {
if (!electronAppExists(iconPath)) {