compiler.runtime.customInstaller fails to reduce mcr installer size
조회 수: 128 (최근 30일)
이전 댓글 표시
I have a matlab toolbox, with a single-window GUI. I was able to build it with mcc/deploytool to create a standalone 7MB executable. However, I was not happy for the installer size, as the R2016 matlab runtime is 700MB in size, 100x larger than my application.
When I saw a new matlab compiler API compiler.runtime.customInstaller coming with R2024b is cable of creating smaller MCR installer including only needed files, I was very happy and immediately tried it, however, the result was disappointing.
The installer bundled with MCR in R2024b for my app build by deploytool - without using the customInstaller - is 1.2GB in size (another 2x increase in size compared to the already large package generated by R2016). Then, when I called
results = compiler.build.standaloneApplication("myapp.m");
compiler.runtime.customInstaller("myapp_installer", results, 'RuntimeDelivery', 'installer');
however, the generated package has the same 1.2GB in size. I have followed the help page of compiler.runtime.customInstaller
I feel that I am missing something - is this the right way to call compiler.runtime.customInstaller?
the requiredMCRProducts.txt file shows that I only need the following MCR components - is 1.2GB the anticipated package size?
- 'MATLAB Runtime - Core'
- 'MATLAB Runtime - Graphics'
- 'MATLAB Runtime - Non Interactive MATLAB'
- 'MATLAB Runtime - Numerics'
- 'MATLAB Runtime - Image Processing Toolbox Addin'
댓글 수: 2
Sumukh
2024년 10월 29일 6:43
Can you please provide the "myapp.m" file to reproduce the issue and try to resolve it on my PC?
채택된 답변
Sumukh
2024년 10월 30일 5:18
Hi Qianqian,
The command “compiler.runtime.customInstaller” creates an installer that installs the MATLAB Runtime components required by the toolbox, and not the complete MATLAB Runtime. The installer has minimal footprint by default as it installs the MATLAB Runtime components from the MathWorks® website during application installation. This is specified by the “RuntimeDelivery” name-value argument that is set to “web” by default. You can refer to the following documentation to know more about this argument:
The installer includes the MATLAB Runtime components within the installer if the “RuntimeDelivery” option is set to “installer”. This increases the size of the installer. The total size of the MCR components specified in the “requiredMCRProducts.txt” file is close to 1.2GB. This can be verified from the installation dialog box when using the “web” installer to install the Runtime components. The size of the MATLAB Runtime components has significantly increased owing to the addition of features release after release since MATLAB R2016a.
You can set the “RuntimeDelivery” option to “web” to have a much smaller installer size (1.9MB). The installer automatically installs the necessary MATLAB Runtime components for the toolbox from the internet wherever the installer is executed.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 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!