Download the MATLAB® Runtime from the website at http://www.mathworks.com/products/compiler/mcr.
To install the MATLAB® Runtime:
Unzip/Extract the archive containing the MATLAB Runtime installer.
Platform | Steps |
---|---|
Windows® |
Double-click the self-extracting MATLAB Runtime installer that you downloaded from the web. For example, an R2017b runtime will have the name
|
Linux® |
Unzip the MATLAB Runtime installer at the terminal using the
For example, if you are unzipping the R2017b MATLAB Runtime installer, at the Terminal, type: unzip MCR_R2017b_glnxa64_installer.zip |
macOS |
Unzip the MATLAB Runtime installer at the terminal using the
For example, if you are unzipping the R2017b MATLAB Runtime installer, at the Terminal, type: unzip MCR_R2017b_maci64_installer.dmg.zip |
The release part of the installer filename (_R2017b_
) will change from one release to the
next.
Start the MATLAB Runtime installer.
Platform | Steps |
---|---|
Windows | Installer automatically starts after completing the previous step. |
Linux | At the Terminal, type: sudo ./install NoteOn Debian® based Linux distributions, you will need to type: gksudo ./install |
macOS | At the Terminal, type: ./install NoteYou may need to enter an administrator username and password
after you run |
When the MATLAB Runtime installer starts, it displays a dialog box. Read the information and then click Next to proceed with the installation.
Specify the folder in which you want to install the MATLAB Runtime in the Folder Selection dialog box.
On Windows systems, you can have multiple versions of the MATLAB Runtime on your computer but only one installation for any particular version. If you already have an existing installation, the MATLAB Runtime installer does not display the Folder Selection dialog box because you can only overwrite the existing installation in the same folder.
Confirm your choices and click Next.
The MATLAB Runtime installer starts copying files into the installation folder.
On Linux and macOS platforms, after copying files to your disk, the MATLAB Runtime installer displays the Product Configuration Notes dialog box. This dialog box contains information necessary for setting your path environment variables. Copy the path information from this dialog box and then click Next.
Click Finish to exit the installer.
To install the MATLAB Runtime without having to interact with the installer dialog boxes, use one of the MATLAB Runtime installer’s non-interactive modes:
silent—the installer runs as a background task and does not display any dialog boxes
automated—the installer displays the dialog boxes but does not wait for user interaction
When run in silent or automated mode, the MATLAB Runtime installer uses default values for installation options. You can override these defaults by using MATLAB Runtime installer command-line options or an installer control file.
When running in silent or automated mode, the installer overwrites the default installation location.
To install the MATLAB Runtime in silent mode:
Extract the contents of the MATLAB Runtime installer
file to a temporary folder, called $temp
in this
documentation.
On Windows systems, manually extract the contents of the installer file.
Run the MATLAB Runtime installer, specifying the -mode
option
and -agreeToLicense yes
on the command line.
On most platforms, the installer is located at the root of the
folder into which the archive was extracted. On Windows 64, the
installer is located in the archives bin
folder.
Platform | Command |
---|---|
Windows | setup -mode silent -agreeToLicense yes |
Linux | ./install -mode silent -agreeToLicense yes |
macOS | ./install -mode silent -agreeToLicense yes |
If you do not include the -agreeToLicense yes
the
installer will not install the MATLAB Runtime.
View a log of the installation.
On Windows systems, the MATLAB Runtime installer creates
a log file, named mathworks_
,
where username
.logusername
is your Windows log-in
name, in the location defined by your TEMP
environment
variable.
On Linux and macOS systems, the MATLAB Runtime installer displays the log information at the command prompt, unless you redirect it to a file.
When run in one of the non-interactive modes, the installer will use the default values unless told to do otherwise. Like the MATLAB installer, the MATLAB Runtime installer accepts a number of command line options that modify the default installation properties.
Option | Description |
---|---|
-destinationFolder | Specifies where the MATLAB Runtime will be installed. |
-outputFile | Specifies where the installation log file is written. |
-automatedModeTimeout | Specifies how long, in milliseconds, that the dialog boxes are displayed when run in automatic mode. |
-inputFile | Specifies an installer control file with the values for all of the above options. |
The MATLAB Runtime installer archive includes an example
installer control file called installer_input.txt
.
This file contains all of the options available for a full MATLAB installation.
Only the options listed in this section are valid for the MATLAB Runtime installer.
To install the MATLAB Runtime as a user without administrator rights on Windows:
Use the MATLAB Runtime installer to install it on a Windows machine where you have administrator rights.
Copy the folder where the MATLAB Runtime was installed to the machine without administrator rights. You can compress the folder into zip file and distribute to multiple users.
On the machine without administrator rights, add the
directory
onto the user’s path environment variable. mcr_root
\runtime\arch
You don’t need administrator rights for adding directories to a user’s path environment variable.
MCRInstaller
supports the installation of
multiple versions of the MATLAB Runtime on a target machine. This
allows applications compiled with different versions of the MATLAB Runtime to
execute side by side on the same machine.
If you do not want multiple MATLAB Runtime versions on the target machine, you can remove the unwanted ones. On Windows, run Add or Remove Programs from the Control Panel to remove any of the previous versions. On UNIX®, you manually delete the unwanted MATLAB Runtime. You can remove unwanted versions before or after installation of a more recent version of the MATLAB Runtime, as versions can be installed or removed in any order.
You do not need to install MATLAB Runtime on your machine if your machine has MATLAB installed. The version of MATLAB should be the same as the version of MATLAB that was used to create the compiled MATLAB code. Also, to act as the MATLAB Runtime replacement, the MATLAB installation must include MATLAB Compiler™.
You can, however, install the MATLAB Runtime for debugging purposes.
If you install MATLAB Runtime on a machine that already has MATLAB on it, you must adjust the library path according to your needs.
Windows
To run deployed MATLAB code against MATLAB Runtime install,
must
appear on your system path before mcr_root
\ver
\runtime\win64
. matlabroot
\runtime\win64
If
appears
first on the compiled application path, the application uses the files
in the MATLAB Runtime install area. mcr_root
\ver
\runtime\arch
If
appears
first on the compiled application path, the application uses the files
in the MATLAB installation area.matlabroot
\runtime\arch
UNIX
To run deployed MATLAB code against MATLAB Runtime on Linux, Linux x86-64,
or the <mcr_root>/runtime/<arch>
folder
must appear on your LD_LIBRARY_PATH
before
.matlabroot
/runtime/<arch>
macOS
To run deployed MATLAB code on macOS, the <mcr_root>/runtime
folder must
appear on your DYLD_LIBRARY_PATH
before
. matlabroot
/runtime/<arch>
To run MATLAB on macOS or Intel®
Mac,
must appear on your matlabroot
/runtime/<arch>DYLD_LIBRARY_PATH
before the
<mcr_root>/bin
folder.
The method you use to uninstall MATLAB Runtime from your computer varies depending on the type of computer.
Start the uninstaller.
From the Windows Start menu, search for the Add or Remove Programs control panel, and double-click MATLAB Runtime in the list.
You can also start the MATLAB Runtime uninstaller from the mcr_root
\uninstall\bin\
folder,
where arch
mcr_root
is your MATLAB Runtime installation
folder and arch
is an architecture-specific
folder, such as win64
.
Select the MATLAB Runtime from the list of products in the Uninstall Products dialog box.
Click Next.
Click Finish.
Exit the application.
Enter this command at the Linux prompt:
rm -rf mcr_root
where mcr_root
represents the name
of your top-level MATLAB installation folder.
Exit the application.
Navigate to your MATLAB Runtime installation folder. For example, the installation folder
might be named MATLAB_Compiler_Runtime.app
in your
Applications folder.
Drag your MATLAB Runtime installation folder to the trash, and then select Empty Trash from the Finder menu.