qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Makefile.target: set icon for binary file on Mac OS X
@ 2015-02-18 21:09 Programmingkid
  2015-02-19  9:56 ` Paolo Bonzini
  0 siblings, 1 reply; 12+ messages in thread
From: Programmingkid @ 2015-02-18 21:09 UTC (permalink / raw)
  To: qemu-devel qemu-devel; +Cc: Peter Maydell

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 <programmingkidx@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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-02-21 10:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-18 21:09 [Qemu-devel] [PATCH] Makefile.target: set icon for binary file on Mac OS X Programmingkid
2015-02-19  9:56 ` Paolo Bonzini
2015-02-19 19:34   ` Programmingkid
2015-02-20 12:18   ` Peter Maydell
2015-02-20 12:36     ` Paolo Bonzini
2015-02-20 13:15       ` François Revol
2015-02-20 16:54       ` Programmingkid
2015-02-20 17:05         ` Paolo Bonzini
2015-02-20 17:32           ` Programmingkid
2015-02-20 17:56             ` Paolo Bonzini
2015-02-20 21:30               ` Programmingkid
2015-02-21 10:05                 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).