Using Cygwin

On a Windows box, Cygwin is a useful command line utility that provides a Unix like shell prompt. This is particularly useful for patching files and interfacing with CVS. The alternative is to use GUI based software, but using the shell will make it easier for you to follow handbook instructions, understand what is happening 'under-the-hood' and work under different operating systems.

Setting up Cygwin

Cygwin offers many packages that enhance its functionality. You won't want all of these since you'd be clogging up your hard drive, so this guide will simply suggest those that are useful for working with Drupal. There is a videocast Installing Cygwin on Windows XP.

If you already have Cygwin on your computer, but don't have all the packages you need, you will need to run the setup file again -- so follow along with these instructions.

  • Go to www.cygwin.com and grab the setup.exe file.
  • Run setup.exe and proceed through the screens.
    1. At the title screen just click 'Next'
    2. Choose 'Install from Internet'
    3. Root directory is usually best kept as default as are the other defaults
    4. Choose a location for downloading the installation files into
    5. Select your Internet connection settings (probably the default 'Direct connection')
    6. Choose a download mirror
    7. Select packages
      • 'cvs' is in the Devel section
      • 'patchutils' is also in the Devel section
    8. Then click install

Cygwin should now be installed on your system. If you want to add further packages later, you will need to run setup.exe again; so you may want to keep hold of the setup file.

Getting to know Cygwin

If you've never played with the Unix shell you will want to spend a few minutes getting aquainted with some basic operations. The Lifehacker website has a nice introduction to this (parts 1, 2 and 3).

Checkout Drupal files from CVS

Checking out from CVS with Cygwin requires the 'cvs' package (see 'Setting up Cygwin' above.)

You can check to see whether you have CVS installed in Cygwin by typing cvs. If you get an error, it probably hasn't installed properly. If all is well you should get some basic CVS information.

Now simply follow the instructions from the Drupal CVS repositories section of the handbook.

Patch Files

You will need the 'patchutils' package in order to apply patches using Cygwin (see 'Setting up Cygwin' above).

To patch files simply follow the instructions in the patch section of the handbook.

 
 

Drupal is a registered trademark of Dries Buytaert.