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
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [0.2.2] - 2026-01-19
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Fixed tray icon not appearing in production builds on Windows
|
||||||
|
- Used `extraResource` config to properly copy assets outside of ASAR package
|
||||||
|
- Added debug logging for tray icon path resolution
|
||||||
|
|
||||||
## [0.2.1] - 2026-01-19
|
## [0.2.1] - 2026-01-19
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ const config: ForgeConfig = {
|
|||||||
name: 'Antigravity Manager',
|
name: 'Antigravity Manager',
|
||||||
executableName: 'antigravity-manager',
|
executableName: 'antigravity-manager',
|
||||||
icon: 'images/icon', // Electron Forge automatically adds .icns/.ico
|
icon: 'images/icon', // Electron Forge automatically adds .icns/.ico
|
||||||
|
extraResource: ['src/assets'], // Copy assets folder to resources/assets
|
||||||
},
|
},
|
||||||
rebuildConfig: {},
|
rebuildConfig: {},
|
||||||
hooks: {
|
hooks: {
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "antigravity-manager",
|
"name": "antigravity-manager",
|
||||||
"version": "0.2.1",
|
"version": "0.2.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "antigravity-manager",
|
"name": "antigravity-manager",
|
||||||
"version": "0.2.1",
|
"version": "0.2.2",
|
||||||
"license": "CC-BY-NC-SA-4.0",
|
"license": "CC-BY-NC-SA-4.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "^1.14.3",
|
"@grpc/grpc-js": "^1.14.3",
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "antigravity-manager",
|
"name": "antigravity-manager",
|
||||||
"productName": "Antigravity Manager",
|
"productName": "Antigravity Manager",
|
||||||
"version": "0.2.1",
|
"version": "0.2.2",
|
||||||
"description": "Antigravity Manager - Electron App",
|
"description": "Antigravity Manager - Electron App",
|
||||||
"main": ".vite/build/main.js",
|
"main": ".vite/build/main.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@@ -51,9 +51,14 @@ export function initTray(mainWindow: BrowserWindow) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const inDevelopment = process.env.NODE_ENV === 'development';
|
const inDevelopment = process.env.NODE_ENV === 'development';
|
||||||
|
// In production, extraResource copies 'src/assets' folder to 'resources/assets'
|
||||||
const iconPath = inDevelopment
|
const iconPath = inDevelopment
|
||||||
? path.join(process.cwd(), 'src/assets/tray.png')
|
? 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);
|
const icon = nativeImage.createFromPath(iconPath);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user