Add target for creating .ico file
This commit is contained in:
parent
b1187fd994
commit
b109495114
2 changed files with 23 additions and 0 deletions
|
@ -4,11 +4,32 @@ help:
|
|||
@echo "Re-generate icons in platform specific formats."
|
||||
@echo
|
||||
@echo "Available targets:"
|
||||
@echo " dosbox-staging.ico - Windows format"
|
||||
@echo " dosbox-staging.icns - macOS format"
|
||||
@echo " clean - clean intermediate files"
|
||||
|
||||
##
|
||||
# Create an icon using Windows .ico format.
|
||||
#
|
||||
# Windows users are expected to create icons using GUI applications, and
|
||||
# there's no good Windows-native command line program for this usecase.
|
||||
#
|
||||
# This target is using convert (package imagemagick) to resize icons
|
||||
# and icotool (package icoutils) to create an .ico file.
|
||||
#
|
||||
dosbox-staging.ico: \
|
||||
icon_256x256.png \
|
||||
icon_48x48.png \
|
||||
icon_32x32.png \
|
||||
dosbox-staging-16.png
|
||||
icotool -c $^ -o $@
|
||||
|
||||
icon_%.png: dosbox-staging-1024.png
|
||||
convert -resize $(shell echo $@ | sed 's|icon_\(.*\).png|\1|') $< $@
|
||||
|
||||
##
|
||||
# Create an icon using macOS .icns format.
|
||||
#
|
||||
# Uses sips, which is available by default on macOS.
|
||||
#
|
||||
dosbox-staging.icns: dosbox-staging.iconset
|
||||
|
@ -29,3 +50,4 @@ dosbox-staging.iconset: dosbox-staging-1024.png dosbox-staging-16.png
|
|||
|
||||
clean:
|
||||
rm -rf dosbox-staging.iconset
|
||||
rm -f icon_*.png
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue