How to use .patch files
by zwwww · in Torque Game Engine · 10/25/2005 (10:59 am) · 2 replies
Hi there, i need help about patches
i just downloaded this : www.garagegames.com/uploaded/code/5426.stencil_shadows.zip
and the text file to make it manually is too long !
in the rar , there is a patch, maybe this add all the code to the project ?
how can i use it ?
thanks
i just downloaded this : www.garagegames.com/uploaded/code/5426.stencil_shadows.zip
and the text file to make it manually is too long !
in the rar , there is a patch, maybe this add all the code to the project ?
how can i use it ?
thanks
About the author
#2
I usually end up patching by hand, couldn't get the patch program to work in windows, couldn't get Torque to work in linux... (yeah, it was a rough summer.
Anyways as you go through the patch file you'll see a file name, and a string of numbers. This is the approxmiet location in the file the change occurs, but it's mainly for the computers ues. Then there's 3 or 4 "refference lines" so you know exactly where to put the change.
Next you'll see lines prefixed with '+' or '-'. The pluse's are lines to add, the minus' are lines to subtract.
It is not uncommon for it to delete and/or add an empty line or an unchanged line, but the program does it's best I suppose.
after a set of changes will be another several refference lines. Then usually the location of the next set of changes.
This isn't hard to do by hand, but it is time consuming. if your patch and your current engine are not of the same version you will almost deffinitly have to do it by hand, as things won't line up exactly. If PATCH dosen't find a line it's looking for, it fails, as a human, you should be able to figure it out pretty easily in most cases..
Thats the short version, but hopefully it'll help a little.
~Raven
11/10/2005 (9:19 pm)
If you do a search you should be able to find plenty of threads about this. I usually end up patching by hand, couldn't get the patch program to work in windows, couldn't get Torque to work in linux... (yeah, it was a rough summer.
Anyways as you go through the patch file you'll see a file name, and a string of numbers. This is the approxmiet location in the file the change occurs, but it's mainly for the computers ues. Then there's 3 or 4 "refference lines" so you know exactly where to put the change.
Next you'll see lines prefixed with '+' or '-'. The pluse's are lines to add, the minus' are lines to subtract.
It is not uncommon for it to delete and/or add an empty line or an unchanged line, but the program does it's best I suppose.
after a set of changes will be another several refference lines. Then usually the location of the next set of changes.
This isn't hard to do by hand, but it is time consuming. if your patch and your current engine are not of the same version you will almost deffinitly have to do it by hand, as things won't line up exactly. If PATCH dosen't find a line it's looking for, it fails, as a human, you should be able to figure it out pretty easily in most cases..
Thats the short version, but hopefully it'll help a little.
~Raven
Torque Owner Matthew Grint
You will need the patch program (unless you are running Linux or have an older version of WinCVS) which can be found as part of [url="http://unxutils.sourceforge.net/"]UnxUtils[/url]. There is a section on using/generating patches in the documentation here: www.garagegames.com/docs/tge/general/apas05.php.
You will then need to run the patch program from the command line (assuming you are running windows). I believe typing "patch /?" or "patch --h" without the quotes will bring up help, although i may be wrong.