Tremulous Forum

Mods => Modding Center => Topic started by: infestor1 on May 27, 2009, 04:25:43 am

Title: patch
Post by: infestor1 on May 27, 2009, 04:25:43 am
Ok, this is my second thread about .patch. I already posted one, and got a reply, that helped, but not too much...

http://tremulous.net/forum/index.php?topic=10953.0

How do I "apply the patch" to the "common source code" to make the "patched source code"? How?

Btw, I'm on a Mac, so I'm not going to run off and download VB or something.
Title: Re: patch
Post by: David on May 27, 2009, 01:50:27 pm
cd /path/to/the/source ; patch -p0 < ./whatever.patch
You may have to do -p1 depending on how the patch was made.
Title: Re: patch
Post by: infestor1 on May 28, 2009, 02:26:44 am
cd /path/to/the/source ; patch -p0 < ./whatever.patch
You may have to do -p1 depending on how the patch was made.

So that would be two separate commands?

cd tremulous-svn

then

patch -p0 < ./crap.patch

And /path/to/the/source is the tremulous source? The original source?

And the patch file has to be in that same folder, and it updates the source with the patch, it doesnt make a whole new folder?

Title: Re: patch
Post by: David on May 28, 2009, 12:11:23 pm
Yep, two commands.  Bash treats ; the same as a new-line.
/path/to/the/source is which ever source you want to patch.
The patch file doesn't have to be in the same directory as long as you give the right path to it, and it modifies the current source, if you want a copy you have to copy it yourself.