Re: file packer
- From: "cr88192" <cr88192@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 6 Sep 2005 10:33:56 +1000
"shya" <uzumaki@xxxxxxxxxxxxxxx> wrote in message
news:7UYRe.44842$F23.535700@xxxxxxxxxxxxxxxxxxxxx
> hi there!
> is there a free program to pack an executable with other files? I've my
> c++ compiled program, some dll and some text files for my shaders, and I
> want to pack all that in a single exe. Is that possible?
> I don't need something like upx, because this shrink down only the
> executable, but does not pack anything.
> thanks!
>
well, this is older, no one seems to have replied so I guess I will.
I don't know of any (though there may exist one), but you could do your
own...
most obvious would be to make an archive of the contents, and either append
it on the end of the exe, or put it in one of the COFF sections.
at runtime, the exe could open itself and attempt to locate the archive, or
locate the appropriate section. then, it would be possible to locate the
data.
as an alternative, the data could just be converted into source or object
files and linked with the app, this way, the data is allready in memory at
program start.
an issue in this case is size, it is the easiest and most general, but
everything linked in will presumably end up being read into memory so, you
wouldn't want to do this with, say, 500MB or 1GB worth of stuff. in these
cases (or most cases where the data is more than trivially large), probably
a more sensible approach is appending to the end of the exe or such
anyways...
....
as for dll's, that is a bigger problem. usually you need the dll external
somewhere to get it to load. possible is to include it inside the app
somehow (eg: via the contents-as-source method or such), then the file could
be opened and the contents written out. this would be followed by telling
windows to load the dll.
alternatively, the app itself could be included in the exe (the first exe
working mostly as a self-unpacker), so, the app and needed files are written
out somewhere and then the app is launched.
now, I am pretty sure there are things for this (dunno about free though, I
haven't checked). this seems to be a common approach with installers.
....
.
- References:
- file packer
- From: shya
- file packer
- Prev by Date: attn: minette - really surprising finances - cozli ip - (1/1)
- Next by Date: how to decompress TAR files on Windows or DOS ?
- Previous by thread: file packer
- Next by thread: help with batch file for 7z command line?
- Index(es):
Relevant Pages
|
Loading