[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Makefile.target: set icon for binary file on Mac OS
From: |
Programmingkid |
Subject: |
[Qemu-devel] [PATCH] Makefile.target: set icon for binary file on Mac OS X |
Date: |
Wed, 18 Feb 2015 16:09:27 -0500 |
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 <address@hidden>
---
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
- [Qemu-devel] [PATCH] Makefile.target: set icon for binary file on Mac OS X,
Programmingkid <=
- Re: [Qemu-devel] [PATCH] Makefile.target: set icon for binary file on Mac OS X, Paolo Bonzini, 2015/02/19
- Re: [Qemu-devel] [PATCH] Makefile.target: set icon for binary file on Mac OS X, Programmingkid, 2015/02/19
- Re: [Qemu-devel] [PATCH] Makefile.target: set icon for binary file on Mac OS X, Peter Maydell, 2015/02/20
- Re: [Qemu-devel] [PATCH] Makefile.target: set icon for binary file on Mac OS X, Paolo Bonzini, 2015/02/20
- Re: [Qemu-devel] [PATCH] Makefile.target: set icon for binary file on Mac OS X, François Revol, 2015/02/20
- Re: [Qemu-devel] [PATCH] Makefile.target: set icon for binary file on Mac OS X, Programmingkid, 2015/02/20
- Re: [Qemu-devel] [PATCH] Makefile.target: set icon for binary file on Mac OS X, Paolo Bonzini, 2015/02/20
- Re: [Qemu-devel] [PATCH] Makefile.target: set icon for binary file on Mac OS X, Programmingkid, 2015/02/20
- Re: [Qemu-devel] [PATCH] Makefile.target: set icon for binary file on Mac OS X, Paolo Bonzini, 2015/02/20
- Re: [Qemu-devel] [PATCH] Makefile.target: set icon for binary file on Mac OS X, Programmingkid, 2015/02/20