School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 309,262 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,475 people online right now. Registration is fast and FREE... Join Now!




How Do Patches Work?

 

How Do Patches Work?

MentalFloss

30 Oct, 2009 - 02:15 AM
Post #1

D.I.C Head
**

Joined: 2 Sep, 2009
Posts: 199



Thanked: 21 times
My Contributions
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 Oct, 2009 - 02:20 AM

User is offlineProfile CardPM
+Quote Post

 
Reply to this topicStart new topic
Replies

janne_panne

Re: How Do Patches Work?

30 Oct, 2009 - 10:00 AM
Post #2

D.I.C Addict
****

Joined: 9 Jun, 2009
Posts: 532



Thanked: 107 times
My Contributions
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.
User is offlineProfile CardPM
+Quote Post

KeyboardKowboy

Re: How Do Patches Work?

4 Nov, 2009 - 06:38 AM
Post #3

D.I.C Head
Group Icon

Joined: 15 Dec, 2008
Posts: 89



Thanked: 10 times
My Contributions
QUOTE(janne_panne @ 30 Oct, 2009 - 12:00 PM) *

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.
User is offlineProfile CardPM
+Quote Post


Posts in this topic

Fast ReplyReply to this topicStart new topic

Time is now: 11/26/09 10:12AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month