This is a guide for obtaining the Crimson Editor source code, submitting patches, and applying patches. I have assumed that people doing this are using Windows because Crimson Editor is a Windows program.How to Obtain the Crimson Editor Source Code
You must have svn installed. Download the installer at http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
. Get the latest release. I use svn-1.4.2-setup.exe. Install it. Open the command prompt and go to the folder where you want the Crimson Editor source code. Type "svn checkout svn://svn.emeraldeditor.com/CrimsonEditor/trunk". This will download the Crimson Editor source code to your hard drive.How to Submit Patches for Crimson Editor
Now that you have the latest Crimson Editor source code, you can modified the program however you want. If you wish to share your modifications with us, follow these instructions for submitting the patch.
Make sure that you have the latest changes from the repository. At the command line where you checked out the source code, type "svn update". This will update your working directory with the changes that have been committed since you last updated or checked out the source code. If there were conflicts because someone changed the code around an area where you alse changed it, fix those conflicts and use the command "svn resolved" to tell svn you resolved the conflicts.
Check to make sure your changes still work. If they do, obtain your diff by typing "svn diff > patch_name.diff". Replace patch_name with a name for your patch.
For larger patches, add an entry for the patch on the bug-tracker at http://bugs.emeraldeditor.com
. After you add the entry go to the main bug listing and find the entry you just made and click it. Under the "Reset Fields" button near the bottom, there is a section for attachments. Click the link beside "Attachments" that says "New". Upload the diff file there. Then post on this Crimson Editor Development forum with a description of what you changed. For smaller patches, you can attach the diff file to the forum post.
Please make sure your code changes are well-commented. Document new functions. Use comments in your code, etc. Patches may be rejected if they are not commented. Unfortunately, the inherited CE codebase had very few comments, and I don't want that to become a trend.
Don't be afraid to submit small patches like commenting. Any patch that makes the code cleaner and more understandable would be appreciated.Applying Other People's Patches
To apply other people's patches on Windows, download the gnu for win32 patch program from http://gnuwin32.sourceforge.net/downlinks/patch.php
. Install it. Assuming you went with the default installation options, on the command line type "set Path=%Path%;C:\Program Files\GnuWin32\bin". This will allow you to use the patch tool on the command line. Alternatively, you can permanently change your path environment variable to include this directory or even make a batch file with this command in it. I use a batch file myself.
Then navigate to the directory containing the sources the diff was made against and save the diff to a file there. Type "patch -p 0 < name.diff". The patch should then be applied.
If you have any questions, comments, suggestions, corrections, etc., please reply to this message.