[Newbie!!] can I embed a file in my ecutable?
Digital Mars
ld-REMOVE at galador.net
Sun May 15 09:12:13 PDT 2011
Awesome!! Impressed by D!
While I'm a .NET enthusiast, the crappy Install project from VS are
motivating me to give D a Go! (Pun inside! :)
I will also add D.learn to the newsgroup I'm watching then! :)
"Timon Gehr" wrote in message news:iqocf4$1ihv$1 at digitalmars.com...
> Let's say I want to use to write a simple installer.
> Can I embed a Zip file inside my executable?
> If so, how?
>
> Thanks! :)
An alternative to using resources is the following:
auto zip_file = cast(immutable ubyte[])import("zip_file.zip");
You need to specify the -Jpath switch in order for DMD to eat it. Also see
http://www.dsource.org/projects/tutorials/wiki/ImportFile .
Timon
(Also consider digitalmars.D.learn for future questions.)
More information about the Digitalmars-d
mailing list