Sign in to follow this  
Luth

binary DIFF

Recommended Posts

Hi. I'm trying to come up with a way to update my executable. I wanted to use *nix's DIFF/PATCH. I got a DOS version of it, but then realized DIFF only works with ASCII files. I've been trying to find a binary DOS version, or simple open-source version, but havent been able to find one. (CYGWIN and others require extra libraries and things installed, and I dont want to force all my game's players to have them installed just to update an exe) Any suggestions?

Share this post


Link to post
Share on other sites
It's better to just replace the whole file. While binary differencing algorithms do exist, you're then relying on the user to have a specific version of the binary. That means you need to have a patch for every single upgrade path there is. For example, if you've released versions 1.0, 1.1 and 1.2, and want to provide a patch to upgrade to 2.0, you need patches for every one of the previously released versions (and this comes in addition to the 1.0->1.1 and [1.0, 1.1]->1.2 patches). Unless you have an autoupdating mechanism, you're also relying on the user to know the exact version he has and pick the correct patch from a list of downloads.

In most cases, this isn't worth the trouble. It's better to go with an application that's properly modularized, so you can update only specific modules (DLLs).

Share this post


Link to post
Share on other sites
I can use FC to create a difference file, but how can I patch it? *edit* Oh, I guess I could just open the file to patch, go to the BYTE given by FC, and change the byte value, huh.

Arild : If I was a good programmer, I wouldnt be posting in this forum. :) I've got data files and executables that need to be updated, and some of the data files are a few megs large. It'd be much easier to distribute a diff file to patch than megs and megs of new data. :-/

Share this post


Link to post
Share on other sites
xdelta: faster diff; generates larger deltas
bsdiff: slower diff; generates better deltas

Both patch extremely fast, as is the nature of most patching utilities (there are some out there that are for some reason tremendously slow, and I don't know why). You might have to write your own patcher for licencing reasons but that wouldn't probably be very difficult.

google for links.

Share this post


Link to post
Share on other sites
I got XDELTA from sourceforge, but I havent a clue how to compile or use it. :-/ I havent used a makefile in 8 years, and that was back on Unix, not MSVC++.NET.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this