Exclude unnecessary toolboxes in 2015
이전 댓글 표시
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
Image Analyst
2015년 12월 21일
I suppose you'd have to ask the people at the Mathworks (not us) who decide how to build/setup their installation program.
Image Analyst
2015년 12월 21일
By the way, I don't remember this ever. When building standalone executables, I've always had to have the target user install the full MCRInstaller.exe. I don't ever remember getting a smaller sub set of that for them to install that was based on which functions I actually called in my code. It's always been the full MCRInstaller that we've had to install.
Seyedfarid Ghahari
2015년 12월 22일
답변 (1개)
Michelle Hirsch
2015년 12월 22일
2 개 추천
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.
카테고리
도움말 센터 및 File 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!