Archive: VPatch patch generator - Van de Sande


VPatch patch generator - Van de Sande
I'm probably going to need to use vpatch sometime soon to provide updates for an install I'm putting together. I was wondering what the GenPat.exe was written in and if the source is available.

http://www.tibed.net/h_vpatch


It was written in Borland Delphi 5.
I once had a (different) version in Visual Basic, but that was very slow.
The source isn't available (yet). It's a big mess (if I remember correctly). I was going to make a GUI for it but I forgot/lost interest/was busy, take your pick.
I have more time now so I might make a GUI, but I'll have to see 'bout that. If you want to have a look at the source, that's possible, but I'm not really sure what could be improved (the exe header was written in C by Edgewize). A few bytes more could be saved, but since they are quite small, that's not really an issue.
Configuring it properly is more important, and I'm the only one who knows how to do that - hence the need for a GUI.


I've just been working on a GUI... and it's coming along nicely. It's not finished yet (because you can't actually create patches yet), but you can select new/old files properly.
About your e-mail:
I'll have a new version in a few days so I'll send it to you then (if all goes well, that is).
Converting the actual GenPat program to C/C++ is a nice thing to do, because you might gain some speed, but I don't think you actually need it - thinking about a better algorithm is more important. Any suggestions?
Edgewize's runtime: I need to add that it'll return error levels (or exit codes some people call it). 0 if all went well, 1 if the file is already up to date, 10 if no patch file found, etc. I already put it in the Delphi runtime, but that's 27 KB so just for me testing :)
If you could find out how to do ExitCodes/Errorlevels in C/C++ that would really help - because then NSIS can know what went wrong in the patching proces.


I'm replying to myself again. Anyway, some news:

The Edgewize runtime has been modified by me, now it's only 3 KB! (instead of 4 KB). If it's compressed by NSIS, it's only 1367 bytes!
I took out the messageboxes (you can now turn them of by using #define NO_MESSAGEBOX). Also, it now returns an error level (I think, haven't tested yet). It now also checks to see if the file is already up to date - which returns a different errorlevel.

I'll release something soon :)


I'll be waiting for it. Great to hear about the C header shrinking.


I spent my entire free day on the GUI (OK not the entire) but it's actually working now.
The GUI itself doesn't look very complex, the way to choose compression probably isn't very good yet, but for the first version it'll have to do.
I still have to find a bug where saving your 'patch project' to disk doesn't correctly cache generated changes, check if the patch generator works properly in all modes, have to package and have to make something which will generate NSIS code for you. At this moment, it just generates the VPatch.exe (you can now rename it:)
And I fixed a bug I created in the C runtime - when the file was already up to date, I deleted it (oops). And if you used the optimized version, the output file was always deleted (oops forgot to copy an if-statement).
I think I'll have something tomorrow. ZLIB-ed C++ header is still around 1375 bytes.


It's here.
I started a new thread on this new version.
See http://www.tibed.net/vpatch
or http://www.tibed.net/cgi-bin/schlabo/dl.pl?vpatch for download.