forge
forge copied to clipboard
WiX MSI creates generic icon in start menu and on desktop
Preflight Checklist
- [X] I have read the contribution documentation for this project.
- [X] I agree to follow the code of conduct that this project follows, as appropriate.
- [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.
Issue Details
-
Electron Forge Version:
- 6.0.0-beta.53
-
Electron Version:
- 10.1.3, 9.3.1
-
Operating System:
- Windows 10 Build 18362
-
Last Known Working Electron Forge version::
- 6.0.0-beta.52 (at least for the start menu part, this one didn't generate a desktop icon at all)
Expected Behavior
The icons in start menu and on desktop use the application's icon as specified in packager config.
Actual Behavior
The icons in start menu and on desktop use a generic icon.
To Reproduce
- Set an icon through packager config
- Set up the WiX MSI maker
- Create an MSI installer
- Install the application
- Check the desktop icon and icon in start menu
Additional Information
What I found during my investigation:
- It seems there is a bug in the latest version of
electron-wix-msi
that prevents extraction of the app's icon from the packaged exe. See also felixrieseberg/electron-wix-msi#99. - If you fix that extraction, the extracted icon will still be of low quality, resulting in a blurry desktop icon.
The good news is that the latest versions of electron-wix-msi
also allow specifying a custom icon to use. This means we could do the following:
- Easy fix: Adjust the documentation for
MakerWixConfig
to include theappIconPath
property. Including this in your maker-wix config already works at the moment, only the doc is missing. - Improvement: Ideally, we can use the icon path specified in packager config as a default for this
appIconPath
property.
Demo that this works, on my own app:
- Commit: https://github.com/mistermicheels/current-task/commit/11fc415e03f1c8764618955a7da8336ffb8bd844
- Before (installer in artifacts): https://github.com/mistermicheels/current-task/actions/runs/296342941
- After (installer in artifacts): https://github.com/mistermicheels/current-task/actions/runs/303097091
Hello , thanks a lot for this great package.
Even using appIconPath
I don't get an icon for my package.
Any idea of another prerequisite ? (I did give a standard .ico path, both tried with a relative or absolute path)
correction : "I see the good icon in the start menu" , but not if I search for the name of my app in the windows menu (i see the gift icon)
Having the same issue here - any word on merging a fix?
I stumbled upon the icon issue when trying to use iconPath
as documented in electron-wix-msi
's doc. AFAIK, this is the underlying implementation, and forge should actually use the arg name as is to reduce confusion. Users like me will have a better chance to get it right on their own, who would've thought it's now called "appIconPath" while the substance is exactly the same?!
@kakyoism Forge actually doesn't change anything about the property's name. The problem is that electron-wix-msi
documentation specifies iconPath
but its code requires appIconPath
. I mentioned this in felixrieseberg/electron-wix-msi#99 but seems I forgot to explicitly mention it here.
Hello , thanks a lot for this great package. Even using
appIconPath
I don't get an icon for my package. Any idea of another prerequisite ? (I did give a standard .ico path, both tried with a relative or absolute path)correction : "I see the good icon in the start menu" , but not if I search for the name of my app in the windows menu (i see the gift icon)
@thomasdarde Did you find a solution to this issue? I see the generic icon just from when I search for the app.
Hi @andresscode Sadly I did not find time to fix this issue,
Saludos
Hi @andresscode Sadly I did not find time to fix this issue,
Saludos
@thomasdarde I added the shortName
configuration field within the maker and that solved the problem. But, not really sure why this works. I haven't spent much time diving into the Windows docs.
This appears to just be a documentation issue
This appears to just be a documentation issue
I marked this as a bug because 6.0.0-beta.52 automatically took care of this (based on the icon from packagerConfig
) and 6.0.0-beta.53 didn't.
But I leave it up to you to decide if that level of integration with electron-wix-msi
is part of the current scope for electron-forge
.
I recently ran into this problem.
Setting the explicit icon
path as instructed in the electron-wix-msi configuration doc (https://github.com/electron-userland/electron-wix-msi#configuration) resolved my issue.