Boost logo

Boost-Build :

Subject: Re: [Boost-build] inject binary resource in executable
From: Vladimir Prus (ghost_at_[hidden])
Date: 2014-04-09 05:16:41


On 09.04.2014 01:46, George Georgiev wrote:
> Hi,
>
> I am using boost build. I need to be able to inject a binary resource in executable in a multi-platform fashion. How I obtain it is not
> critical - whatever way works.
>
> Is somebody knows about something out of the box that I can use - else I know that I can make it myself.

Depends on the size of resource. For something smallish, converting it into source file with a C array will work just
fine. For huge resources, some specific tricks shall be used, like "incbin" directive in GNU assembler - which is
what we used at work, see here:

     https://github.com/MentorEmbedded/p2-installer/blob/master/sfx/scripts/build/internal/core_build_windows_p2_sfx.sh#L99

This code is part of larger self-extractor creator though, so mostly useful only as reference.

HTH,
Volodya


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk