Jump to content
  • Advertisement
Sign in to follow this  
Luth

binary DIFF

This topic is 4698 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
What is the problem with just replacing the files? All the top games use patches that replace files instead of updating them...why? Maybe its more reliable and easier to implement.

Share this post


Link to post
Share on other sites
Because I'd rather distribute 300k patch files 100 times than 120MB of replacement files 100 times. Bandwidth isnt cheap. :-/

Share this post


Link to post
Share on other sites
Quote:
Original post by Luth
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.


Try using a simpler environment.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!