diff mbox

[v4] Makefile.target: set icon for binary file on Mac OS X

Message ID CAFEAcA84JTVNXWZ3L0YndGAba4VjcBBmtuj2ktmero0N+pHNmw@mail.gmail.com
State Accepted
Headers show

Commit Message

Peter Maydell May 10, 2015, 7:58 p.m. UTC
On 21 February 2015 at 16:14, Programmingkid <programmingkidx@gmail.com> wrote:
> Implements setting the icon for the binary file in Mac OS X.
>
> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
>
> ---
> Added $(SRC_PATH) to the path of the rsrc file.
>
>  Makefile.target   |    4 +
>  pc-bios/qemu.rsrc | 1504 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 1508 insertions(+), 0 deletions(-)
>  create mode 100644 pc-bios/qemu.rsrc
>
> diff --git a/Makefile.target b/Makefile.target
> index e9ff1ee..9661c87 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -178,6 +178,10 @@ all-obj-$(CONFIG_SOFTMMU) += $(block-obj-y)
>  # build either PROG or PROGW
>  $(QEMU_PROG_BUILD): $(all-obj-y) ../libqemuutil.a ../libqemustub.a
>         $(call LINK,$^)
> +ifdef CONFIG_DARWIN
> +       Rez -append $(SRC_PATH)/pc-bios/qemu.rsrc -o $(QEMU_PROG)
> +       SetFile -a C $(QEMU_PROG)
> +endif

When I came to look at this patch this hunk didn't quite apply
cleanly any more. It also is missing the quiet-command use that
makes the output look nice, and it would be cleaner to use $@
rather than $(QEMU_PROG). The tweaked Makefile.target hunk I came
up with is:

$(SRC_PATH)/scripts/feature_to_c.sh $@ $(TARGET_XML_FILES
),"  GEN   $(TARGET_DIR)$@")
===endit===

Unless anybody objects or Paolo particularly wants to take this
through his tree I'll add this modified version to my cocoa tree.

thanks
-- PMM
diff mbox

Patch

===begin===
diff --git a/Makefile.target b/Makefile.target
index 1083377..be01dd3 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -180,6 +180,10 @@  $(QEMU_PROG_BUILD): config-devices.mak
 # build either PROG or PROGW
 $(QEMU_PROG_BUILD): $(all-obj-y) ../libqemuutil.a ../libqemustub.a
        $(call LINK, $(filter-out %.mak, $^))
+ifdef CONFIG_DARWIN
+       $(call quiet-command,Rez -append $(SRC_PATH)/pc-bios/qemu.rsrc
-o $@,"  REZ   $(TARGET_DIR)$@")
+       $(call quiet-command,SetFile -a C $@,"  SETFILE $(TARGET_DIR)$@")
+endif

 gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/scripts/feature_to_c.sh
        $(call quiet-command,rm -f $@ && $(SHELL)