Application Icons
Set platform icon sources in electrobun.config.ts:
import type { ElectrobunConfig } from "electrobun";
export default { app: { name: "Icon Example", identifier: "dev.example.icons", version: "1.0.0", }, build: { mac: { icons: "icon.iconset", }, win: { icon: "assets/icon.ico", }, linux: { icon: "assets/icon.png", }, },} satisfies ElectrobunConfig;macOS
build.mac.icons accepts either a traditional .iconset directory or a
modern .icon file created by Apple’s Icon Composer.
An iconset normally contains:
icon_16x16.pngicon_16x16@2x.pngicon_32x32.pngicon_32x32@2x.pngicon_128x128.pngicon_128x128@2x.pngicon_256x256.pngicon_256x256@2x.pngicon_512x512.pngicon_512x512@2x.pngElectrobun converts .iconset directories with iconutil. Compiling .icon
files uses actool and therefore requires a full Xcode installation, not only
Command Line Tools. See Apple’s app icon
documentation.
Windows
build.win.icon accepts .ico or .png. Hutch converts PNG input to ICO and
embeds the icon into packaged executables and the installer. Use a 256 x 256 or
larger PNG, or a multi-resolution ICO containing 16, 32, 48, and 256 pixel
variants.
Linux
build.linux.icon accepts PNG. Hutch includes it in the app bundle and generated
desktop entry. A 256 x 256 or larger source is recommended.