File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,8 +5,15 @@ import { getProxyStatus } from './ipc/handlers'
55let tray : Tray | null = null
66let isProxyRunning = false
77
8+ function getIconPath ( ) : string {
9+ if ( app . isPackaged ) {
10+ return join ( process . resourcesPath , 'build/icon.png' )
11+ }
12+ return join ( __dirname , '../../build/icon.png' )
13+ }
14+
815function loadAppIcon ( ) : nativeImage {
9- const iconPath = join ( __dirname , '../../build/icon.png' )
16+ const iconPath = getIconPath ( )
1017
1118 try {
1219 let icon = nativeImage . createFromPath ( iconPath )
@@ -49,7 +56,7 @@ function createFallbackIcon(): nativeImage {
4956}
5057
5158function createRunningIcon ( ) : nativeImage {
52- const iconPath = join ( __dirname , '../../build/icon.png' )
59+ const iconPath = getIconPath ( )
5360
5461 try {
5562 let icon = nativeImage . createFromPath ( iconPath )
You can’t perform that action at this time.
0 commit comments