This patch adds the instruction to have the build commands give QEMU an icon. This code runs on Mac OS X.
Signed-off-by: John Arbuckle <programmingk...@gmail.com> --- Makefile.target | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) mode change 100644 => 100755 Makefile.target diff --git a/Makefile.target b/Makefile.target old mode 100644 new mode 100755 index e9ff1ee..e3679b4 --- a/Makefile.target +++ b/Makefile.target @@ -75,7 +75,7 @@ else stap: endif -all: $(PROGS) stap +all: $(PROGS) stap give_icon # Dummy command so that make thinks it has done something @true @@ -208,3 +208,22 @@ endif GENERATED_HEADERS += config-target.h Makefile: $(GENERATED_HEADERS) + +# Set the icon for QEMU on Macintosh +give_icon: + ifdef CONFIG_DARWIN + # Take an image and make the image its own icon: + sips -i ../pc-bios/qemu-nsis.ico + + # Extract the icon to its own resource file: + DeRez -only icns ../pc-bios/qemu-nsis.ico > tmpicns.rsrc + + # append this resource to the file you want to icon-ize. + Rez -append tmpicns.rsrc -o $(QEMU_PROG) + + # Use the resource to set the icon. + SetFile -a C $(QEMU_PROG) + + # clean up. + rm tmpicns.rsrc + endif -- 1.7.5.4