简体   繁体   中英

Shortcut icon not loading properly in electron-packager

Explanation

I'm trying to run electron-packager in my project, currently using a windows x64 and compiling a ia32 version, this is the package config inside my package.json:

"package": "electron-packager ./ --prune=true --arch=ia32 --win32metadata.ProductName=myProdName --icon=favicon.ico --overwrite=true"

The problem is, when the project is compiled the icon isn't displayed properly, but if I go in the properties the icon is the one selected, see the images below:

Icon displayed in the folder

https://image.prntscr.com/image/cXekfe0QTCa_wFY-LZs1IQ.png

Icon displayed in properties

https://image.prntscr.com/image/IHWu6xQDRy_acEhvCCw1IQ.png

Would like to get some help in this, really don't know what more can I do to get this right.

Already found the error, it was in my package JSON. Instead of:

   --icon=favicon.ico

It sould be:

    --icon=./favicon.ico

Needs the ./ in the start to identify

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM