*banner
 

Contents


Book
Bugs
FAQ
Javadoc
Mail
Nightly Build (Installers)
Nightly Hudson (Logs)
Search
Stats

Ptolemy II External Access

The ptexternal workgroup is how the Ptolemy Project collaborates with researchers and developers outside Berkeley. Below are instructions for accessing the current development version of Ptolemy II, which is stored in a Subversion (SVN) repository. Other key resources:

How to get Ptolemy II source code

For the impatient

Get read-only access to the ptII SVN repository, install Java, install Apache Ant, build and run:
      svn co https://repo.eecs.berkeley.edu/svn-anon/projects/eal/ptII/trunk ptII
      cd ptII
      export PTII=`pwd`
      ./configure
      ant
      cd bin
      make
      ./vergil
    
To develop Ptolemy II code, we recommend that you follow the Ptolemy II Eclipse Instructions

Or, see the Ant instructions.

Windows users, Eclipse is the preferred installation method. If you want to build with Cygwin, see

Summary of ways to get ptII

How Advantages Disadvantages
Use the most recent stable release Stable configuration that has been tested on multiple platforms
Includes a Windows installer
Last updated in 2008.
Use the most recent snapshot release Stable configuration that has been lightly tested on multiple platforms.
Includes a Windows installer.
Updated in February, 2014.
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://repo.eecs.berkeley.edu/svn-anon/projects/eal/ptII/trunk ptII
	
Note that the svn:// and svn+ssh:// protocols are not supported here.

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.

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 https://repo.eecs.berkeley.edu/svn/projects/eal/ptII/trunk ptII
      
You can update the tree
Only given to known collaborators.
Note that the svn:// and svn+ssh:// protocols are not supported here.
The repository is hosted on the EECS Departmental Version Control System at http://repo.eecs.berkeley.edu. See the EECS Repo FAQ for information about external users.

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.

It is also possible to access to the ptII svn repository via https. The command to try is:
	  svn co https://repo.eecs.berkeley.edu/svn-anon/projects/eal/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.
  • 	  ealmac10:tmp root# svn co https://repo.eecs.berkeley.edu/svn-anon/projects/eal/ptII/trunk ptII
    	  Error validating server certificate for 'https://repo.eecs.berkeley.edu:443':
    	  - The certificate is not issued by a trusted authority. Use the
    	  fingerprint to validate the certificate manually!
    	  Certificate information:
    	  - Hostname: repo.eecs.berkeley.edu
    	  - Valid: from Wed, 22 Aug 2012 00:00:00 GMT until Sat, 22 Aug 2015 23:59:59 GMT
    	  - Issuer: InCommon, Internet2, US
    	  - Fingerprint: d3:65:79:fe:3c:ee:79:e4:6b:5d:2a:6c:dd:06:f4:05:80:ca:cb:ec
    	  (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://repo.eecs.berkeley.edu/svn-anon/projects/eal/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 repo.eecs.berkeley.edu There are two ways to access the repository

  • Read-only anonymous access accounts
  • Read/write named ssh access accounts
  • 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 command to check out the tree is:

      	  svn co https://repo.eecs.berkeley.edu/svn-anon/projects/eal/ptII/trunk ptII
      	
      In the latter command, the co stands for checkout, and https://repo.eecs.berkeley.edu/svn-anon/projects/eal/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 everything is ok, the command will check out files for a few minutes.
    9. The source code is now checked out, now follow the Install Java instructions below

    Read/write named https access accounts

    1. The Ptolemy II repository is hosted on repo.eecs.berkeley.edu. To get read/write access, the easiest thing to do is to email Christopher. There are two types of accounts:
      • Local accounts for people who are in the EECS LDAP database. These accounts will have usernames like cxh
      • Non-local accounts for people who are not in the EECS LDAP database. These accounts will have usernames like cxbrooks@gmail.com
    2. If you would like to get email about version control changes, then Options -> Membership and request a Developer account for ptexternal.
    3. 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.
    4. If you plan on building using Cygwin, be sure that svn is installed locally.
      If the svn command is not present, then
      Pick one of the methods below
    5. 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.
    6. Under Windows, Install TortoiseSVN
    7. Or go to the Subversion web site and download subversion
    8. For more information about svn, see the ptexternal Subversion Wiki
    9. 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 https://repo.eecs.berkeley.edu/svn-anon/projects/eal/ptII/trunk ptII
        
      (svn uses ssh to connect from the local machine to source)
    10. The source code is now checked out, now follow the Install Java instructions below

    Install Java

    Ptolemy II requires JDK 1.6. or later.
    JDK 1.5 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 the latest JDK from http://java.sun.com/javase/downloads/index.jsp
      Oracle calls the JDK various names: JDK 7 or Java SE 7 or JDK1.7.
      The installation should end up in a directory like c:/Program Files/Java/jdk1.7.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 code download.

    For details, see Long file name on windows.

    Updating This Page

    See Editing ptexternal workgroup content.

    Version: $Id: index.html 192 2014-09-23 15:19:47Z cxh $

    You are not logged in 
    ©2002-2014 Chess