Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 17th April 2001, 19:41   #1
Koen van de Sande
Senior Member
 
Join Date: Mar 2001
Location: Holland
Posts: 269
Hi everyone,

I'm currently working on a 'patch' program which allows you to update files from 1 version to another.
It'll calculate the CRC of the source file, check if the patch is designed for this purpose, patch it, and then check to see if the CRC of the target file is correct.

However, I'm currently still working on the patch generator - though I have a (very) slow VB version which works.

Does anyone have any suggestions for a patcher?

Koen van de Sande
Van de Sande Productions
TibEd.net | VPatch
Koen van de Sande is offline   Reply With Quote
Old 18th April 2001, 18:58   #2
Koen van de Sande
Senior Member
 
Join Date: Mar 2001
Location: Holland
Posts: 269
Working on it

Hello everyone,

I'm still working on it, but I'm currently tracking down some bugs in the patch generator.
Once I got those ironed out, I have a basic patch generator. If you have a 1 MB file which is 90% identical to file #2, the patch will be about 20% - not very good, but it's a start.

After I get some bugs out, I can start on optimizing.

Is anyone interested in a patcher anyway?

Estimated size for the patch program executable itself is 32-64 KB. (Haven't finished it yet).

Koen van de Sande
Van de Sande Productions
TibEd.net | VPatch
Koen van de Sande is offline   Reply With Quote
Old 19th April 2001, 01:20   #3
rm'
Banned
 
rm''s Avatar
 
Join Date: Jul 2000
Posts: 11,361
Re: Working on it

Quote:
Originally posted by Koen van de Sande
Is anyone interested in a patcher anyway?
Yes. Clickteam has a nice patch proggie, but then again, it's Clickteam. I'd prefer something that's adless.
rm' is offline   Reply With Quote
Old 19th April 2001, 02:18   #4
polaughlin
Junior Member
 
Join Date: Mar 2001
Location: Maryland, USA
Posts: 25
Send a message via ICQ to polaughlin Send a message via AIM to polaughlin
I am very much interested.
polaughlin is offline   Reply With Quote
Old 19th April 2001, 17:38   #5
Koen van de Sande
Senior Member
 
Join Date: Mar 2001
Location: Holland
Posts: 269
I fixed tons of bugs in my patcher, but there still appears to be one left, there is a problem with files larger than 1 MB and/or non-text characters. I'll just have to keep looking...

Still, the patcher is coming along quite nicely, it can at least generate patches now, and I have a "Patcher" which applies it to a file. Current size of the Patcher is 62 KB (or 28 KB after UPX), which is quite big. However, I'm using Delphi, so you do not need any extra other files. It's 62 KB plus the patch file size and nothing more.

After I get all bugs out, I can start to improve performance (and efficiency) of the patch generator. I'm not using any compression, because the compression inside NSIS is much better than anything I can add.

I'll post any progress I make here.

Koen van de Sande
Van de Sande Productions
TibEd.net | VPatch
Koen van de Sande is offline   Reply With Quote
Old 20th April 2001, 19:44   #6
Koen van de Sande
Senior Member
 
Join Date: Mar 2001
Location: Holland
Posts: 269
It works!

I fixed a copy-paste bug (which took me 2 days).

It works very well now, very fast compared to my VB version. I'm going to try and add variable-block size searching next, which'll improve both speed and patch size.

Is anyone else interested besides polaughin and Radioactive Man?

I could use a C(++) programmer who can translate the actual runtime program into C and make it smaller, because it's 61 KB because of the Delphi stuff.

It's a really simple program, less than 200 lines (haven't looked).

Koen van de Sande
Van de Sande Productions
TibEd.net | VPatch
Koen van de Sande is offline   Reply With Quote
Old 20th April 2001, 23:22   #7
Edgewize
Member
 
Join Date: Apr 2001
Posts: 89
I'd be glad to create a very small compiled C version! You can keep all the credit for the program as long as I get to use it in my installer

Send me an email - wiked_edge@yahoo.com

Edgewize is offline   Reply With Quote
Old 21st April 2001, 12:05   #8
Koen van de Sande
Senior Member
 
Join Date: Mar 2001
Location: Holland
Posts: 269
That'd be great edgewize! I'm currently brushing up things a bit and making some last changes to the file format. And I just rewrote the CRC code a little which saves 1 kb.

Runtime size is now 61 KB, or 30 KB after UPX. Patch files can be (must be) linked to the exe in order to work. The file format supports multiple patches inside one patch file, but only one patch can be executed at a time.
All this is possible, but I haven't written support for it in the generator.

I'll send you the source code for the patcher tonight (including some test patches/files).

Should I release a first version which works, or should I wait until I've improved compression and speed in the generator?

Koen van de Sande
Van de Sande Productions
TibEd.net | VPatch
Koen van de Sande is offline   Reply With Quote
Old 22nd April 2001, 19:21   #9
Koen van de Sande
Senior Member
 
Join Date: Mar 2001
Location: Holland
Posts: 269
First release is here!

I've just uploaded VPatch v1.0 (yes, it has a name now) to: http://www.tibed.net/vpatch/vp100.exe

What can it do?
- Create a small patch from an old version to a new version.
- Attach patches for multiple files to the patcher (so you only need to include this 30 KB once)
- Configure compression through genpat.ini (make sure you do this in order to have acceptable creation times).
- On my test files, it makes Clickteam Patch Maker look like crap: I have smaller patches (but it takes much longer than in Patch Maker).

E-mail koen@tibed.net or post here with suggestions/bug reports!

Koen van de Sande
Van de Sande Productions
TibEd.net | VPatch
Koen van de Sande is offline   Reply With Quote
Old 23rd April 2001, 01:59   #10
Edgewize
Member
 
Join Date: Apr 2001
Posts: 89
Replacement vpatch.bin for smaller patches


This is a replacement vpatch.bin with full source code, and a project file for MSVC++ 6.0 (sp4). Only 4k, much smaller for less overhead on the patch EXE file.

http://edgewize.cjb.net/vpatch_c.zip
Edgewize is offline   Reply With Quote
Old 24th April 2001, 03:42   #11
polaughlin
Junior Member
 
Join Date: Mar 2001
Location: Maryland, USA
Posts: 25
Send a message via ICQ to polaughlin Send a message via AIM to polaughlin
GUI

Are you planning on implementing a GUI for this patch program?
polaughlin is offline   Reply With Quote
Old 24th April 2001, 17:06   #12
Koen van de Sande
Senior Member
 
Join Date: Mar 2001
Location: Holland
Posts: 269
Yes, a GUI is planned, but I haven't started yet. If someone makes a good GUI for NSIS, perhaps the patcher could be integrated.
But I can probably make an application where you can select original/new versions, create patches, save projects, etc. Then you'd no longer have to use any of the commandline utilities.

But I'm going to work on the Patch Generator itself first, I'm hoping to make it a little faster.

Question: v1.0 uses very little memory, but read the file the whole time from disk. Does anyone mind if the program is going to use SourceSize+TargetSize MB of RAM? Adding this will make patch creation of large files slower, but other things will be faster.

Koen van de Sande
Van de Sande Productions
TibEd.net | VPatch
Koen van de Sande is offline   Reply With Quote
Old 24th April 2001, 17:30   #13
Bor
Junior Member
 
Join Date: Mar 2001
Posts: 33
maybe as an option

Maybe you could make it an option so you can choose to use more RAM or read the file from disk.

Bor
Bor is offline   Reply With Quote
Old 30th April 2001, 20:19   #14
Koen van de Sande
Senior Member
 
Join Date: Mar 2001
Location: Holland
Posts: 269
I just made it use memory instead of disk - this causes a major speed increase - my new version works 80% faster. I'll be releasing this new version soon.
(now that it's faster, I can increase the default compression to be better).

Koen van de Sande
Van de Sande Productions
TibEd.net | VPatch
Koen van de Sande is offline   Reply With Quote
Old 2nd May 2001, 13:17   #15
Koen van de Sande
Senior Member
 
Join Date: Mar 2001
Location: Holland
Posts: 269
80% faster is not a correct measure.
I mean 5 times faster.

Koen van de Sande
Van de Sande Productions
TibEd.net | VPatch
Koen van de Sande is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump