MATLAB Compiler

1. Prerequisites for Deployment 

. Verify the MATLAB Compiler Runtime (MCR) is installed and ensure you    
  have installed version 7.13.   

. If the MCR is not installed, run MCRInstaller, located in:

  <mcr_root>*/toolbox/compiler/deploy/glnx86/MCRInstaller.bin

For more information on the MCR Installer, see the MATLAB Compiler 
documentation.    



2. Files to Deploy and Package

Files to package for Standalone 
================================
-smbo_runner 
-run_smbo_runner.sh (shell script run to temporarily set environment variables and 
                     execute the application)
   -to run the shell script, type
   
       ./run_smbo_runner.sh <mcr_directory> <argument_list>
       
    at Unix or Mac command prompt. <mcr_directory> is the directory 
    where version 7.13 of MCR is installed or the directory where 
    MATLAB is installed on the machine. <argument_list> is all the 
    arguments you want to pass to your application. For example, 

    If you have version 7.13 of MCR installed in 
    /mathworks/home/application/R2010a/v713, run the shell script as:
    
       ./run_smbo_runner.sh /mathworks/home/application/R2010a/v713
       
    If you have MATLAB installed in /mathworks/devel/application/matlab, 
    run the shell script as:
    
       ./run_smbo_runner.sh /mathworks/devel/application/matlab
-MCRInstaller.bin
   -include when building component by selecting "include MCR" option 
    in deploytool
-This readme file 

3. Definitions

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. When you package and distribute an 
application to users, you include supporting files generated by the 
builder as well as the MATLAB Compiler Runtime (MCR). If necessary, 
run MCRInstaller to install version 7.13 of MCR. For more 
information about the MCR, see the MATLAB Compiler documentation.




* NOTE: <mcr_root> is the directory where MCR is installed on the target machine.


4. Appendix 

A. On the target machine, add the MCR directory to the system path    
   specified by the target system's environment variable. 


    i. Locate the name of the environment variable to set, using the  
       table below:

    Operating System        Environment Variable
    ================        ====================
    Linux                   LD_LIBRARY_PATH


     ii. Set the path by doing one of the following:

        NOTE: <mcr_root> is the directory where MCR is installed
              on the target machine.         


        . Add the MCR directory to the environment variable by issuing 
          the following commands:

            setenv LD_LIBRARY_PATH
                <mcr_root>/v713/runtime/glnx86:
                <mcr_root>/v713/sys/os/glnx86:
                <mcr_root>/v713/sys/java/jre/glnx86/jre/lib/i386/native_threads:
                <mcr_root>/v713/sys/java/jre/glnx86/jre/lib/i386/server:
                <mcr_root>/v713/sys/java/jre/glnx86/jre/lib/i386
            setenv XAPPLRESDIR <mcr_root>/v713/X11/app-defaults


        NOTE: To make these changes persistent after logout on UNIX or 
              Mac machines, modify the .cshrc file to include this  
              setenv command.
        NOTE: on UNIX or Mac, the environment variable syntax utilizes   
              forward slashes (/), delimited by colons (:).  
        NOTE: When deploying standalone applications, it is possible 
              to run the shell script file run_smbo_runner.sh 
              on UNIX and Mac instead of setting environment variables. 
              See section 2 "Files to Deploy and Package".    

