Help with Patching
by Dan Van Meer · in Torque Game Engine · 02/05/2003 (7:53 pm) · 46 replies
Hi all,
I've been trying to install the daynight.patch file to my code, however, even after following the instructions, I can't seem to get this to work. I've downloaded UnxUtils, and have tried everything that I can think of to make this work. If anybody has any hints, or knows where they think I may be going wrong, please let me know.
Thanks in advance.
I've been trying to install the daynight.patch file to my code, however, even after following the instructions, I can't seem to get this to work. I've downloaded UnxUtils, and have tried everything that I can think of to make this work. If anybody has any hints, or knows where they think I may be going wrong, please let me know.
Thanks in advance.
#22
Max
06/06/2003 (9:00 pm)
I'm confused... I just want to add the Day/Night cycle to my game, can anyone help me? Max
#23
06/07/2003 (6:23 am)
Max try this download unix util's from http://unxutils.sourceforge.net/. Then extract them to C:\UnixUtil, Then add the UnixUtil path to enviroment variables. If you have that path and torque's patch in the enviroment variables your all set. Ok now open command prompt (command or cmd from run dialog). Now browse to you torque directory using the cd command. Then when you are inside your torque folder (patch should be in there to). Run the comannd patch -p0 < daylight.patch then it should show alot of commands then your done. I had trouble before and just figured this out now if you have more questions i'd be happy to anwser em.
#24
Max
06/07/2003 (2:40 pm)
Ok...that's great, but.. I'm using Mac OS 10.2, and I'll need complete insructions on how to do this via my OS... Anyone out there? Maybe I'm missing something here.. Anyway, thanks and please get back to me,Max
#25
simply open the patch file in your favourite text editor.
All the info required to install the patch is in there.
read thru the text finding the filenames and code snippets.
it is harder to do it like this but if your having version conflicts it might be the best way.
so with the patch open find all locations to insert the code snips, and insert them manually.
06/07/2003 (2:43 pm)
yes, it should not matter.simply open the patch file in your favourite text editor.
All the info required to install the patch is in there.
read thru the text finding the filenames and code snippets.
it is harder to do it like this but if your having version conflicts it might be the best way.
so with the patch open find all locations to insert the code snips, and insert them manually.
#27
The Daylight.patch file is in C:\torque\torque\engine\
The WinCVS directory (with patch program in it) is listed in the environment variables
then G goto the command prompt and enter the C:\torque\torque\engine\ dir and type:
Patch -p0 C:/torque/torque/engine/daylight.patch
... and the placeholder drops to the next line and blinks at me until I use Ctrl C to cancel it, and if I type:
Patch -p0 < C:/torque/torque/engine/daylight.patch
it returns with "The system cannot find the file specified". Also I've swapped /'s for \'s but the effect is the same. Can anyone shine a light on this problem
06/26/2003 (3:03 pm)
I'm having the same troubles with patching as Vincent mentioned earlier. Using an unmodified version of the engine that I downloaded using Win cvs, without specifying a version number (so it should have got the latest HEAD as default right?), on windows XP. The Daylight.patch file is in C:\torque\torque\engine\
The WinCVS directory (with patch program in it) is listed in the environment variables
then G goto the command prompt and enter the C:\torque\torque\engine\ dir and type:
Patch -p0 C:/torque/torque/engine/daylight.patch
... and the placeholder drops to the next line and blinks at me until I use Ctrl C to cancel it, and if I type:
Patch -p0 < C:/torque/torque/engine/daylight.patch
it returns with "The system cannot find the file specified". Also I've swapped /'s for \'s but the effect is the same. Can anyone shine a light on this problem
#28
The program you're looking for is called patch. I believe there's a link to it in the documentation.
06/26/2003 (3:20 pm)
You don't use CVS to apply patches. You use it to MAKE patches.The program you're looking for is called patch. I believe there's a link to it in the documentation.
#29
instead this looks like a path problem.
06/26/2003 (3:24 pm)
I would assume he has found the "patch.exe" as he didnt say the program specified could not be found.instead this looks like a path problem.
cd c:\torque\torque c:\patch.exe -p0 < C:\torque\torque\daylight.patchtry that
#30
06/26/2003 (3:36 pm)
But version 1.2 of WinCVS comes with the patch.exe program. Even so I downloaded the tools from the link and used the new PAtch.exe and nothing has changed.
#31
but im sure the process is the same if indeed you have a mac binary for patch.???
anyhow ..
what you need to do is go out browse the web for example on doing this at a simple level..
understand that level and next bring it to this level..
06/26/2003 (3:41 pm)
I dont use a Mac..but im sure the process is the same if indeed you have a mac binary for patch.???
anyhow ..
what you need to do is go out browse the web for example on doing this at a simple level..
understand that level and next bring it to this level..
#32
i HATE .patch files....
06/26/2003 (3:56 pm)
Hmm, Thanks Badguy that seems to be better (in that it actually did something), but now I've got loads of Hunks that failed and patch.exe caused an illegal opperation. :(i HATE .patch files....
#33
take my advice and use the web to teach you..
dont spam the same question into the forums its not fair.
now if you ask nice, again and give me more input
I might help you find some help on the web.
Christopher:
gw man, ok so now to find out why the hunks have failed,
you must analyze the code, at both ends
look at the patch code.
compare it to the code in the engine .
the patch file will have all the data to help you find the locations you must examine.
06/26/2003 (4:03 pm)
Damn you max..take my advice and use the web to teach you..
dont spam the same question into the forums its not fair.
now if you ask nice, again and give me more input
I might help you find some help on the web.
Christopher:
gw man, ok so now to find out why the hunks have failed,
you must analyze the code, at both ends
look at the patch code.
compare it to the code in the engine .
the patch file will have all the data to help you find the locations you must examine.
#34
Max
06/26/2003 (4:15 pm)
Now, now, let's now use profanity... I'm not sure why it posted my post three times, but I didn't intend it to do so. For your information, which so far hasn't been worth much, I have scoured the web for information on this, but you seem to forget that this is a Torque thing... Now, is there anyone here who owns a Mac, and copy of Torque, and knows how to install a .patch file on a Macintosh?Max
#35
@@ -21,6 +20,9 @@
are just changes to whitespace (and logically just as pointless as removing and readding lines if not more) but I'm not exactly sure about that so If anyone could clarify that I'd be greatful.
I'd love to know why it's not working though when according to the site the last TGE update was some time last year and it seems to be working for other people...
06/26/2003 (4:34 pm)
Hmf great... from what I can tell, half the hunk failiures are because some of the files it's trying to patch simply, don't exist. Looking at the patch file I'm guessing that lines starting with --- get removed and similarly lines with +++ are added (resulting in plenty of pointless adding and removing of identical lines) and I've got a feeling that lines like @@ -21,6 +20,9 @@
are just changes to whitespace (and logically just as pointless as removing and readding lines if not more) but I'm not exactly sure about that so If anyone could clarify that I'd be greatful.
I'd love to know why it's not working though when according to the site the last TGE update was some time last year and it seems to be working for other people...
#36
Sorry I didn't mean that as a Swear word.
so don't get me wrong please.
now, this is just a patch thing ok?
once you know how to apply patch's on source code within your operating system, you will be able to for any project.
So, learning the patch process is what it's gonna take.
Researching google should provide enuff, so far I have not typed in : using patch on macintosh, mac ...whatever.
So I will do that next, and check if there is anything particular for that OS.
Christopher:
www.garagegames.com/docs/torque.sdk/changelist/index.php?list=HEAD
this is the change log in head.
what version are you using?
and even then I think there has been some code rollbacks...
im not sure tho.
as for files referenced in the patch that do not exhist Anywhere in the project..
is a Problem.
you will need to no doubt Manually apply this patch.
Someone with the interest and the knowledge should pick up the torch on this one, and make a new patch for head.
Edit :
typo.
06/26/2003 (5:29 pm)
Max:Sorry I didn't mean that as a Swear word.
so don't get me wrong please.
now, this is just a patch thing ok?
once you know how to apply patch's on source code within your operating system, you will be able to for any project.
So, learning the patch process is what it's gonna take.
Researching google should provide enuff, so far I have not typed in : using patch on macintosh, mac ...whatever.
So I will do that next, and check if there is anything particular for that OS.
Christopher:
www.garagegames.com/docs/torque.sdk/changelist/index.php?list=HEAD
this is the change log in head.
what version are you using?
and even then I think there has been some code rollbacks...
im not sure tho.
as for files referenced in the patch that do not exhist Anywhere in the project..
is a Problem.
you will need to no doubt Manually apply this patch.
Someone with the interest and the knowledge should pick up the torch on this one, and make a new patch for head.
Edit :
typo.
#37
heh Max:
Ok after Re-Reading All the info You have provided,
and compared it to the information I have provided.
I am Very Surprised to see you say:
Now,
it looks like your going to have to manually install this patch anyhow.
(which we have already gone over and you agreed to try)
(and then we went right back to the same question, how to use patch)
But if you still want to learn how to use patch.
I suggest you read this man page:
developer.apple.com/documentation/Darwin/Reference/ManPages/html/patch.1.html
and then from there, create the project a simple main procedure.
copy it modify it.
then Learn how to Make a patch.
make a patch between the two version's of this very small project.
then Learn how to use patch to update the older source code.
Now you will be ready to take on a more Complex patch.
..
now to get back to the info you have submitted to assist the people who wish to help you.
there is none.
you have not stated the command line you gave, nor have you stated the path to any of the files you have, or the project.
you have not stated the condition of your patch program,
as in where it resides, or what error messages it gives you when you try to apply the patch.
I indeed hope This is enuff info to get your started in a positive direction.
06/26/2003 (5:56 pm)
..heh Max:
Ok after Re-Reading All the info You have provided,
and compared it to the information I have provided.
I am Very Surprised to see you say:
Quote:which so far hasn't been worth much
Now,
it looks like your going to have to manually install this patch anyhow.
(which we have already gone over and you agreed to try)
(and then we went right back to the same question, how to use patch)
But if you still want to learn how to use patch.
I suggest you read this man page:
developer.apple.com/documentation/Darwin/Reference/ManPages/html/patch.1.html
and then from there, create the project a simple main procedure.
copy it modify it.
then Learn how to Make a patch.
make a patch between the two version's of this very small project.
then Learn how to use patch to update the older source code.
Now you will be ready to take on a more Complex patch.
..
now to get back to the info you have submitted to assist the people who wish to help you.
there is none.
you have not stated the command line you gave, nor have you stated the path to any of the files you have, or the project.
you have not stated the condition of your patch program,
as in where it resides, or what error messages it gives you when you try to apply the patch.
I indeed hope This is enuff info to get your started in a positive direction.
#38
06/27/2003 (1:33 am)
Ah there we go. I just downloaded TGE again into a fresh directory and the patch worked much better. Thanks for all your help.
#39
Thanks for nothing Badloser... And next time try to give advise about something you know, not something that is your speculation. A small amount of good info far out weighs a lot of incomplete information, remember this Badguy, you talk a lot about a lot of things, but most of which you don't know a lot about..
As far as my info: you didn't tell me I needed a patching program, you didn't ask for information, and you don't have a Macintosh computer that you are familiar with.. (See the last sentence of paragraph two..)
--Max
06/27/2003 (9:22 pm)
LoL! Well excuse me, this coming from a guy who doesn't even own a Mac!! No, that did not help at all...Thanks for nothing Badloser... And next time try to give advise about something you know, not something that is your speculation. A small amount of good info far out weighs a lot of incomplete information, remember this Badguy, you talk a lot about a lot of things, but most of which you don't know a lot about..
As far as my info: you didn't tell me I needed a patching program, you didn't ask for information, and you don't have a Macintosh computer that you are familiar with.. (See the last sentence of paragraph two..)
--Max
#40
06/29/2003 (2:57 pm)
Max, calm down. If for whatever reason you cannot run *.patch file, you can simply open it in any text editor (patch files are, after all, just plain text files) and apply each piece of code to your source yourself. Reading them is easy, you will see a file name, then you will see a range of lines that it will be in. Open that file, scroll to that line, and then add or remove what the patch file says to (code to be added is labeled with a plus sign (+) at the beginning, code to be removed is labeled with a minus sign (-) at the beginning). Do this for everything it says in the file, and you'll be set. Simple. :)
Torque Owner Vincent Schaefer
@Max...and if I havn't read it does it say something else? ;)
Is this what you're refering to? If this is so...why do this as a patch? Doesn't it mean that all the changes that have already been made have to be redone with the new patched version?