https://github.com/hunlongyu/electron-icon-builder
An icon generator to generate all the icon files needed for electron packaging
https://github.com/hunlongyu/electron-icon-builder
electron electron-icon electron-icon-builder icns ico
Last synced: about 1 year ago
JSON representation
An icon generator to generate all the icon files needed for electron packaging
- Host: GitHub
- URL: https://github.com/hunlongyu/electron-icon-builder
- Owner: Hunlongyu
- License: mit
- Created: 2022-06-23T09:24:43.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-01T14:01:44.000Z (over 3 years ago)
- Last Synced: 2025-04-04T15:53:07.260Z (about 1 year ago)
- Topics: electron, electron-icon, electron-icon-builder, icns, ico
- Language: TypeScript
- Homepage:
- Size: 251 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# electron-icon-builder
# Global Usage
```bash
// install
npm i -g @hunlongyu/electron-icon-builder
// usage
eib -i relative/path/file.png -o relative/path/folder
```
# Local Usage
```bash
// install
npm i -D @hunlongyu/electron-icon-builder
// add a srcipt in package.json file
"scripts": {
"icon": "eib -i relative/path/file.png -o relative/path/folder"
}
// usage
npm run icon
```
# Flags
```
--input, -i [String] [Default: './icon.png'] Path to PNG file,
--output, -o [String] [Default: './build/'] Folder to create files,
--flatten, -f [Boolean] [Default: false] Flatten output struture
```
# Recommendations
Input file should be 1024px x 1024px or larger. Make sure it is a 1 to 1 aspect ratio on width to height.
# Output structure
```
[output dir]
-[build]
-[win]
-icon.ico
-[mac]
- icon.icns
-[png]
- 16x16.png
- 32x32.png
- 48x48.png
- 64x64.png
- 128x128.png
- 512x512.png
```
When flatten option is enabled
```
[output dir]
-[build]
- icon.icns
- icon.ico
- 16x16.png
- 32x32.png
- 48x48.png
- 64x64.png
- 128x128.png
- 512x512.png
```
# Electron-icon-builder GUI
| Rust | C++ Qt |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|  |  |
| Size: 3MB | Size: 10MB |
| Time: 400ms | Time: 30ms |
| Without installation | Without installation |
| [Download](https://github.com/Hunlongyu/electron-icon-builder/releases/tag/v0.1.7) | [Download](https://github.com/Hunlongyu/electron-icon-builder/releases/tag/v0.1.12) |
| [Source code](https://github.com/Hunlongyu/electron-icon-builder/tree/rust) | [Source code](https://github.com/Hunlongyu/electron-icon-builder/tree/Qt) |