lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> > Luiz did something exactly like this, based on reslib:  I quote:
> Yes, but I've given up this ide for now because it wouldn't work for Windows
> and because it's ok to glue arbitrary data to executables. (Would UPX choke
> on these?) Hence, srlua is as simple as you get.

UPX allows you to compress files with trailing just keeps it at 
the end of the new, smaller EXE. Of course, if you have embedded a pointer
to the tail inside the EXE, it will be wrong for the compressed file's
tail (so don't do that :-)

> However, I've not given up the idea of embedding several files in an
> executable as a virtual read-only filesystem, complete with directory trees.
> I've found that the CPIO format is a simple as you get for this task. And it's
> seekable so you don't need to expand the archive into a temporary directory.

The glued data doesn't have to be seekable directly with lseek() -- you 
can allow a decompression layer in there.

BTW, not writing to disk is where it's at under Windows: the various Perl 
and Python packagers out there spew out shiggabytes of temporary guff. If 
the code doesn't terminate cleanly or timeously, it all gets left behind.
So a sysadmin trying to write an emergency malware cleanup util, or a
"ptach me quick" tool, for the company's logon script can end up dropping 
multi-MB of garbage at each logon on each user's PC. Ugly. 

> If there's interest, I can get back to this.

Great idea.