Open cassidoo opened 5 months ago
I'm hitting this issue as well. Haven't figured out a fix yet. In my case I'm using electron-builder.
@cassidoo I managed to get this worked out by "logging" with a message box like the following to track down where exactly the bundler was putting my files:
dialog.showMessageBox({
message: JSON.stringify(fs.readdirSync(path.join(__dirname)))
})
Continued adding onto the path then rebuilding until I discovered the icon wasn't at the working directory root at all. I then did the same process starting from process.resourcePath
which lead me in the right direction and my final working path to the icon was: path.join(process.resourcesPath, "buildResources", "menuicon.png")
Hope that process helps!
Description
I have the following code for my simple app:
This works perfectly in development, but when I package this with Electron Forge, my tray icon only shows the IconTemplate.png.
Steps to Reproduce the Problem
Expected Behaviour
My icon should appear in "production", not the default.
Specifications
Other information
My app is a plain HTML file.