Cygwin Installation

The Cygwin toolkit provides Unix tools on the Windows platform. You need only install the Cygwin toolkit if you are rebuilding from source and intend to develop your own actors using Java.

Note that compile your own actors, you will also need the javac compiler. The javac compiler is part of the JDK, which is available at: The javac compiler is not present in the Java Runtime Environment (JRE)

The Cygwin home page is at

Complete installation instructions can be found at

Installing Cygwin from the self-extracting executable

Compiling the Ptolemy II Matlab interface and Java Native Interface (JNI) actor requires that the a C compiler be installed. The Matlab interface requires that Matlab be installed on the local machine. The gcc compiler is fairly large, so we provide three separate self-extracting downloads of the cygwin tools for Windows.

  1. cygwinBasic.exe (10.9 Mb) - The tools necessary to compile and configure Ptolemy II except for the Matlab interface and the JNI Actor.
  2. cygwingDevel.exe (34.6 Mb) - The tools necessary to compile and configure Ptolemy II including the Matlab interface and the JNI Actor. This download includes everything in cygwinBasic.exe above.

The sources for the above downloadables can be found in cygwingDevelSrc.exe (116.3 Mb)

Cygwin for Mescal

The above downloads date from April, 2003 and are what we used to test the Ptolemy II 3.0.2 release. In October, 2003, we created a new set of Cygwin installers that include more up to date versionsmes of gcc and other tools. These Cygwin installers have not been tested with Ptolemy II 3.0.2, but Mescal users will want to download these updated version.
  1. cygwinDevel20031015.exe (49 Mb) - The tools necessary to compile and configure Ptolemy II including the Matlab interface and the JNI Actor.
  2. cygwinDevel20031015Sources.exe (168 Mb) - The sources for cygwinDevel20031015.exe

Cygwin Installation instructions

  1. Most Ptolemy II users will
    Download and execute cygwinBasic.exe (01.9 Mb).
    If you are running under Windows and have Matlab installed on your local machine, then
    Download and execute cygwinDevel.exe (34.6 Mb).
    The files will be extracted to an seemingly arbitrary directory. You may find it easier to change the directory to something short, like c:\temp\cygwin.
  2. setup.exe should start up automatically for you.
  3. Click on Next
  4. Install from Local Directory should already be selected for your. Click on Next.
  5. Keep the default of C:\cygwin for the Select Root Install Directory.
    Keep the default All Users,
    Change the Default Text File Type to DOS
    (If you select Unix instead of DOS, then you will likely have Cygwin CR/NL problems with CVS)
    and then click on Next.
  6. Keep the default for Local Package Directory and click on Next.
  7. The Select packages to install window will come up with the default settings, we need to change from default to install click on the word default that is to the right of All. The subpages should then change from default to Install. In the screen shot below, we have just clicked on default: Cygwin Setup
  8. Select Next, which will install all the packages.
  9. Select Create Desktop Icon and Add to Start Menu according to your preferences.
  10. Remove the temporary directory where you extracted the files.
  11. c:/cygwin/etc/passwd is created during the Cygwin installation. If your Windows account is a domain account and not a local account, then you may need to add an entry to c:/cygwin/etc/passwd by hand.
    To do this, start up the Cygwin bash shell with Start ->?Cygwin
    Then use the mkpasswd command to append a line with your login information, for example, I used:
     mkpasswd -d -u cxh --path-to-home=/cygdrive/c/users >> /etc/passwd
    mkpasswd -h will print out help for the mkpasswd command
  12. Follow the instructions in the Set the value of the PTII environment variable section

Installing Cygwin from the Web

We provide prebuilt downloads of the subset of Cygwin tools needed to recompile Ptolemy II. The Cygwin tools are constantly being updated, for the latest versions, see the Cygwin website.

Instructions for installing Cygwin from the Cygwin website can be found on the for Ptolemy II Installation Page

Enabling Copy in Cygwin Bash under XP

You may need to enable copy and paste in the bash shell window.

If copy and paste are working properly, then you should be able to highlight text by left clicking and dragging the mouse over the text and then hitting the Enter key to copy the highlighted text.

The Cygwin faq at says:

How can I copy and paste into Cygwin console windows?

Under Windows NT, open the properties dialog of the console window. The options contain a toggle button, named "Quick edit mode". It must be ON. Save the properties.

Under Windows 9x, open the properties dialog of the console window. Select the Misc tab. Uncheck Fast Pasting. Check QuickEdit.

You can also bind the insert key to paste from the clipboard by adding the following line to your .inputrc file:

    "\e[2~": paste-from-clipboard 
More precisely:
  1. Start up bash by doing Start -> Programs -> Cygwin -> Cygwin Bash Shell.
  2. Right click on the icon in the upper left of the title bar and select properties
  3. Under Options, select 'QuickEdit Mode', hit ok
  4. Select 'Modify shortcut that started this window', hit ok

Cygwin download contents

The download of basic cygwin tools from April, 2003 includes:

ash-20020731-1		required by cvs
crypt-1.0-1.tar.gz	required by cvs
libgdbm-		 required by cvs
libiconv2-1.8-2		 required by sed
 ncurses-5.3-1		Required by readline
openssl-0.9.7a-3	Required by openssh
pcre-3.7-1		Required by less (pcre = Perl Compatible regex)

The download of devel cygwin tools from April, 2003, includes all the tools from the basic cygwin download listed above and

db3.1	                 required by perl
perl-5-8.0-2.tar.gz      sadly, autoconf requires perl