mirror of
https://github.com/lone-cloud/gerbil
synced 2026-06-03 19:54:44 -07:00
icon for the system tray wasn't being found correctly for packaged releases
This commit is contained in:
parent
de67b36629
commit
3d62d9d00c
2 changed files with 11 additions and 8 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "gerbil",
|
"name": "gerbil",
|
||||||
"productName": "Gerbil",
|
"productName": "Gerbil",
|
||||||
"version": "1.6.2",
|
"version": "1.6.3",
|
||||||
"description": "Run Large Language Models locally",
|
"description": "Run Large Language Models locally",
|
||||||
"main": "out/main/index.js",
|
"main": "out/main/index.js",
|
||||||
"homepage": "./",
|
"homepage": "./",
|
||||||
|
|
@ -109,6 +109,12 @@
|
||||||
"to": "assets/kcpp_sdui.embd"
|
"to": "assets/kcpp_sdui.embd"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"extraResources": [
|
||||||
|
{
|
||||||
|
"from": "src/assets/icon.png",
|
||||||
|
"to": "icon.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
"mac": {
|
"mac": {
|
||||||
"compression": "maximum",
|
"compression": "maximum",
|
||||||
"category": "public.app-category.productivity",
|
"category": "public.app-category.productivity",
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import {
|
||||||
MenuItemConstructorOptions,
|
MenuItemConstructorOptions,
|
||||||
} from 'electron';
|
} from 'electron';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
import { resourcesPath, platform } from 'process';
|
import { platform, resourcesPath } from 'process';
|
||||||
import { getEnableSystemTray } from './config';
|
import { getEnableSystemTray } from './config';
|
||||||
import { getMainWindow } from './window';
|
import { getMainWindow } from './window';
|
||||||
import type { CpuMetrics, MemoryMetrics, GpuMetrics } from './monitoring';
|
import type { CpuMetrics, MemoryMetrics, GpuMetrics } from './monitoring';
|
||||||
|
|
@ -184,12 +184,9 @@ export function createTray() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let iconPath: string;
|
const iconPath = app.isPackaged
|
||||||
if (app.isPackaged) {
|
? join(resourcesPath, 'icon.png')
|
||||||
iconPath = join(resourcesPath, 'assets', 'icon.png');
|
: join(__dirname, '../../src/assets/icon.png');
|
||||||
} else {
|
|
||||||
iconPath = join(__dirname, '../../src/assets/icon.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
const icon = nativeImage.createFromPath(iconPath);
|
const icon = nativeImage.createFromPath(iconPath);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue