Difference between revisions of "Creating A Patch"

From Lazarus wiki
Jump to navigationJump to search
m (Changed HardCoded Numbers to automatic outline with"#")
Line 9: Line 9:
 
We'll assume that you have your CVS checkout of Lazarus in C:\lazarus
 
We'll assume that you have your CVS checkout of Lazarus in C:\lazarus
  
1) Open a MS-DOS prompt
+
# Open a MS-DOS prompt
 
+
# c: {press enter}
2) c: {press enter}
+
# cd \lazarus {press enter}
 
+
# cvs diff -u > mypatch.dif {press enter}
3) cd \lazarus {press enter}
 
 
 
4) cvs diff -u > mypatch.dif {press enter}
 
  
 
'''Instructions For Linux/BSD etc:'''
 
'''Instructions For Linux/BSD etc:'''
Line 21: Line 18:
 
We'll assume that you have your CVS checkout of Lazarus in $HOME/lazarus
 
We'll assume that you have your CVS checkout of Lazarus in $HOME/lazarus
  
1) Open your favorite Terminal program
+
# Open your favorite Terminal program
 
+
# cd $HOME {press enter}
2) cd $HOME {press enter}
+
# cd lazarus {press enter}
 
+
# cvs diff -u > mypatch.diff {press enter}
3) cd lazarus {press enter}
 
 
 
4) cvs diff -u > mypatch.diff {press enter}
 
  
  
Line 45: Line 39:
 
Most probably you do not have cvs.exe in your PATH environment variable. The following steps should fix this problem:
 
Most probably you do not have cvs.exe in your PATH environment variable. The following steps should fix this problem:
  
1) Locate cvs.exe using the Find Files feature of your Start menu.
+
# Locate cvs.exe using the Find Files feature of your Start menu.
 
+
# Once you have located cvs.exe you need to add the directory it is in to your PATH.
2) Once you have located cvs.exe you need to add the directory it is in to your PATH.
 
 
 
 
As an example: From the command prompt type:  
 
As an example: From the command prompt type:  
 
   set PATH=%PATH%;"C:\Program Files\GNU\WinCvs 1.3\cvsnt\"
 
   set PATH=%PATH%;"C:\Program Files\GNU\WinCvs 1.3\cvsnt\"
Line 63: Line 55:
 
For Windows2000 or greater you can add this directory to your PATH by:
 
For Windows2000 or greater you can add this directory to your PATH by:
  
1) Right-Clicking on "My Computer"
+
# Right-Clicking on "My Computer"
 
+
# Select "Properties"
2) Select "Properties"
+
# Choose the "Advanced" tab.
 
+
# Click the "Environment Variables" button.
3) Choose the "Advanced" tab.
+
# Locate the "Path" line in "System Variables" and add: ;"C:\Program Files\GNU\WinCvs 1.3\cvsnt\" to the end.
 
 
4) Click the "Environment Variables" button.
 
 
 
5) Locate the "Path" line in "System Variables" and add: ;"C:\Program Files\GNU\WinCvs 1.3\cvsnt\" to the end.
 
  
 
''Note: Your directory containing cvs.exe might not be the same on your computer as the one used in this document. It is used here only as an example.''
 
''Note: Your directory containing cvs.exe might not be the same on your computer as the one used in this document. It is used here only as an example.''

Revision as of 17:24, 22 February 2005

This assumes you have gotten Lazarus from CVS. Getting Lazarus#Via CVS


Instructions

Open a command or cmd prompt and cd to the directory that the Lazarus source exists.

Instructions For Windows:

We'll assume that you have your CVS checkout of Lazarus in C:\lazarus

  1. Open a MS-DOS prompt
  2. c: {press enter}
  3. cd \lazarus {press enter}
  4. cvs diff -u > mypatch.dif {press enter}

Instructions For Linux/BSD etc:

We'll assume that you have your CVS checkout of Lazarus in $HOME/lazarus

  1. Open your favorite Terminal program
  2. cd $HOME {press enter}
  3. cd lazarus {press enter}
  4. cvs diff -u > mypatch.diff {press enter}


Optional: Open the new file created in your Lazarus directory (in this case "mypatch.diff") with your favorite text editor. Remove all the lines starting with "?" and then save it..

Note: I also like to look the file over to see if there is anything in there that shouldn't be.

Now Zip or gzip the file you have created and email it to the Lazarus mailing list.

That's all!


Troubleshooting

This mostly applies to Windows but could apply for other platforms as well.

You get the error "cvs command not found" or similar. Most probably you do not have cvs.exe in your PATH environment variable. The following steps should fix this problem:

  1. Locate cvs.exe using the Find Files feature of your Start menu.
  2. Once you have located cvs.exe you need to add the directory it is in to your PATH.

As an example: From the command prompt type:

  set PATH=%PATH%;"C:\Program Files\GNU\WinCvs 1.3\cvsnt\"

Note: Your directory containing cvs.exe might not be the same on your computer as the one used in this document. It is used here only as an example.


The following is optional:

To make this permanant

For Windows98 or lower, you can add the line above (or similar) to your C:\autoexec.bat file near the end.

For Windows2000 or greater you can add this directory to your PATH by:

  1. Right-Clicking on "My Computer"
  2. Select "Properties"
  3. Choose the "Advanced" tab.
  4. Click the "Environment Variables" button.
  5. Locate the "Path" line in "System Variables" and add: ;"C:\Program Files\GNU\WinCvs 1.3\cvsnt\" to the end.

Note: Your directory containing cvs.exe might not be the same on your computer as the one used in this document. It is used here only as an example.