Exclude unnecessary toolboxes in 2015

2 次查看(过去 30 天)
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 个评论
Seyedfarid Ghahari
Seyedfarid Ghahari 2015-12-22
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.

请先登录,再进行评论。

回答(1 个)

Michelle Hirsch
Michelle Hirsch 2015-12-22
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 个评论
Seyedfarid Ghahari
Seyedfarid Ghahari 2015-12-22
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by