This readme file explains how to install your standalone copy of pdptool on  a Mac OS X version 10.5 or above. This is a compiled binary of the application that be run even if MATLAB is not installed on your system.

1. Prerequisites for Deployment

* pdptool_osxpkg.zip after extraction must contain:

-pdptool.app 

-run_pdptool.sh (shell script run to temporarily set environment variables and execute the application)

-This readme.txt
 
* This package requires  MATLAB Compiler Runtime (MCR), version 7.14.
 
========================================================================
MCR - MATLAB Compiler uses the MATLAB Compiler Runtime (MCR), which is
a standalone set of shared libraries that enable the execution of
M-files. The MCR provides complete support for all features of MATLAB
without the MATLAB GUI. For more information about the MCR, see the
MATLAB Compiler documentation.
========================================================================

2. Verify that MCR version 7.14 is installed on your system. If it
is, continue to step (3). The usual location for MCR is 
/Applications/MATLAB/MATLAB_Compiler_Runtime/<version> 
where <version> indicates the version number, in this case 'v714'.

  - If the MCR is not installed or if it is an older version, download
    the MCRInsaller.dmg file from

    http://stanford.edu/group/pdplab/pdptool/standalone/MCRv7.14/osx

- After downloading run MCRInstaller.dmg by double clicking on it or 
  selecting Open menu item from the File menu on Finder window.
 
 - This will open a window with MCRInstaller.pkg file in it. Double 
   click on it to start the installation wizard.This will setup MCR on 
   your system.

- Typically, it is installed in 
  /Applications/MATLAB/MATLAB_Compiler_Runtime/v714. You can 'Choose 
  Install Location' to select a Destination folder of you choice for 
  installation.   

  Let us call this directory MCRRootDir for future reference. 

 - Click the 'Install' button to begin the installation. 

 - It may take a few minutes to complete the process after which you 
   will get a 'Successful installation' dialog box.



3. Open run_pdptool.sh file using any editor

   - Edit line 15 to set MCRROOT variable to the destination folder, 
     MCRRootDir you selected in Step 1. It is by default set to the 
     destination folder /Applications/MATLAB/MATLAB_Compiler_Runtime/v714.

   - Save and close the file


4. Add pdptool executable to your PATH environment variable.

  a) If you are using bash shell - ( If you are not sure about your   
     shell type echo $SHELL on the command prompt)

     Replace pdptool_path in the following command with the full 
     directory name of the extracted package.

     export PATH=${PATH}:pdptool_path
  
     You can add this command in your .bash_profile file (directly
     under your home directory), so that the PATH variable is set 
     every time you log in.

  b) If you are using C shell - ( If you are not sure about your   
     shell type echo $SHELL on the command prompt)
     
     Replace pdptool_path in the following command with the full 
     directory name of the extracted package.

     setenv PATH=${PATH}:pdptool_path
     
    You can add this command in your .cshrc/.tchrc file (directly 
    under your home directory), so that the PATH variable is set 
    every time you log in.


5. You are now ready to run pdptool.

   Open a terminal window and simply type run_pdptool.sh on the terminal 
   prompt to bring up the main pdptool gui window. 

   To run any existing networks based on preconfigured network
   scripts, open a shell or terminal program of your choice. Change  
   directory to where your .m scripts reside. For example, you might have 
   the pdptool directory hierarchy with subdirectories in/Users 
   YourUserName/Desktop.  
   
   If you want to run the iac model using the jets.m script, you would
   cd to /Users/YourUserName/Desktop/pdptool/iac.

   Then, on the command line, you would type:

      run_pdptool.sh jets.m

   This will bring up the gui and execute all the statements in jets.m
   file. 

   You will notice on the cmd prompt, a pdp prompt like this -

   '>>pdp'
   
   You can type more pdptool commands on the pdp prompt to inspect
   variables and/or set options. You can also execute files containing
   sets of commands using 'runscript script.ext' where 'script.ext' is
   the name of the script file.  Ext can be 'm' or 'txt', among
   others. Each line of the file must contain a single complete matlab
   expression in ascii text format.


  
