简体   繁体   English

Electron appx 默认 electron 开始菜单中使用的图标

[英]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:我正在尝试将我的 electron 应用程序提交到 windows 商店,但每当我这样做时,它都会因为这个原因被拒绝:

App Policies: 10.1.1 Inaccurate Representation - Icon

Notes To Developer

The available product tile icons include a default image. Tile icons must uniquely represent product so users associate icons with the appropriate products and do not confuse one product for another. For information about tiles see https://learn.microsoft.com/en-us/windows/uwp/controls-and-patterns/tiles-and-notifications-app-assets, or for 3D icons for Mixed Reality products, see https://learn.microsoft.com/en-us/windows/mixed-reality/3d-app-launcher-design-guidance. 

I asked for more info and got a video showing that my app is using the default electron icon and thats the reason for it getting rejected, I've tried everything to make sure my app never uses the default electron icon but no luck.我询问了更多信息并获得了一段视频,显示我的应用程序正在使用默认的 electron 图标,这就是它被拒绝的原因,我已经尝试了一切以确保我的应用程序永远不会使用默认的 electron 图标但没有运气。

In order to build, sign, and submit my appx file, I run the following commands on then appxBuild branch of this repo: https://github.com/MartinBarker/RenderTune/tree/appxBuild为了构建、签名和提交我的 appx 文件,我在此 repo 的appxBuild分支上运行以下命令: https://github.com/MartinBarker/RenderTune/tree/appxBuild

  1. Run electron-builder build --win to build the dist/win-unpacked folder运行electron-builder build --win来构建 dist/win-unpacked 文件夹在此处输入图像描述

  2. Run the following powershell command to sign my appx file and export it to the folder output-appx :运行以下 powershell 命令来签署我的 appx 文件并将其导出到文件夹output-appx

electron-windows-store --input-directory C:\Users\marti\Documents\projects\RenderTune\dist\win-unpacked --output-directory C:\Users\marti\Documents\projects\RenderTuneAppx --package-version 0.0.2.0 --package-name RenderTune --package-display-name 'RenderTune' --publisher-display-name `martinbarker' --identity-name 1845martinbarker.digify -a C:\Users\marti\Documents\projects\RenderTune\Resources\

If I click the outputted appx file and install it, I can see my custom icon being used如果我单击输出的 appx 文件并安装它,我可以看到正在使用我的自定义图标在此处输入图像描述

Except for if I search for my app in the windows explorer menu I see the default electron app icon and I can't for the life of me figure out how to fix this issue.除非我在 windows 资源管理器菜单中搜索我的应用程序,否则我会看到默认的 electron 应用程序图标,而且我一辈子都想不出如何解决这个问题。 在此处输入图像描述

The finished \output-appx\RenderTune.appx file can be uploaded and submitted to my windows store app page fine so I dont think the credentials signing are incorrect, but once it gets reviewed it always gets rejected with this tile rejection message.完成的 \output-appx\RenderTune.appx 文件可以上传并提交到我的 windows 商店应用程序页面,所以我不认为凭据签名不正确,但一旦它被审查,它总是被拒绝并显示此磁贴拒绝消息。

I've tried following various different guides on how to submit an electron app to the windows store online: https://www.electron.build/configuration/appx https://www.electronjs.org/docs/tutorial/windows-store-guide https://blog.mifi.no/2020/03/31/automated-electron-build-with-release-to-mac-app-store-microsoft-store-snapcraft/ https://github.com/MartinBarker/RenderTune/tree/appxBuild/build/appx ) How to fix 'The available app icons include a default icon' when publishing an electron app to windows store?我已经尝试按照各种不同的指南,了解如何将 electron 应用程序提交到 windows 在线商店: https://www.electron.build/configuration/appx https://www.electronjs.org/docs/tutorial/windows-商店指南https://blog.mifi.no/2020/03/31/automated-electron-build-with-release-to-mac-app-store-microsoft-store-snapcraft/ https://github.com /MartinBarker/RenderTune/tree/appxBuild/build/appx ) 将 electron 应用程序发布到 windows 商店时,如何修复“可用应用程序图标包含默认图标”?

And made sure I have a folder build/appx and resources/ that have all my needed image files:并确保我有一个文件夹build/appxresources/包含我需要的所有图像文件: 在此处输入图像描述

Inside my package.json for the build windows section I specify my icon as an ico file:在我的 package.json 部分中,我将我的图标指定为 ico 文件:

    "win": {
      "target": ["appx"],
      "extraResources": [
        "node_modules/ffmpeg-ffprobe-static/ffmpeg.exe",
        "node_modules/ffmpeg-ffprobe-static/ffprobe.exe"
      ],
      "icon": "build/icon.ico",
      
    "appx": {
      "applicationId": "RenderTune",
      "identityName": "1845martinbarker.digify",
      "publisher": "CN=E69B865D-5831-4BE5-9AA4-08E27DAAD66C",
      "publisherDisplayName": "martinbarker",
      "backgroundColor":"#a0beeb"
    }

Fixed, I was missing a tile image png file已修复,我缺少一个平铺图像 png 文件

Got the same App Policies: 10.1.1 Inaccurate Representation - Icon as OP and turns out I need to define ALL the icons from the documentation here:获得了相同的App Policies: 10.1.1 Inaccurate Representation - Icon作为 OP,结果我需要从此处的文档中定义所有图标:

https://www.electron.build/configuration/appx.html https://www.electron.build/configuration/appx.html

I've listed all the icons below in case the documentation changes:我在下面列出了所有图标,以防文档发生变化:

  • Logo : StoreLogo.png徽标:StoreLogo.png
  • Square150x150Logo : Square150x150Logo.png Square150x150Logo : Square150x150Logo.png
  • Square44x44Logo : Square44x44Logo.png Square44x44Logo : Square44x44Logo.png
  • Wide310x150Logo : Wide310x150Logo.png Wide310x150Logo : Wide310x150Logo.png
  • Optional BadgeLogo : BadgeLogo.png可选BadgeLogo : BadgeLogo.png
  • Optional Square310x310Logo : LargeTile.png可选Square310x310Logo : LargeTile.png
  • Optional Square71x71Logo : SmallTile.png可选Square71x71Logo : SmallTile.png
  • Optional SplashScreen : SplashScreen.png可选的 SplashScreen :SplashScreen.png

Also double check the files are in /build/appx (the documentation isn't 100% clear on that)还要仔细检查文件是否在/build/appx中(文档不是 100% 清楚)

For icon sizes, there's a good post here (and I also confirmed in Visual Studio):对于图标大小,这里有一篇很好的帖子(我也在 Visual Studio 中确认过):

https://stackoverflow.com/a/61805906/3847 https://stackoverflow.com/a/61805906/3847

It also pays to double check the .appx file is bundled correctly.仔细检查.appx文件是否正确捆绑也是值得的。 Just extract using any zip extraction utility, and make sure the icon files are in /assets , and also double check they're all defined in the AppxManifest.xml .只需使用任何 zip 提取实用程序进行提取,并确保图标文件位于/assets中,并仔细检查它们是否都在AppxManifest.xml中定义。

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

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