How to do a patch?
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 )
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.
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.
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]
( Be Side )
[edited by - Jis on June 9, 2004 1:34:05 PM]
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement