*banner
 

Contents


Bugs
FAQ
Javadoc
Mail
Nightly Build
Search
Visualization

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 Ptolemy II development tree, nightly build email and check in email.

How to get Ptolemy II source code

For the impatient

Read only access to the ptII svn repository:
svn co https://source.eecs.berkeley.edu/svn/chess/ptII/trunk ptII
Then follow the Ptolemy II Eclipse Instructions

Or, see the Ant instructions.

Summary of ways to get ptII

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
SVN Read Only Access We use Subversion, which we abbreviate svn. ptII via is easy to get, easy to update

The first command to try is:

svn co https://source.eecs.berkeley.edu/svn/chess/ptII/trunk ptII

An alternative command that uses the svn protocol is:

svn co svn://source.eecs.berkeley.edu/chess/ptII/trunk ptII
   

You must have Subversion installed.

For the https protocol to work, you may need to set up svn to handle your firewall or web proxy.

For the svn protocol to work, you will need to have port 3690 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.
SVN Read/Write Access The command is:
svn co svn+ssh://source.eecs.berkeley.edu/chess/ptII/trunk ptII
You can update the tree
Only given to known collaborators.
Requires that port 22 be open in your firewall

SVN Read Only Access: Summary

We use Subversion (svn) to manage the source files. For more information about svn, see the ptexternal Subversion Wiki

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 Subversion repository with read only access

via the regular svnserve port 3960, Install Subversion and then
   svn co svn://source.eecs.berkeley.edu/chess/ptII/trunk ptII
   
Then follow the Ptolemy II Eclipse Instructions,
It is also possible to access to the ptII svn repository via https. The command to try is:
   svn co https://source.eecs.berkeley.edu/svn/chess/ptII/trunk ptII
   
Note that because svn uses OpenSSL, and OpenSSL does not recognize commercial Certificate Authorities (CAs), you may need to accept the certificate by hand the first time you access the repository using https.
  • TortoiseSVN does not have this problem
  • svn compiled from sources under Mac OS X and Solaris does have this problem.
  • cxh@carson 44% svn co https://source.eecs.berkeley.edu/svn/chess/ptII/trunk ptII
    Error validating server certificate for 'https://source.eecs.berkeley.edu:443':
     - The certificate is not issued by a trusted authority. Use the
       fingerprint to validate the certificate manually!
    Certificate information:
     - Hostname: source.eecs.berkeley.edu
     - Valid: from Jul 15 00:00:00 2008 GMT until Jul 15 23:59:59 2010 GMT
     - Issuer: Terms of use at https://www.verisign.com/rpa (c)05, VeriSign Trust N\
    etwork, VeriSign, Inc., US
     - Fingerprint: da:ff:45:c9:df:6f:b5:73:ec:9c:f8:a7:cc:93:08:84:22:a8:78:3d
    (R)eject, accept (t)emporarily or accept (p)ermanently? p
    
    If you accept the certificate permanently, then you will only need to accept the certificate once.

    For details, see Certificate is not issued by a Trusted Authority

    Tortoise SVN instructions for Windows

    1. Download and install TortoiseSVN
    2. You may be prompted for a reboot. If you are brave, you can skip the reboot by using the Windows Task Manager to kill the explorer proces and then use Task Manager File -> New Task to start up explorer.
    3. Right click on the directory where you would like to check out the tree and select "SVN Checkout"
    4. Fill in the Checkout window as follows:
      URL of Repository
      https://source.eecs.berkeley.edu/svn/chess/ptII/trunk
      Checkout Directory
      Add \ptII to the directory, for example, if you want to checkout in c:\tmp, then change Checkout Directory to c:\tmp\ptII. The reason is that the working head of the ptII svn repository is named trunk. If you don't change Checkout Directory, then a directory named trunk will be created.
    5. Hit the "OK" button
    Below is a screen shot of the TortoiseSVN Checkout Window:

    TortoiseSVN screen shot

    We can set up read/write accounts on the source webserver as needed. The accounts are primarily for sponsors who cannot get read/write access via ssh.

    After downloading ptII via svn, follow the Ptolemy II Eclipse Instructions,

    SVN Read/Write and Read Only Access: Details

    Locally, the Ptolemy II svn repository is on source.eecs.berkeley.edu in /home/svn There are two ways to access the repository

  • Read-only anonymous access accounts
  • Read/write named ssh access accounts
  • Getting a Chess Website account and a SSH Account

    Once you have a SSH 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 Subversion to use a svn:// 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 Subversion and other tools
      Pick one of the methods below:
    4. Under Windows, follow the Ptolemy II Eclipse Instructions.
    5. Under Windows, install the most recent version of Subversion and Cygwin from the Ptolemy project, see http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/cygwin.htm
    6. Under Windows, Install TortoiseSVN
    7. For more information about svn, see the ptexternal Subversion Wiki
    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 svn commands are shown below:

         svn co svn://source.eecs.berkeley.edu/chess/ptII/trunk ptII
      
      In the latter command, the co stands for checkout, and svn://source.eecs.berkeley.edu/chess/ptII/trunk ptII specifies that the ptII repository should be checked out, trunk specifies that the development trunk, not the branches should be checked out. The final ptII specifies that the trunk should be placed in a ptII/ directory. 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 subversion in read only

    CVS fixme
    

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

    Read/write named ssh access accounts

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

    1. Get a ssh account on source.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 Note that the website says "CVS account", but this account is really a ssh account that can also be used for Subversion.
    4. If you would like to get email about version control 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 may 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 Subversion, Cygwin and SSH from the Ptolemy project, see http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/cygwin.htm
    8. If you already have Cygwin installed, Subversion for Windows and OpenSSH is available as part of Cygwin,
      Note that any recent version of Subversion and Cygwin should work fine.
    9. Or go to the Subversion web site and download subversion
    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 svn to use a svn+ssh connection or you can proceed with the next steps that use Cygwin.
    15. If you plan on building using Cygwin, be sure that svn is installed locally.
      If you installed Cygwin, then chances are that you already have SSH installed.
      If the svn command is not present, then
      Pick one of the methods below
    16. Under Windows, install the most recent version of svn and Cygwin from the Ptolemy project, see http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/cygwin.htm
      Note that any recent version of Subversion and Cygwin should work fine.
    17. Under Windows, Install TortoiseSVN
    18. Or go to the Subversion web site and download subversion
    19. For more information about svn, see the ptexternal Subversion Wiki

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

    20. 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 ~
      svn co svn+ssh://source.eecs.berkeley.edu/chess/ptII/trunk ptII
      
      (svn uses ssh to connect from the local machine to source)
    21. 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 HOME `pwd`
    setenv PTII `pwd`/ptII
    
    To set them in a Bash shell:
    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.

    An alternative is to use the cygpath command.

     export PTII=`cygpath -m ${PWD}`
    
    This results in a path that has forward slashes. Formerly, under Windows, Java would not work well with forward slashes, but that problem seems to be fixed in Java 1.7.
    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
    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"
    

    Subversion Hints

    For more information about svn, see the ptexternal Subversion Wiki

    To update your tree and get any updates, do:

    cd $PTII
    svn update
    make fast all
    

    To check out a copy of the tree for a particular date, see the Subversion docs, which say

    $ svn checkout -r {2006-02-17}
    $ svn checkout -r {15:30}
    $ svn checkout -r {15:30:00.200000}
    $ svn checkout -r {"2006-02-17 15:30"}
    $ svn checkout -r {"2006-02-17 15:30 +0230"}
    $ svn checkout -r {2006-02-17T15:30}
    $ svn checkout -r {2006-02-17T15:30Z}
    $ svn checkout -r {2006-02-17T15:30-04:00}
    $ svn checkout -r {20060217T1530}
    $ svn checkout -r {20060217T1530Z}
    $ svn checkout -r {20060217T1530-0500}
    

    File name length problems with Subversion and Windows

    When using subversion under Windows there have been problems reported when trying to copy the ptII subversion repository. The issue seems to be that the ptolemy/data/properties directory contains files that have long names that can result in problems. This problem only occurs with Subversion and only occurs in the ptII devel release, it has not occurred in the source download.

    For details, see Long file name on windows.

    Updating This Page

    This page is under CVS not svn (the ptII repository is under svn).

    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://chess.eecs.berkeley.edu/softdevel/faq/1/

    Version: $Id: index.html,v 1.81 2012/08/30 05:03:53 cxh Exp $

    You are not logged in 
    ©2002-2013 Chess