View Single Post
  #6  
Old 07-10-2011, 03:28 AM
Criimson
Hill Giant
 
Join Date: Sep 2006
Posts: 172
Default

We're all learning here. I couldn't even make a diff patch yesterday.

I found how to do it.

Basically download <Diff Patch Program>

Then to make my life easier I copied the trunk files:
bot.h
mob.h
bot.cpp
botspellsai.cpp
mob.cpp

into a directory on C: (I named mine "e" for simplicity).
Then I have each section of code (the patch files) saved to that directory. Each named to correspond to the file it is patching. For instance, the bot.h patch I named bot_h.

Once all are in the same directory, I hit the windows start button, typed CMD in the search area to run the command line program for windows.

Next type:
cd C:\Program Files (x86)\GnuWin32\bin

Then for each file to be patched type:
sdiff <patch file> <file to patch>

Example:

sdiff c:\e\bot_h c:\e\bot.h

And let it run. Then copy the patched files back to the directory \zone wherever you have your source code.

I use 2 source directories. One for the trunk that I update and one that I tinker in.

Hope this helps.

Criimson

EDIT:
As to what the numbers mean: they are the line numbers that are being altered. They are handy for patching the file by hand. For instance, when I patched in pfyons code the trunk was already ahead of when he posted the code. In VC what you do to patch in the file by hand is look at those numbers and hit CTRL-G. This will pop up a window and allow you to enter the line number you want to jump to. Then look for the code section that you are going to alter. It most likely won't be in the exact place, but it should be close.
Reply With Quote