fix: tray icon not appearing in production builds
Publish Release / publish (ubuntu-latest) (push) Failing after 7m3s
Publish Release / publish (macos-latest) (push) Canceled after 0s
Publish Release / publish (windows-latest) (push) Canceled after 0s

- Use extraResource config to copy assets outside of ASAR package
- Add debug logging for tray icon path resolution
- Bump version to 0.2.2
This commit is contained in:
Draculabo committed 2026-01-19 21:08:31 +08:00
1 parent 37b0fdeeb0
commit 465eb5d0a4
5 files changed
+18 -4

No files matched your search

+6 -1
View File
@@ -51,9 +51,14 @@ export function initTray(mainWindow: BrowserWindow) {
}
const inDevelopment = process.env.NODE_ENV === 'development';
// In production, extraResource copies 'src/assets' folder to 'resources/assets'
const iconPath = inDevelopment
? path.join(process.cwd(), 'src/assets/tray.png')
: path.join(process.resourcesPath, 'assets/tray.png');
: path.join(process.resourcesPath, 'assets', 'tray.png');
logger.info(
`Tray icon path: ${iconPath}, inDevelopment: ${inDevelopment}, resourcesPath: ${process.resourcesPath}`,
);
const icon = nativeImage.createFromPath(iconPath);