Closed NehaTawar closed 5 years ago
I don't know why yours isn't working correctly, but I can share details of my app's setup.
Here's a photo of my icons in vscode.
Here's the relevant properties in my "build" from package.json:
"build": {
"productName": "Label LIVE",
"appId": "com.semireg.LabelLIVE",
"buildVersion": "10305001",
"artifactName": "${productName}-${version}-${buildVersion}.${ext}",
"generateUpdatesFilesForAllChannels": false,
"buildDependenciesFromSource": true,
"nodeGypRebuild": false,
"npmRebuild": false,
"files": [
"dist/",
"node_modules/",
"app.html",
"main.prod.js",
"main.prod.js.map",
"package.json",
"embedded.provisionprofile"
],
"win": {
"target": [
"nsis"
],
"extraFiles": {
"from": "app/win-dlls/"
}
},
"nsis": {
"oneClick": true,
"perMachine": false,
"warningsAsErrors": true,
"runAfterFinish": true
},
"appx": {
"publisher": "CN=122121212-12121-1212-12121-121212121212",
"backgroundColor": "transparent"
},
"directories": {
"buildResources": "resources",
"output": "release"
},
},
For exact sizes of the images you'll want to consult https://www.electron.build/configuration/appx#appx-assets.
Now, after all this, my setup still isn't perfect. My icon is still too small, but it's something I'm living with for the moment.
Strangely, when I build with NSIS I get a good looking icon:
😕
sure will try and let you know @semireg
This is what worked for me:
"buildResources": "build",
"output": "build"}
"win": {
"icon":"build/appx/StoreLogo.png"
}
While installing the appx now i am able to see logo on launcher/install popup screen. Now I have one more doubt after complete installation i am still seeing the default electron logo at the task-bar and also in the apps & features if i search for my application. So can anyone please help me to resolve this issue?
On the launcher/install popup i am able to see the app logo like below hidden with red color:
After installing and launching the app i am still able to see the default electron icon in the taskbar as below highlighted in red:
Also in the installed app also after searching for my app i am getting the default electron icon as below highlighted in red:
How can i resolve this one? I tried adding all related resources as mentioned in : https://www.electron.build/configuration/appx but it started giving error of invalid manifest when creating a appx
Solved the above issue using below steps:
Added the assets mentioned in the appx link: https://www.electron.build/configuration/appx
created appx folder in the build directory, keep the package.json as mentioned above.
Make sure the app logos named should be specific as metioned in the link .PNG format.
Earlier i had icon names as e.g Square44x44Logo.png format .PNG then after changing the name to Square44x44Logo kept format .PNG as it is I was able to solve installed app issue.
But now only one icon is not getting replaced i.e when we search for app in windows in the best match still default electron icon is seen. Adding screenshot for the same :
Can anyone please help me to resolve this?
Able to resolve all the issues here is reference for the last issue mentioned in comment https://github.com/electron-userland/electron-builder/issues/3910 , but I really feel the documentation need to be updated properly.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@NehaTawar, did you ever get the "Best Match" icon fixed? I have the same issue, all my other icons are OK.
I am creating my app using ionic cordova and after creating build for windows. Using electon-builder to create the appx file. By default appx is getting created inside dist folder. Now the issue which I am facing is whenever I create a build while launching I see only electron default Icon, even if i did set the buildDerectories and icon property properly.
I have set properties in package.json file as below:
Please let me where am i doing wrong and what exactly should I set the properties? How and where to specify the assets all the assets for windows? So to resolve this can anyone please help?