EOSERV Wiki > Page: Patches > History > Revision Diff

Revision Diff: Patches

Revision by at 3rd Jun 2011 11:32 pm
DeletionsAdditions
===What will I need?===
All you need is a diff/patch executable(along with a few .dlls). They are a pretty common thing and are included in gnuwin. If you don't have them, or don't know if you have them, then you can just click [[http://addison.us.to/files/patch/diffpatch.zip]] to download them. I'd suggest saving them to a easy, accessible place because they will be used a lot.
See [[EOSERV_TortoiseSVN]] for more information on creating/applying patches.
Let's get started.
Before you can begin creating/applying a patch, you have to get to the directory. Open your command-line, and go to the directory of where the diff/patch executables are located. You can do this by typing 'cd Location'. To make sure it works, you can type 'diff --help' or 'patch --help' and a bunch of text should pop up with help on how to use.<br />
Example: [[http://addison.us.to/files/patch/1.jpg]]
==Creating a Patch==
===One file===
Make sure you have the original(before you added code) and the updated file. In your command-line, type:<br />
''diff originalFile updatedFile > filename.patch''<br />
Example: [[http://addison.us.to/files/patch/2.jpg]]
===Multiple files===
Make sure you have the original directory(before you added code) and the updated directory. In your command-line type:<br />
''diff -rupN originalDirectory updatedDirectory > filename.patch''<br />
Example: [[http://addison.us.to/files/patch/4.jpg]]
==Applying a Patch==
===One file===
Make sure you have the patch file and the original file that was used to create it. In your command-line type:<br />
''patch originalFile -i filename.patch -o fileToUpdate''<br />
Example: [[http://addison.us.to/files/patch/3.jpg]]
===Multiple files===
''Figuring this out still :P''
==Distributing Patches==
When you distribute a patch, I wouldn't just give them the patch file. Since, when you are using the patch command, you have to include the original(the file that does NOT include the updates) file, I would also include the original file then so it provides a less chance for your code to get messed up.
Below is a list of current patches for EOSERV. Feel free to add your own patch on there if it is not included already.
===List of Patches===
[[http://addison.us.to/files/patch/TestPatch.zip]] - Just adds a small player command that outputs text if you type $xxx
==List of current Patches==
''none''
EOSERV Wiki > Page: Patches > History > Revision Diff