Having started my new job, even though we haven’t really done anything yet – and this is the longest it’s been at any new job with nothing to show for it, I have been too busy to write anything new here.
But to give a heads-up on what I will probably write about next, i.e. my current interest purely from a personal coding point of view, I have been thinking about defining an easy way to write a c# zip sfx.
My reasons for this:
- A zip self-extracting-archive is a simple artifact.
- However, almost all example code I have seen for this online has been heavily over-engineered.
I intend to write some code to create such an artifact that is simple, as it should be.
That is, most samples go to a lot of trouble to take some files, put them into zip format, and then make them a binary resource. Then your stub EXE first needs to extract the binary resource before unzipping the files. I don’t see why the stub EXE and an ordinary zip file (or at least a zip memory stream, that can be represented as a file) can’t just be appended together as a single binary file. When run, the EXE then somehow needs to know where the zip stream begins… which is easy to determine when creating the file, but not so easy to store perhaps? I saw an example that did this (in UNIX code) and didn’t bother to read how they implemented it, but it was enough to tell me that it can be done, rather than the generally accepted, but over-engineered approach.