Emerald Editor Discussion
July 24, 2017, 03:40:17 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: How to obtain the source and submit and apply patches  (Read 31298 times)
0 Members and 1 Guest are viewing this topic.
Phil
Administrator
Master Jeweller
*****
Posts: 427


« on: January 09, 2007, 09:08:44 pm »

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.

Phil
« Last Edit: May 29, 2007, 08:59:28 pm by Phil » Logged
bmwboy
Prospector
*
Posts: 3


« Reply #1 on: February 04, 2007, 07:45:32 pm »

The SVN server isn't allowing me to connect from any computer I try, is there a problem with the server?
Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #2 on: February 05, 2007, 04:49:33 pm »

Yes, it does seem to be down right now. I'll contact the site administrator.

Thank you for reporting that.

Phil
Logged
textpad_user
Prospector
*
Posts: 7


« Reply #3 on: February 07, 2007, 01:41:41 am »

Additionally, if it would not be much of a hassle, I'd also like to request to allow the source code to be checked out via the http/https protocol aside from the svn protocol. Our proxy blocks all access to svn. =(

Thanks.

Logged
Arantor
Site Administrator
Administrator
Master Jeweller
*****
Posts: 618



« Reply #4 on: February 07, 2007, 06:12:48 pm »

I've been away for a few days and haven't been able to post.

To answer all the questions:

 SVN was actually up but due to a weird NAT thing going on with the host, they'd manage to shift the port it was acting on, so while it was running, it was bound to port 3890 instead of the usual 3690. Fixed now though, and as per how it always was - anonymous checkout, users log in for checkin. Anyone who wants/needs a log in, please send me an email or private message.

 You can read individual files from SVN through the browser, over at http://svn.emeraldeditor.com/ but I will be setting up a script to handle daily dumps shortly; I haven't posted it to the server yet while I was waiting for the structure of the SVN to settle.

 I will be trying to integrate the daily builds with the download system where possible, but I haven't yet figured out how to do this (I'm still in the middle of doing other mod-type stuff with the download system)

Sorry for the downtime with the SVN though. I have contacted the hosting company to ensure it doesn't happen again.
Logged

"Cleverly disguised as a responsible adult!"
rageboy
Jeweller
*****
Posts: 305

Ankit Singla


« Reply #5 on: March 30, 2007, 04:34:22 pm »

I tried opening the project in VC++ Express 8 by clicking the dsw file, and it said I need to convert the VC6 file to VC8, which I did. Then I tried building it, but got the following build log: http://www-personal.umich.edu/~ankits/BuildLog.htm. Any idea what that error means? And if it has anything to do with me needing to convert the project to 8? The sources were checked out yesterday and I was trying to build the trunk.
Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #6 on: March 31, 2007, 03:53:28 am »

For Visual Studio 8, you should use the .sln file, not the .dsw file.

I think the .dsw file is out of date, but I don't have VS 6 to fix it.

Also the Express Edition is currently untested, but you might be able to compile if you get the Windows SDK off Microsoft's website.

Phil
« Last Edit: March 31, 2007, 03:58:22 am by Phil » Logged
rageboy
Jeweller
*****
Posts: 305

Ankit Singla


« Reply #7 on: April 23, 2007, 10:32:29 pm »

Attached a patch that fixes the calculator html file. page jumps ('a href="#place"') were linking to 'a name="#place"' which doesn't work. I got rid of all the # in a names in the calculator html documentation file at docs\calculator.html. This was the only file in the docs folder with that issue.

Also, if you don't mind, could you attribute my patches to Ankit Singla instead of rageboy? Thanks Grin

* calc_doc.diff (16.5 KB - downloaded 546 times.)
Logged
Pvt_Ryan
Master Jeweller
******
Posts: 422



WWW
« Reply #8 on: April 23, 2007, 11:06:29 pm »

Log the bug in the bug tracker & submit the patch..

As far as i am aware we are not "crediting" anyone in the code so the bug tracker can track patches (and therefore credits) until we come up with a way to credit ppl.
Logged
rageboy
Jeweller
*****
Posts: 305

Ankit Singla


« Reply #9 on: April 23, 2007, 11:20:41 pm »

ah. When I submitted my patch for the NSIS installer script to the forum, it was accepted and credited in the changelog, which is what I was referring to. Also, if patches are being accepted from the bug tracker, the first post in this forum topic should be edited to reflect that.
Logged
Pvt_Ryan
Master Jeweller
******
Posts: 422



WWW
« Reply #10 on: April 23, 2007, 11:44:03 pm »

I cant edit it Sad..

Imo everything should go through the tracker where possible so that it can be traced.. much easier to find fixes there than in a mess of threads
Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #11 on: April 24, 2007, 04:41:53 am »

I've never really used the bug tracker. I'll look into getting the article revised.

Phil
Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #12 on: May 29, 2007, 09:00:13 pm »

Updated the post to use the bug tracker for larger patches.

Phil
Logged
MichaelDotNet
Miner
**
Posts: 18


Now I shall smite you.


« Reply #13 on: June 08, 2007, 01:01:40 am »

Just a little tip, since most people who are probably working on the source are Windows users, they should check out http://tortoisesvn.net/, it's a very nice SVN client that integrates into Windows Explorer.
Logged
mphafner
Miner
**
Posts: 11


« Reply #14 on: July 27, 2007, 03:05:10 pm »

Additionally, if it would not be much of a hassle, I'd also like to request to allow the source code to be checked out via the http/https protocol aside from the svn protocol. Our proxy blocks all access to svn. =(

Thanks.



this is the same for me. Individual file checkout doesn't help you get the whole project. I can only use http:// not svn:// because of proxy Sad
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.247 seconds with 18 queries.