[fpc-pascal] Placing binary data (resources) in object files?

Rainer Stratmann rainerstratmann at t-online.de
Mon Jun 3 20:14:42 CEST 2013


 On Monday 03 June 2013 20:01:45 you wrote:
> I think I'll use Rainer's example:
> 
> {$ir file.dat mydata}

You can try, but I am not aware that this will work.

It was a suggestion. :-)
 
> I just hope the final exe won't get bloated if resource are included in
> this manner and never used and also that it does slow down compilation

Why should this slow down compilation.
It is only copy some data from a to b.

> every time unless I add to new resources or change code in the unit
> containing the resource.
> 
> What I basically have is some large jpgs, test scripts, compressed sound
> files and fonts, and I want them built into my library but discarded if no
> code references them. That is, if an app doesn't use a skybox (there are no
> references to the skybox class), then the default skybox jpeg resource is
> not linked into the exe.
> 
> http://www.mapcore.org/topic/2829-second-release-5-skies/
> 1024*1024*6 pixel jpgs 



More information about the fpc-pascal mailing list