File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,10 @@ extraResources:
2020 - from : dist/core/config.js
2121 to : core/config.js
2222
23- - resources/**
23+ - from : resources
24+ to : .
25+ filter :
26+ - ' **/*'
2427executableName : munliwall
2528
2629linux :
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import { startWallpaperService } from '@munlicode/munliwall-core'
1212import { registerIPCHandlers } from './handlers/index.js'
1313import { createMenu } from './menu.js'
1414import path from 'path'
15- import icon from '../../resources/icon.png?asset'
1615
1716const currentDir = __dirname
1817const projectRoot = path . join ( currentDir , '../../../../' )
@@ -22,13 +21,22 @@ if (process.env.NODE_ENV === 'development') {
2221}
2322const preloadPath = path . join ( __dirname , '../preload/index.js' )
2423
24+ function getIconPath ( ) : string {
25+ if ( app . isPackaged ) {
26+ // In production, extraResources copies resources/ directly to the resources folder
27+ return path . join ( process . resourcesPath , 'icon.png' )
28+ }
29+ // In development, resolve relative to this file
30+ return path . join ( __dirname , '../../resources/icon.png' )
31+ }
32+
2533function createWindow ( ) : void {
2634 const win = new BrowserWindow ( {
2735 width : 1200 ,
2836 height : 800 ,
2937 show : false ,
3038 autoHideMenuBar : true ,
31- ... ( process . platform === 'linux' ? { icon } : { } ) ,
39+ icon : getIconPath ( ) ,
3240 webPreferences : {
3341 preload : preloadPath ,
3442 sandbox : false
You can’t perform that action at this time.
0 commit comments