Binary with appended zip-file
Deewiant
deewiant.doesnotlike.spam at gmail.com
Sun May 20 09:45:05 PDT 2007
Henning Hasemann wrote:
> 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?
>
http://www.digitalmars.com/d/expression.html#ImportExpression
auto z = new ZipArchive(import("foo.zip"));
More information about the Digitalmars-d
mailing list