Contents


Bugs
FAQ
Javadoc
Mail
Nightly Build
Search

ptexternal

The ptexternal workgroup is how the Ptolemy Project collaborates with external developers. We use the ptolemy-hackers mailing list discussion, ptexternal is used provide read/write access to the cvs site and CVS email.

How to get Ptolemy II source code

How Advantages Disadvantages
Use the most recent stable release Stable configuration that has been tested on multiple platforms
Optionally includes a Windows installer
Updated only once a year or so
CVS Read Only Access Easy to get, easy to update Requires cvs and that port 2401 or port 443 be open in your firewall
Nightly Build source tar files Easy to get
Optionally includes a Windows installer (that has not been tested)
The nightly build does not always work, so you might download a broken build, which would require downloading a new version.
Getting updates requires downloading an entire new distribution.
CVS Read/Write Access You can update the tree Only given to known collaborators.
Requires that port 22 be open in your firewall

CVS Read Only Access: Summary

Note: You do not need access to the ptexternal workgroup to get read-only access to the ptII tree.

See also the Nightly Build Page, which includes nightly snapshot tar files.
To access the Ptolemy II CVS repository with read only access via the regular cvspserver port 2401, use
   cd c:/directoryofyourchoice
   cvs -d :pserver:anon@source.eecs.berkeley.edu:/home/cvs/cvsanon login
   # No password needed, hit enter
   cvs -d :pserver:anon@source.eecs.berkeley.edu:/home/cvs/cvsanon co ptII
   
Then follow the Ptolemy II Eclipse Instructions,

Or

If your firewall is blocking port 2401
To access the Ptolemy II CVS repository with read only access via port 443 (usually used for https websites), use
   cd c:/directoryofyourchoice
   cvs -d :pserver:anon@source.eecs.berkeley.edu:443/home/cvs/cvsanon login
   # No password needed, hit enter
   cvs -d :pserver:anon@source.eecs.berkeley.edu:443/home/cvs/cvsanon co ptII
   
Then follow the Ptolemy II Eclipse Instructions,

CVS Read/Write and Read Only Access: Details

We use the Concurrent Versions System (CVS) to manage the source files. For more information about CVS, see http://www.cvshome.org/ or the GSRC softdevel workgroup CVS FAQ.

Locally, the Ptolemy II CVS Repository is on source.eecs.berkeley.edu in /home/cvs

Getting a Chess Website account and a CVS Account

There are two types of CVS accounts:
  • Read-only anonymous access accounts
  • Read/write named cvs access accounts
  • Once you have a CVS account for read-only or read/write access, there are two ways to build Ptolemy II from source:

  • Follow the Ptolemy II Eclipse Instructions, which requires that Eclipse be installed.
    (See the password instructions below).
  • Use the standard configure/make method, which under Windows requires that Cygwin be installed.
  • Read-only anonymous access accounts

    If you are primarily interested in getting a recent copy of the Ptolemy II sources, and are not likely to fold changes back in, then
    1. Follow the Ptolemy II Eclipse Instructions and set up cvs to use a pserver connection or you can proceed with the next steps that use the standard configure/make method
    2. If you have chosen to install using the standard configure/make method, using a shell such as Cygwin bash, follow the steps below:
    3. Install CVS and other tools
      Pick one of the methods below:
    4. Under Windows, install the most recent version of CVS and Cygwin from the Ptolemy project, see http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/cygwin.htm
    5. CVS for Windows, is available as part of Cygwin, see How do I edit pages in a group with the "CVS Authoring" option? for detailed instructions about how to set up Cygwin.
      Note that any recent version of CVS and Cygwin should work fine.
    6. Or go to cvshome.org downloads
    7. For information about CVS, see http://www.gigascale.org/softdevel/faq/1/

      You also might want to look over John Reekie's notes at http://ptolemy.eecs.berkeley.edu/~johnr/info/cvs.html

    8. Select the directory into which you wish to install Ptolemy II. cd to that directory. Installation will create a new subdirectory named ptII within your chosen directory. All of Ptolemy II will be installed inside this subdirectory. (In case you are using the Cygwin Bash shell, and may later wish to upgrade Cygwin, you may wish to choose a directory outside of the Cygwin directory tree.

      The cd and initial cvs commands are shown below:

      cd c:/directoryofyourchoice
      cvs -d :pserver:anon@source.eecs.berkeley.edu:/home/cvs/cvsanon login
      
      
      Important: No password is needed, just hit "Enter" when prompted for a password.
        cvs -d :pserver:anon@source.eecs.berkeley.edu:/home/cvs/cvsanon co ptII
      
      In the latter command, the co stands for checkout, and ptII specifies both the module being checked out and the directory to be created for it. If you did it right, it will grind for a few minutes.
    9. The source code is now checked out, now follow the Install Java instructions below

    Below is a example of how one can check out the tree using the CVS read only password:

    cxh@maury 144% cvs -d :pserver:anon@source.eecs.berkeley.edu:/home/cvs/cvsanon co ptII
    (Logging in to anon@source.eecs.berkeley.edu)
    CVS password:
    
    cxh@maury 145% cvs -d :pserver:anon@source.eecs.berkeley.edu:/home/cvs/cvsanon co ptII
    cvs server: Updating ptII
    cvs server: Updating ptII/bin
    cvs server: Updating ptII/boot
    cvs server: Updating ptII/collections
    cvs server: Updating ptII/collections/doc
    cvs server: Updating ptII/collections/images
    cvs server: Updating ptII/com
    U ptII/com/makefile
    etc . . .
    
    

    For further information, see How does anonymous password authentication work?

    Read/write named cvs access accounts

    If you have been invited to have read/write access to the ptII tree, then follow the procedure below:

    1. Get a CVS account chess.eecs.berkeley.edu To do this:
    2. If necessary, get a Chess Website account: by going to http://chess.eecs.berkeley.edu/login/?subpage=Request and click on the Member radio button in the ptexternal section.
    3. Once your account has been enabled, request a CVS account by going to https://chess.eecs.berkeley.edu/options/request/cvsacct
    4. If you would like to get email about cvs changes, they should go to Options -> Membership and request a Developer account for ptexternal.
    5. Install SSH
      You will be using ssh to connect to our machines, so you will need to install SSH 2.
      Even if you are using Eclipse, you need to have ssh set up so that you can connect to source.eecs.berkeley.edu and change your password
      Pick one of the methods below.
    6. If you are going to be using Eclipse, and if you have a UCB EECS department laptop, then a SSH client is probably installed on your laptop. If you do not have a client, and if you are going to be using Eclipse, and you work for an educational institution, you could try installing ssh from http://www.ssh.com.
    7. If, you will be building using the configure/make method under Windows, install the most recent version of CVS, Cygwin and SSH from the Ptolemy project, see http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/cygwin.htm
    8. If you already have Cygwin installed, CVS for Windows and OpenSSH is available as part of Cygwin, see How do I edit pages in a group with the "CVS Authoring" option? for detailed instructions about how to set up Cygwin
      Note that any recent version of CVS and Cygwin should work fine.
    9. Or go to cvshome.org downloads
    10. For Unix: http://www.openssh.org/portable.html
    11. To test ssh, try
      ssh source.eecs.berkeley.edu
      
      You should see something like:
      cxh@maury 57% ssh source.eecs.berkeley.edu
      cxh@source.eecs.berkeley.edu's password:
      
      Last login: Fri Mar 24 09:15:45 2000 from maury.eecs.berke^M^M
      No mail.
      $
      
      
      Then use the passwd command to change your password.

      If your login on our machines is different than the login on the account you are connecting on, then use:

      ssh -l remotelogin source.eecs.berkeley.edu
      
      For further information about account names, see: Why is my CVS account name different from my website account name?
    12. Exit the ssh section and return to the local machine
    13. See also: How do I use CVS without typing my password each time?
    14. At this point, you can either follow the Ptolemy II Eclipse Instructions and set up cvs to use a extssh connection or you can proceed with the next steps that use Cygwin.
    15. If you plan on building using Cygwin, be sure that CVS is installed locally.
      If you installed Cygwin, then chances are that you already have SSH installed.
      If the cvs command is not present, then
      Pick one of the methods below
    16. Under Windows, install the most recent version of CVS and Cygwin from the Ptolemy project, see http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/cygwin.htm
    17. CVS for Windows, is available as part of Cygwin, see How do I edit pages in a group with the "CVS Authoring" option? for detailed instructions about how to set up Cygwin.
      Note that any recent version of CVS and Cygwin should work fine.
    18. Or go to cvshome.org downloads
    19. For information about CVS, see http://www.gigascale.org/softdevel/faq/1/

      You also might want to look over John Reekie's notes at http://ptolemy.eecs.berkeley.edu/~johnr/info/cvs.html

      You must use ssh to connect to source.eecs.berkeley.edu.

    20. Be sure to set CVS_RSH to the location of your ssh binary. In your ~/.cshrc:
      setenv CVS_RSH ssh
      
      If you are running Cygwin and bash, then do
      export CVS_RSH=ssh
      
      Under Windows, you can permanently add this setting by using the System control panel, instructions on how to do this are includede below
    21. Locally, most users place the Ptolemy II tree in ~/ptII so that other local users can easily find it.
      Check out the tree by running the following command on their local machine:
      cd ~
      cvs -d :ext:source.eecs.berkeley.edu:/home/cvs co ptII
      
      (cvs uses ssh to connect from the local machine to source)
    22. The source code is now checked out, now follow the Install Java instructions below

    Install Java

    Ptolemy II requires JDK 1.5. or later.
    JDK 1.4 will not work, for details, see $PTII/doc/install.htm.
    ptII/doc/install.java in the source tree you have just downloaded more fully describes what packages to install.

    The quick Java installation instructions:

    1. Install JDK 1.6 from http://java.sun.com/javase/downloads/index.jsp
      Sun calls JDK 1.6 by various names: JDK 6 or Java SE 6.
      The installation should end up in a directory like c:/Program Files/Java/jdk1.6.0

    Build instructions

    You have now checked out the source code! But it still needs to be compiled. First you will need to set some environment variables. These may be set locally in the shell, or globally via a Windows dialog box.

    To set the environment variables in a C shell, first cd to the directory (such as your home directory) where your ptII directory lives. Then use the following commands:

    setenv CVS_RSH ssh
    setenv HOME `pwd`
    setenv PTII `pwd`/ptII
    
    To set them in a Bash shell:
    export CVS_RSH=ssh
    export HOME=c:/directoryOfYourChoice
    export PTII=c:/directoryOfYourChoice/ptII
    
    The export commands above are useful if you will be creating subprocesses of your Bash shell. Anyway, they don't hurt.

    Cygwin directory mapping

    Note that Cygwin remaps directories, so d:\tmp may appear as /cygdrive/d/tmp.

    Unfortunately, the java command does not understand the Cygwin /cygdrive notation, so java may not find the files it needs.

    For example, pwd returns /cygrive/d/tmp/ptII, which will not work with java:

    cxh@MOWAT-171 /cygdrive/d/tmp/ptII
    $ PTII=d:\\tmp\\ptII
    
    cxh@MOWAT-171 /cygdrive/d/tmp/ptII
    $ echo $PTII
    d:\tmp\ptII
    
    cxh@MOWAT-171 /cygdrive/d/tmp/ptII
    $ cd $PTII
    
    cxh@MOWAT-171 /cygdrive/d/tmp/ptII
    $ pwd
    /cygdrive/d/tmp/ptII
    
    So, under Cygwin, it is best to avoid using pwd when setting variables. Avoid:
    PTII=`pwd`/ptII
    
    and use
    PTII=d:\\tmp\\ptII
    
    instead. Note that the configure script checks for this sort of thing.
    In either shell, you may also wish to set your path to include c:\directoryofyourchoice\ptII\bin (where vergil lives) and c:\Program Files\Java\jdk1.6.0\bin or wherever your java installation is located.

    To set environment variables in Windows, do Start -> Settings -> Control Panel -> System. Click the Advanced tab and then the Environment Variables button. Set up the following under the heading User variables for yourlogin

    Variable    Value
    CVS_RSH     ssh
    HOME        c:\directoryofyourchoice
    PTII        c:\directoryofyourchoice\ptII
    

    Under System Variables, augment your Path variable. Edit it, and add c:\directoryofyourchoice\ptII\bin; in front of the existing text in the Variable Value window. You may also wish to add something like c:\Program Files\Java\jdk1.6.0\bin; to point to the java installation you want Ptolemy II to use. Otherwise, the one in your WINNT/System32 directory may be used.

    If you have used the Windows dialog to set the environment variables, you will need to open a new shell in order to have them take effect. On the other hand, if you have set them from within the shell, do not open a new one. New shells will not have the variables set.

    You are now ready to compile Ptolemy II! First you configure. To use the default java instalation on your system, simply type the following command:

    ./configure
    
    The ./ in the above command is needed to convince the shell that you really do want to execute configure as a command, even though your current working directory may not be on your path. If you wish to control the exact java used, you may specify it with a command like the following instead:
    ./configure --with-java=c:/Program\ Files/Java/jdk1.6.0
    
    Note that --with-java is not well supported, and you are better off having your path properly set up so that the version of java you would like Ptolemy II to use is first in your path.

    Which ever form you use, it grinds briefly. Some warnings or errors are normal. Mostly they indicate optional adjuncts to Ptolemy II which were not installed.

    The next step is to run make:

    make fast all
    
    The all directive isn't strictly necessary, since all is the default. The fast directive speeds compilation of multiple java files. It causes many java files to be loaded into the compiler at once, instead of re-invoking the compiler for each java file.

    You're done!! You can type now vergil (or $PTII/bin/vergil if you did not set your path) in the C shell or cygwin Bash window and it should start up!

    Note that if your $PTII path includes spaces, then try

    "$PTII/bin/vergil"
    

    CVS Hints

    The GSRC CVS FAQ has more information about CVS.

    To update your tree and get any updates, do:

    cd $PTII
    cvs update
    make fast all
    
    After doing the initial checkout, it is not necessary to use the -d :pserver ... or -d :ext ... command line argument.

    cvs update is not very smart about creating new directories, one must do cvs update -P -d to prune old directories and create new directories. Note that this -d has a different meaning than the -d used when you initially checked out the tree. Usually a good thing todo is to create a ~/.cvsrc that contains

    update -P -d
    
    so that every time you run cvs update, the -P -d flags are automatically added.

    If you are connecting via a modem, you may want to add

    cvs -z9
    
    to your ~/.cvsrc file so that cvs uses compression when tranferring files.

    To check out a copy of the tree for a particular date, see How do a check out a tree from a particular date in the Software Developer's workgroup CVS FAQ.

    The CVS FAQ at http://www.gigascale.org/softdevel/faq/1/ has a wealth of information about CVS and Cygwin.
    In particular, see

    Updating This Page

    This page is under CVS. For more information, see How do I edit pages in a group with the "CVS Authoring" option?

    • The command to check out this website is:
         cvs -d :ext:source.eecs.berkeley.edu:/home/cvs_chess co ptexternal
         enter your password
      
      Note that the ptexternal repository is in /home/cvs_chess, not /home/cvs.
      The cvs command will create a directory "ptexternal" with a subdirectory "web" with at least one file, "index.html". After this directory is created, you never need to do this again.
    • Next time you want edit files on the website, just go to this ptexternal directory and type: cvs update enter your password It will update your local copies of the files
    • You can edit the index.html file.
    • You can add a new file by putting it in the same directory and doing:
         cvs add filename.html  (if it's a text file)
         cvs add -kb filename.doc (for example, if it's a binary file)
      
      It's critical to remember the -kb for binary files (Word, PDF, etc.), or else CVS corrupts the file.
    • To commit your changes do
         cvs commit -m "explanation of changes"
         enter your password
      
    • Once you have committed the changes, you can make them visible on the website by going to the website and clicking on "CVS update" at the bottom of any page.

    For more information, see How do I edit pages in a group with the "CVS Authoring" option?

    The general CVS faq is at http://www.gigascale.org/softdevel/faq/1/

    Version: $Id: index.html,v 1.55 2007/11/30 01:02:43 cxh Exp $

    You are not logged in
    ©2002-2008 Chess