naviapps / create-nw-react-app

Create NW.js React apps with no build configuration.
MIT License
144 stars 14 forks source link

Not able to change taskbar icon in windows #25

Open koushikreddyu opened 5 years ago

koushikreddyu commented 5 years ago

I have created React application using nw-react-scripts. I am trying to add icon for taskbar, but icon doesn't change. Always I see default icon. I tried by clearing appData as well. I have used below method in my package.json to add icon.

"window": {
 "icon":"src/image/logo.png"
}

image

naviapis commented 5 years ago

See nw-bulder Options. https://github.com/nwjs-community/nw-builder

Your package.json

{
  "nwBuilder": {
    "//": "https://github.com/nwjs-community/nw-builder",
+   "winIco": "src/image/logo.png"
  }
}
koushikreddyu commented 5 years ago

Thanks for the answer. i have tried this also. Even this didn't work for me.

naviapis commented 5 years ago

This article is helpful. https://github.com/nwjs/nw.js/wiki/Icons Resource Hacker app may be necessary.

keeptwoweeks commented 5 years ago

Thanks for the answer. i have tried this also. Even this didn't work for me.

icon file copy to build file.

koushikreddyu commented 5 years ago

Thanks for the answer. i have tried this also. Even this didn't work for me.

icon file copy to build file.

could you please elobrate what is build file? Below is my configuration in package.json file and my folder structure is below. image

-build -cache -node_modules -public -src --images -package.json

please let me know what am doing wrong here

koushikreddyu commented 5 years ago

fyi, if i open developer tools, that icon is updated. but my main window icon is not. please find below image has marked main window and devtool window image

ismael1361 commented 2 years ago

But what about when you need to access other properties as demonstrated in NW.js Documentation, for example:

{     ...     "window": {         "toolbar": false,     }     ... }