Binary with appended zip-file

Henning Hasemann hhasemann at web.de
Sun May 20 08:41:28 PDT 2007


Okay this might be of topic, if so sorry for posting this.

I'm about to build a little SDL-application which should run completely
from a single binary.
So my idea was to simple append a .zip-file with all other needed
files (images etc..) to it and extract it in RAM with std.zip.

The big problem is: How does the program know where in the binary the zip-file
begins?
Naturally this information is only available *after* compilation
(its the size of the plain binary then) but how can I insert
it to the program after it has been compiled?

I could reserve the space for a size-variable and compile with the dropped-in
value a second time but maybe someone has a better idea?

TIA
Henning



More information about the Digitalmars-d mailing list