fix(desktop): improve AppImage icon resolution#838
fix(desktop): improve AppImage icon resolution#838Chrono-byte wants to merge 3 commits intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Improves Linux desktop icon resolution (especially for AppImage packaging) by expanding the icon lookup paths and caching the resolved icon path to avoid repeated filesystem probing.
Changes:
- Add AppImage-specific icon resolution logic (e.g.,
.DirIcon,usr/share/icons/hicolor/...). - Cache the resolved AppImage icon path to avoid repeated
fs.existsSyncchecks. - Refactor imports/types and remove the desktop theme IPC handler.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
a0ecd00 to
a2c238f
Compare
|
My bad I pushed to the wrong remote across 2 pull requests, force pushed this one back. |
What Changed
Why
The Linux desktop build could launch without the correct window/taskbar icon when run as an AppImage, because the app was only checking generic resource paths that do not reliably exist in the packaged AppImage layout. This change makes icon resolution follow the actual AppImage filesystem structure so the packaged app displays the correct icon consistently.
Note
Fix AppImage icon resolution on Linux in desktop app
Adds a
resolveAppImageIconPathfunction in main.ts that searches AppImage-specific locations for a valid icon path when the bundledicon.<ext>resource is not found. It checks candidate roots derived fromprocess.resourcesPath, the executable directory,APPDIR, andAPPIMAGE, looking for.DirIconand PNG files in hicolor icon theme paths. Results are memoized to avoid repeated filesystem checks on subsequent calls.Macroscope summarized a2c238f.