Exclude unnecessary toolboxes in 2015

4 views (last 30 days)
There was an option in previous versions (2013) by which I could exclude unused toolboxes from standalone EXE file to reduce its size. Why is not there such option in 2014 and 2015 versions?
  4 Comments
Seyedfarid Ghahari
Seyedfarid Ghahari on 22 Dec 2015
Thank you for your comments. I do not complain about the size of MCR installer. My question is about size of my EXE file created by Matlab Application compiler. In 2013 version, it was possible to deselect those toolboxes which are not used by my m.file to reduce size of produced EXE file. I jumped from 2013 to 2015 version last day, and now there is not such option. I suppose Mathworks has redesigned Application Compiler to automatically detect needed toolboxes.

Sign in to comment.

Answers (1)

Michelle Hirsch
Michelle Hirsch on 22 Dec 2015
If I understand this correctly, there are really two different pieces of the standalone executable:
  • The MATLAB Runtime. This is the set of standard libraries that all applications run against.
  • The CTF. This is the collection of files specific to your application.
There isn't really a sense of including or excluding whole toolboxes from your deployed application. When your application requires functionality from a toolbox, the CTF includes just the files from the toolbox that are required for your application. The routine that identifies which functions are needed sometimes overshoots and includes more than it is needed, which could accidentally bring in some files from a toolbox you aren't using (though it shouldn't ever be the whole toolbox). This routine changed in R2014a, when depfun was replaced with matlab.codetools.requiredFilesAndProducts. My guess is that this led to the change in behavior that you are seeing - maybe the algorithm is better and doesn't need this extra coaching? I'm not sure - just guessing.
Additionally, R2015a introduced a change to the MATLAB Runtime. Instead of always including all libraries, the Compiler now picks from a few different versions based on what is used by your application. According to the release notes :
"MATLAB Compiler analyzes your MATLAB code for use of graphics or a GPU and defines and calculates optimized MATLAB Runtime. A MATLAB Runtime specific for each application is available for download from the web or included in the package."
This means the MATLAB Runtime will be a fair bit smaller if you don't use GPU support from the Parallel Computing Toolbox. I also think it says that if you don't use any graphics, you will get an even smaller runtime.
  1 Comment
Seyedfarid Ghahari
Seyedfarid Ghahari on 22 Dec 2015
Thank you so much Michelle for your very detailed answer. I think you are right and new design (after 2013 version) does not need extra coaching which I had to take care of in 2013 version.

Sign in to comment.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!