electron-wix-msi
electron-wix-msi copied to clipboard
Can't set an icon
I am trying to set the path to the icon, like this:
const msiCreator = new MSICreator({ . . . , iconPath: 'C:/path/to/electron_app/icon/image.ico', });
But when I execute the ''node build_installer.js'' command to build, I get an error in the console:
Unable to extract icon from exe. Please provide an explicit icon via parameter. Error: Cannot find module 'exe-icon-extractor'.
I don't know what it is, please, I need help
I also had this issue. I tries to set Iconpath, but look like it was ignored...
In windows, I was able to fix it by:
Installing Visual Studio Community from this link: https://visualstudio.microsoft.com/pt-br/downloads/
Then you install it, and you should also install the c++ libraries
after rebooting just install the 'exe-icon-extracter' package in your project path
npm i exe-icon-extractor --save-dev
You should be able to create your installer now.
@bitdisaster I think the problem with exe-icon-extractor
is that package.json for this module now refers to @bitdisaster/exe-icon-extractor
but the code still refers to just exe-icon-extractor
. See GitHub search result. I believe the problem was introduced in this commit.
That commit was made after the version bump to 3.0.3, which is the current version according to this repository's master branch. However, it seems it was somehow released to npm as version 3.0.4, which is now marked as @latest
on npm.
@layaLils @pichotweb Manually installing exe-icon-extractor
indeed gets rid of the error, but exe-icon-extractor
is still a fallback for the case where there is no custom app icon specified in options. It seems that, when specifying a custom icon in MSICreator
options, you should use appIconPath
instead of the iconPath
that is mentioned in the README.
Seems like that part is actually a documentation bug.
@layaLils @pichotweb Manually installing
exe-icon-extractor
indeed gets rid of the error, butexe-icon-extractor
is still a fallback for the case where there is no custom app icon specified in options. It seems that, when specifying a custom icon inMSICreator
options, you should useappIconPath
instead of theiconPath
that is mentioned in the README.Seems like that part is actually a documentation bug.
It work! Thank you very much!
Thank you Seems like the module is missing by default
npm i exe-icon-extractor --save-dev
from the CREATOR.JS defination, find that ico path: " this.exe = options.exe.replace(/.exe$/, ''); this.icon = options.icon; this.extensions = options.extensions || []; this.lightSwitches = options.lightSwitches || []; "
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.