fix: tray icon not appearing in production builds
- 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:
1 parent
37b0fdeeb0
commit
465eb5d0a4
5 files changed
+18
-4
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user