Re: file packer




"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.

....


.



Relevant Pages

  • Re: Class termination
    ... It has everything to do with forms in the dll. ... The need to make the exe into an ActiveX. ... If your exe needs to reference a dll that is referencing it then ... you've got some *huge* problems in the design of your app. ...
    (microsoft.public.vb.general.discussion)
  • Re: ADOStream Write Causes Permission Denied Error
    ... My app is packaged using the Package and Deployment Wizard, ... prior version DLL. ... Do you think getting rid of the dll and have an Update EXE and the actual ... > If this is an ASP application, and authentication is Anonymous (no ...
    (microsoft.public.vb.general.discussion)
  • Re: How to prevent creating a big exe file.
    ... When "all is said and done" I think Refox or KonXise (not sure if Konxise ... Can I create an exe with the readonly tables in other .DLL file? ... you can split a project into separate "libraries" as .APP files. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: How best for dll to "report progress"?
    ... Probably that DLL is working inside AutoCad's process ... Ken also mentioned Ax exe but said that was also Out of process... ... in the Command Line and use WM_SETTEXT to talk back from the pure VB ... App to the Textbox in AutoCad. ...
    (microsoft.public.vb.general.discussion)
  • Re: Editors
    ... some strip them on exe files by default. ... "preferred base address" and, yup, relocations are completely ... DLL files, though, aren't loaded into their own address space but are ... EXE's "entry-point", though, is not "special" in that it's just an ...
    (alt.lang.asm)

Loading