question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

While creating windows appx package electron-builder is taking default icon for app

See original GitHub issue
  • Version: 20.40.2
  • Target: windows

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.

image

I have set properties in package.json file as below:

{ 
     "build": {
        "extraFiles": [
          "some-internal-plugin-dist"
        ],
        "appId": "myCompany.myApp",
        "nsis": {
          "perMachine": true,
          "oneClick": false,
          "allowToChangeInstallationDirectory": true
        },
        "squirrelWindows": {},
        "files": [
          "electron.js",
          "www/**/*"
        ],
		 "directories": {
		"buildResources": "www/build"
		},
		"appx": {
		  "identityName": "myCompany.myApp",
		  "publisher": "CN=number",
		  "publisherDisplayName": "my publisher name",
		  "applicationId": "myApp",
		  "displayName": "myApp"
		},
        "win": {
          "certificateFile": "./certs/CordovaApp.wincert.pfx",
          "icon":  "www/build/win.ico",
          "publisherName": "my Company",
          "target": [
            {
              "target": "nsis",
              "arch": [
                "ia32"
              ]
            }
          ]
        },
        "nodeGypRebuild": "false",
        "npmRebuild": "false"
      }
    }

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?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

1reaction
NehaTawarcommented, May 15, 2019

This is what worked for me:

  1. Downgraded electron-builder version to: 20.39.0
  2. Changed the directories entry in package.json as :
    "buildResources": "build",
    "output": "build"}
    
  3. Created appx named folder inside the build directory and created the build directory at package.json level
  4. Added icon named “StoreLogo.png” inside build/appx directory that we have created earlier.
  5. add the entry of the same in :
 "win": {
  "icon":"build/appx/StoreLogo.png"
}
  1. After this just create the appx using electron-builder -w appx command

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?

0reactions
wildhartcommented, Jun 17, 2020

@NehaTawar, did you ever get the “Best Match” icon fixed? I have the same issue, all my other icons are OK.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AppX - electron-builder
Defaults to the application name. publisher String | “undefined” - The Windows Store publisher. Not used if AppX is build for testing. See...
Read more >
After installing appx created with electron-builder setting ...
After installing appx created with electron-builder setting default electron icon to my installed app · 1)Downgraded electron-builder version to: ...
Read more >
Electron appx default electron icon used in start menu
I am trying to submit my electron app to the windows store but whenever I do It gets rejected for this reason: App...
Read more >
4. Binaries, Installers, and Updates - Introducing Electron [Book]
In this process, a binary with the app's name and icon is created for each platform, ... The actual packaging is done by...
Read more >
Windows app icon with Electron & Electron Builder are Jagged
I replaced the 3 icon files that are in this folder by default from Quasar with my own icon files. When I build...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found