macOS has everything you need to make an icon file for your application from the terminal.
macOS application icons are really a bundle ("iconset") of images at various sizes (16Γ16, 32Γ32, 64Γ64, ..., 1024Γ1024).
First create a myicon.iconset
directory containing your icon image at all the sizes needed using the sips
command line tool:
sips -Z 16 myicon.png --out myicon/icon_16x16.png
sips -Z 32 myicon.png --out myicon/icon_16x16@2x.png
sips -Z 32 myicon.png --out myicon/icon_32x32.png
sips -Z 64 myicon.png --out myicon/icon_32x32@2x.png
...
Then bundle them together with the iconutil
command:
iconutil -c icns myicon.iconset
Here is a Makefile to do this automatically. Just save the Makefile to a directory containing your icon image file; change the variables NAME
and ICON
at the top; type make
in the Terminal, and you're done: https://gist.github.com/eliteraspberries/a536f28b0498ec844fb210bb597738e2
Top comments (0)