electron-wix-msi icon indicating copy to clipboard operation
electron-wix-msi copied to clipboard

Can't set an icon

Open layaLils opened this issue 4 years ago • 7 comments

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

layaLils avatar Oct 07 '20 19:10 layaLils

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

image

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.

pichotweb avatar Oct 09 '20 18:10 pichotweb

@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.

mistermicheels avatar Oct 12 '20 21:10 mistermicheels

@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.

mistermicheels avatar Oct 12 '20 22:10 mistermicheels

@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.

It work! Thank you very much!

royanon avatar Mar 13 '21 05:03 royanon

Thank you Seems like the module is missing by default

npm i exe-icon-extractor --save-dev

AuracleTech avatar May 02 '22 23:05 AuracleTech

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 || []; "

AlexHsu1987 avatar Jun 15 '23 09:06 AlexHsu1987

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.

XAbirHasan avatar Sep 06 '23 10:09 XAbirHasan