• Advertisement

Archived

This topic is now archived and is closed to further replies.

How to do a patch?

This topic is 5003 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

I wonder how patches work. Such as game patching. I think i must create a patch creator exe. It will find the differences(bytes) between previous exe and latest exe version. Than make an exe from a template that can copy by fopen/fclose in the want-to-patche-exe the differences it has found previously. Am i right? ( Be Side )

Share this post


Link to post
Share on other sites
Advertisement
Its highly unlikely you''ll actually need to patch the exe, just overwrite it with the new one. Unless you''re embedding resources in your exe the file size will be tiny.

All a patch exe has to do is hunt out your game dir and replace the exe, and possibly update any changed resouces (images, sounds etc.) in the same way.

Share this post


Link to post
Share on other sites
aha this is more simple than i thought. I'm going in something very heavy. That's right that the resources aren't in the exe and that the exe is small. But i think i must use it anyway because i will probably use internet auto-patching in the future (see in network forum area). So the less heavy the patch will be, the more faster the patching process will be.(the exe will be 2 or 3Mo i think in release mode) But in the beginning i will use this simple method.

( Be Side )

[edited by - Jis on June 9, 2004 1:34:05 PM]

Share this post


Link to post
Share on other sites
I hope you know assembly or are extremely well versed in c/c++. I''m not sure how your going to open up your old exe and change the code based on what you want to change. I''m guessing your gonna have to look at your original program in a hex editer, and from that figure what the code is doing. I still dont see how that is feesible, I mean hex code isn''t like assembly. It''s just the hex version of the binary machine language right? Damn, patching an exe would be pretty damn hard.

Share this post


Link to post
Share on other sites
xorjesus; no, it isn''t. You know the output of DIFF, right? Well, there are binary DIFFs out there, too. But that wouldn''t work well, only because of how executables are laid out. Better to just replace it, but no, it isn''t "pretty damn hard". Bytes are just bytes, whether data or code or otherwise.

Share this post


Link to post
Share on other sites
Yes that''s true, bytes are bytes, data or code. I''ll change the exe no matter what is has inside.

( Be Side )

Share this post


Link to post
Share on other sites

  • Advertisement