Sunteți pe pagina 1din 4

MATLAB Compiler

Working with the MCR


Installing the MCR on a Deployment Machine
Before end users can run MATLAB Compiler-generated components on their machines, they need to install the MCR, if it is not already present. You only need to install the MCR one time on a deployment machine. Note The MCR is version specific, so you must ensure that your end users have the proper version of the MCR installed on their machines. To prepare the deployment machine on Windows, Windows users simply need to install the MCR by using the MCRInstaller utility ( MCRInstaller.exe ). To prepare the deployment machine on UNIX, UNIX users need to Install the MCR Set the path properly Set the necessary environment variables UNIX users must execute the MCRInstaller , which is a ZIP file, and then manually set the path and environment variables as required. Note If the UNIX MCRInstaller.zip file is not present on your machine, you can generate it using the buildmcr function in MATLAB. For more information on using buildmcr , see Deploying the Application.

Windows 1. Locate the MCRInstaller utility in the <matlabroot>\toolbox\compiler\deploy\win32 directory and copy it to a new directory on your machine. Run the utility to start the installation. MCRInstaller.exe The MCRInstaller opens a command window and begins preparation for the installation.

Note On Windows, if you run MCRInstaller in a directory that does not have write permission, you get a series of errors beginning with error: cannot create Setup.exe To work around this, use the -d option to specify a directory that does have write permission. For example, MCRInstaller.exe -d D:\MCRInstall 2. When the MATLAB Component Runtime startup screen appears, click Next to begin the installation.

3. The setup wizard starts. Click Next to continue. 4. The Select Installation Folder dialog lets you choose where you want to install the MCR. This dialog also lets you view available and required disk space on your system. You can also choose whether you want to install the MCR for just yourself or others. Select your options, and then click Next to continue.

5. Confirm your selections by clicking Next. The installation begins. The process takes some time due to the quantity of files that are installed. 6. When the installation completes, click Close on the Installation Completed dialog to exit. Note The Install MATLAB Component Runtime for yourself, or for anyone who uses this computer option is not implemented for this release. The current default is Everyone.

UNIX 1. Locate the MCRInstaller.zip file and copy it to a new directory on your machine. This new directory will become the installation directory for your Compiler-generated components. To install the MCR, unzip MCRInstaller.zip . 2. Update your dynamic library path. Note For readability, the following commands appear on separate lines, but you must enter each setenv command on one line.

Linux. setenv LD_LIBRARY_PATH <mcr_root>/<ver>/runtime/glnx86: <mcr_root>/<ver>/sys/os/glnx86: <mcr_root>/<ver>/sys/java/jre/glnx86/jre1.5.0/lib/i386/native <mcr_root>/<ver>/sys/java/jre/glnx86/jre1.5.0/lib/i386/client <mcr_root>/<ver>/sys/java/jre/glnx86/jre1.5.0/lib/i386: setenv XAPPLRESDIR <mcr_root>/<ver>/X11/app-defaults Solaris. setenv LD_LIBRARY_PATH /usr/lib/lwp: <mcr_root>/<ver>/runtime/sol2: <mcr_root>/<ver>/sys/os/sol2: <mcr_root>/<ver>/sys/java/jre/sol2/jre1.5.0/lib/sparc/native_ <mcr_root>/<ver>/sys/java/jre/sol2/jre1.5.0/lib/sparc/client: <mcr_root>/<ver>/sys/java/jre/sol2/jre1.5.0/lib/sparc: setenv XAPPLRESDIR <mcr_root>/<ver>/X11/app-defaults Linux x86-64. setenv LD_LIBRARY_PATH <mcr_root>/<ver>/runtime/glnxa64: <mcr_root>/<ver>/sys/os/glnxa64: <mcr_root>/<ver>/sys/java/jre/glnxa64/jre1.4.2/lib/amd64/nati <mcr_root>/<ver>/sys/java/jre/glnxa64/jre1.4.2/lib/amd64/clie <mcr_root>/<ver>/sys/java/jre/glnxa64/jre1.4.2/lib/amd64: setenv XAPPLRESDIR <mcr_root>/<ver>/X11/app-defaults HP-UX. setenv SHLIB_PATH <mcr_root>/<ver>/runtime/hpux: <mcr_root>/<ver>/sys/os/hpux: <mcr_root>/<ver>/bin/hpux: <mcr_root>/<ver>/sys/java/jre/hpux/jre1.4.1/lib/PA_RISC2.0/se <mcr_root>/<ver>/sys/java/jre/hpux/jre1.4.1/lib/PA_RISC2.0 setenv LD_PRELOAD <mcr_root>/<ver>/sys/java/jre/hpux/jre1.4.1/lib/PA_RISC2.0/server setenv XAPPLRESDIR <mcr_root>/<ver>/X11/app-defaults

User Interaction with the Compilation Path 1994-2005 The MathWorks, Inc.

Installing the MCR and MATLAB on the Same Machine