3 Replies - 7602 Views - Last Post: 04 November 2009 - 07:38 AM

#1 MentalFloss   User is offline

  • .
  • member icon

Reputation: 577
  • View blog
  • Posts: 1,500
  • Joined: 02-September 09

How Do Patches Work?

Posted 30 October 2009 - 03:15 AM

Hello. Something has been bugging me lately and I cannot seem to find the answer anywhere. Maybe my google skills are lacking or something, but I'm just turning up unrelated results.

I am interested to know how patching works with games. For example, if you log into XBOX Live, there might be a patch available. It will download and update a game or the interface or whatever. There doesn't seem to be a limit to what can be patched.

Problem is, how is it possible to do this? I just don't understand how you can write the logic to anticipate a patch for areas of a program that will fix bugs, etc.

I can guess that the concept is contextual to the situation, but a nickel tour on the whole idea would be much appreciated. I also welcome links to articles on it.

Thanks and sorry if this sounds like a dumb question.

Edit: I can guess that the libraries might be copied over that were changed but XBOX is using a disk system. Perhaps initialization of the disk copies all required DLLs to a storage directory and that directory's libraries are updated?
I'm just confused on how this all links together and what the current approaches are.

This post has been edited by MentalFloss: 30 October 2009 - 03:20 AM

Is This A Good Question/Topic? 0
  • +

Replies To: How Do Patches Work?

#2 janne_panne   User is offline

  • WinRT Dev
  • member icon

Reputation: 428
  • View blog
  • Posts: 1,047
  • Joined: 09-June 09

Re: How Do Patches Work?

Posted 30 October 2009 - 11:00 AM

I think most programs use the route you mentioned: replace all files that have been changed.

But it would also be possible to create a more fancy updater I think. For example version control holds information about changes so if you implement the same kind of mechanism to the program, the patching program could check previous version history to check changes and compare it to the current patch which is being installed and then update those changed lines.
Or maybe it's not possible because after all, the develop program is already in machine language or something similar messy thing and thus finding the changed lines might be impossible.

Maybe some pro can tell us more before I continue this guessing game which just leads other people to wrong tracks.
Was This Post Helpful? 0
  • +
  • -

#3 Aeternalis   User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 291
  • Joined: 13-July 09

Re: How Do Patches Work?

Posted 02 November 2009 - 10:57 AM

I can't speak for XBOX or how they do it.

But as far as automatic game updating..it's not that hard.

The Auto Updater I use for my games is a simple text file on a server. When the game is run, it reads that file, and compares the file version on the local machine with the file version listed in the text file. If it is different, it downloads that file and replaces the previous one with it.


PS I also made it a DLL so it is reusable for any game.. just change the text file, and call the Autoupdater first thing.

This post has been edited by Aeternalis: 02 November 2009 - 11:00 AM

Was This Post Helpful? 0
  • +
  • -

#4 KeyboardKowboy   User is offline

  • D.I.C Head
  • member icon

Reputation: 20
  • View blog
  • Posts: 142
  • Joined: 15-December 08

Re: How Do Patches Work?

Posted 04 November 2009 - 07:38 AM

View Postjanne_panne, on 30 Oct, 2009 - 12:00 PM, said:

For example version control holds information about changes so if you implement the same kind of mechanism to the program

Those would be source deltas. They contain only the information that has changed between specific versions of a source file.

Typically, patches that are small in size are most likely bug fixes made in the libraries (.dll), and they typically relate to one of the layers of the application (3-Tier Architecture). These library files are overwritten, and the base application will simply utilize the library as it normally does. When the patch is substantially larger, 10's to 100's of megs, the fix needed to take place in the "driver" program, or the base app that utilizes the library files. The executable program would have been recompiled, and needs replacing.

Bottom line, I'm not so sure there is a 'bible' on how to handle patch management. It's typically proprietary, and can change shape based on scope and context. Hope this helps.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1