From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
Programmingkid <programmingkidx@gmail.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH] Set icon for QEMU binary on Mac OS
Date: Thu, 4 Feb 2021 18:48:55 +0100 [thread overview]
Message-ID: <750166a5-d458-2d85-60ed-bf5ca4df14b5@redhat.com> (raw)
In-Reply-To: <CAFEAcA8mnac53=TO3HUXyzELD5D1R_7+FAi14kYs2Rk-MCdAfg@mail.gmail.com>
On 04/02/21 16:42, Peter Maydell wrote:
> On Thu, 4 Feb 2021 at 15:39, Programmingkid <programmingkidx@gmail.com> wrote:
>>
>>
>>
>>> On Feb 4, 2021, at 3:54 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>
>>> On 02/02/21 14:44, John Arbuckle wrote:
>>>> Before switching the build system over to Meson, an icon was
>>>> added to the QEMU binary on Mac OS. This patch adds back that
>>>> feature.
>>>> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
>>>> ---
>>>> meson.build | 20 ++++++++++++++++++++
>>>> 1 file changed, 20 insertions(+)
>>>> diff --git a/meson.build b/meson.build
>>>> index f00b7754fd..7f534f4e75 100644
>>>> --- a/meson.build
>>>> +++ b/meson.build
>>>> @@ -2183,6 +2183,26 @@ foreach target : target_dirs
>>>> link_args: link_args,
>>>> gui_app: exe['gui'])
>>>> +# set QEMU's icon on Mac OS
>>>> +if targetos == 'darwin'
>>>> + newiconpart1 = custom_target('Icon for ' + exe_name + ' - part 1',
>>>> + depends : emulator,
>>>> + input : emulator,
>>>> + output : 'new icon for ' + exe_name + ' - 1',
>>>> + command : ['Rez', '-append',
>>>> + meson.source_root() + '/pc-bios/qemu.rsrc', '-o',
>>>> + meson.current_build_dir() / exe['name']],
>>>> + build_by_default : true)
>>>> +
>>>> + custom_target('Icon for ' + exe_name + ' - part 2',
>>>> + depends : newiconpart1,
>>>> + input : emulator,
>>>> + output : 'new icon for ' + exe_name + ' - 2',
>>>> + command : ['SetFile', '-a', 'C',
>>>> + meson.current_build_dir() / exe['name']],
>>>> + build_by_default : true)
>>>> +endif
>>>> +
>>>> if exe_sign
>>>> emulators += {exe['name'] : custom_target(exe['name'],
>>>> install: true,
>>>
>>> Maybe you can do it on install, using add_install_script instead?
>
> Why would we want to only do it on install? A QEMU which
> you run from the build tree ought to still have its icon,
> surely ?
Mostly because edit-in-place commands are not very well suited to a
"make" workflow, while they're common at install time (e.g. strip).
But since we already have scripts/entitlement.sh, and it's only Apple
that like in-place build steps it is even better to combine all the
in-place adjustment to the executable in scripts/entitlement.sh. For
example if no entitlements are needed, you pass an empty third argument
and scripts/entitlement.sh (now scripts/postprocess-darwin-executable.sh
or something like that?) can do Rez+SetFile but not codesign. The
existing "if exe_sign" becomes an "if targetos == 'darwin'".
Paolo
next prev parent reply other threads:[~2021-02-04 18:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 13:44 [PATCH] Set icon for QEMU binary on Mac OS John Arbuckle
[not found] ` <2cdac45d-6a4d-dca1-4f32-2fc6b549f8d5@redhat.com>
2021-02-04 15:39 ` Programmingkid
2021-02-04 15:42 ` Peter Maydell
2021-02-04 17:48 ` Paolo Bonzini [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-07-05 13:54 Programmingkid
2021-07-05 16:56 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=750166a5-d458-2d85-60ed-bf5ca4df14b5@redhat.com \
--to=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=programmingkidx@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).