简体   繁体   English

将使用电子修建器设置创建的appx安装默认电子图标到我安装的应用程序后

[英]After installing appx created with electron-builder setting default electron icon to my installed app

While installing the appx now i am able to see logo on launcher/install popup screen. 现在安装appx时,我可以在启动器/安装弹出屏幕上看到徽标。 This worked when i made below changes: 当我在下面进行更改时,这有效:

1)Downgraded electron-builder version to: 20.39.0 1)将电子助剂版本降级为: 20.39.0

2)Changed the directories entry in package.json as : 2)将package.json中的目录条目更改为:

directories:{
"buildResources": "build",
"output": "build"}

3)Created appx named folder inside the build directory and created the build directory at package.json level 3)在构建目录中创建了appx命名文件夹,并在package.json级别创建了构建目录

4)Added icon named "StoreLogo.png" inside build/appx directory that we have created earlier. 4)在我们之前创建的build / appx目录中添加了名为“StoreLogo.png”的图标。

5)add the entry of the same in : 5)添加相同的条目:

 "win": {
  "icon":"build/appx/StoreLogo.png"
}

6)After this just create the appx using electron-builder -w appx command 6)之后,使用electron-builder -w appx命令创建appx

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. 现在我在完成安装后还有一个疑问,即使我搜索我的应用程序,我仍然会在任务栏以及应用程序和功能中看到默认的电子徽标。

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: 安装并启动应用程序后,我仍然能够看到任务栏中的默认电子图标,如下所示以红色突出显示: 在此输入图像描述

This is how my package.json build property looks: 这是我的package.json构建属性的样子:

  {
  "build": {
    "extraFiles": [
      "node_modules/ionic-enterprise-couchbase-lite-electron/**/*"
    ],
    "publish": [
      {
        "provider": "generic",
        "url": "***********"
      }
    ],
    "appId": "**************",
    "nsis": {
      "perMachine": true,
      "oneClick": false,
      "allowToChangeInstallationDirectory": true
    },
    "squirrelWindows": {},
    "files": [
      "electron.js",
      "www/**/*",
      "build/Square150x150Logo.png",
      "build/Square44x44Logo.png"
    ],
    "directories": {
      "buildResources": "build",
      "output": "build"
    },
    "appx": {
      "identityName": "myApp",
      "publisher": "CN=*************************",
      "publisherDisplayName": "my Company",
      "applicationId": "myApp",
      "displayName": "myApp",
      "backgroundColor": "#f2f4f7"
    },
      "win": {
      "certificateFile": "./certs/CordovaApp.Windows10_StoreKey.pfx",
      "publisherName": "my Company",
      "icon": "build/appx/StoreLogo.png",
      "target": [
        {
          "target": "nsis",
          "arch": [
            "ia32"
          ]
        },
        "appx",
        "msi"
      ]
    },
    "nodeGypRebuild": "false",
    "npmRebuild": "false"
  }
  }

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. 我尝试添加所有相关资源,如下所述: https//www.electron.build/configuration/appx但是在创建appx时它开始出现无效清单错误。

So can anyone please help me to resolve this issue? 那么有人可以帮我解决这个问题吗?

I solved the issue by doing below changes: 我通过以下更改解决了这个问题:

1) Added the assets mentioned in the appx link: https://www.electron.build/configuration/appx 1)添加了appx链接中提到的资产: https ://www.electron.build/configuration/appx

2) created appx folder in the build directory, keep the package.json as mentioned above. 2)在build目录中创建appx文件夹,保留上面提到的package.json。

3)Make sure the app logos named should be specific as metioned in the link .PNG format. 3)确保命名的应用程序徽标应具有链接.PNG格式中的特定标识。

4)Earlier I had icon names as eg: 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. 4)之前我有图标名称, 例如: Square44x44Logo.png格式.PNG然后将名称更改为Square44x44Logo保持格式.PNG因为它是我能够解决已安装的应用程序问题。

What i realized by this is naming convention does matter a lot in case of applying icons. 我所意识到的是,在应用图标的情况下,命名约定确实很重要。 So the main issue caused due to pont 4 . 所以主要问题是由于pont 4造成的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 电子:电子建设者配置 - Electron: electron-builder config 使用 electron-builder 从 electron 应用程序构建standalone.exe - Build standalone .exe from electron app using electron-builder 无法使用电子生成器在Mac上的Windows上为电子应用程序签名 - Unable to sign electron app for Windows on Mac using electron-builder Electron JS 应用程序仍然具有默认图标(使用电子窗口商店构建的 .appx 文件) - Electron JS App still has default Icons (.appx file built with electron-windows-store) 电子,电子生成器,nsis,卸载时删除 SchTasks - Electron, electron-builder, nsis, remove SchTasks at uninstall 在电子生成器之后找出当前正在运行的构建目标 - Find out what build target is currently running after electron-builder 在 Mac 上使用 Electron-builder 共同设计 Windows 版本,但不起作用 - Codesigning a Windows build with electron-builder, on a Mac, not working 如何从 .msi 安装程序到电子生成器 (nsis) - How to go from .msi installer to electron-builder (nsis) 电子生成器:卸载程序后如何删​​除深层链接协议? - electron-builder: How can I remove deeplinking protocols once the program is uninstalled? 使用自签名证书时,在 windows 上签名电子生成器生成的 package 失败 - Signing electron-builder generated package on windows fails when using self signed certificate
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM