Alternative to the commandline method, you can build a standalone executable with the deploytool
Graphical User Interface. At the MATLAB prompt, enter deploytool
. This launches a dialog box, prompting you to define a project name for this standalone build. Replace the “untitled1.prj” with your preferred project name, such as “myStandalone.prj.” Notice that near the top of the dialog box, there are two tabs: the default New tab and an Open tab to the right. The Open tab is to open existing projects for rebuilding.
When submitting a large number of batch jobs using a standalone generated with this method, some jobs could be aborted with error “Maximum Number of Clients Reached.” A standalone generated manually with
mcc
does not exhibit this anomaly. Note that this error message is not indicative of a MATLAB license issue.
The following images were generated with MATLAB R2013a.
Don’t forget to replace the project name untitled1.prj with your name choice, like myStandalone.prj. Upon pressing OK, the next dialog box appears . . .
Pressing Add main file prompts for the main file name and its location, in our case myStandalone.m in the current directory. The picture above shows Remove main file
because the main file has already been added. The executable will be named, by default, myStandalone
. The Package tab shows what to generate for this specific build. Additional files and folders associated with this project may be entered by pressing the Add files/folders button. Here, the myApp.m
has been added.
By default, the project assumes that you need all available toolboxes. Click the right-most (Actions) icon (followed by Settings, then Toolboxes On Path) if you want to exclude some of them. Excluding unnecessary toolboxes could save compile time and memory storage.
Once all the necessary files and folders needed for the project have been defined, you may proceed to build the executable by clicking on the left-most light blue Build icon (with 2 down arrows) near the top right of the dialog box.