跳到内容

图标

推荐工具:AppIcon Generator, MakeAppIcon, iConvert Icons

macOS

文件

  • 可选 icon.icns (macOS 应用程序图标) 或 icon.png。图标尺寸应至少为 512x512。
  • 可选 background.png (macOS DMG 背景)。
  • 可选 background@2x.png (macOS DMG Retina 背景)。

需要放置在 buildResources 目录(默认为 build)中。所有文件都是可选的 — 但提供 icon.icns(或 icon.png)非常重要,否则将使用默认的 Electron 图标。

Windows (NSIS)

  • 可选 icon.ico (Windows 应用程序图标) 或 icon.png。图标尺寸应至少为 256x256。

需要放置在 buildResources 目录(默认为 build)中。提供 icon.ico(或 icon.png)非常重要,否则将使用默认的 Electron 图标。

Linux

Linux 图标集将基于 macOS icns 文件或通用 icon.png 自动生成。

或者,如果您想自己指定图标,可以将它们放在 build/icons 目录中。文件名必须包含图标的尺寸(例如 256x256.png)。推荐尺寸:16、32、48、64、128、256(或仅 512)。

AppX

请参阅 AppX 资源