Creating A Patch

From Free Pascal wiki
Jump to navigationJump to search

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.