compiler.runtime.customInstaller fails to reduce mcr installer size
127 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Qianqian Fang
am 28 Okt. 2024 um 21:46
Kommentiert: Qianqian Fang
am 30 Okt. 2024 um 20:09
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 Kommentare
Sumukh
am 29 Okt. 2024 um 6:43
Can you please provide the "myapp.m" file to reproduce the issue and try to resolve it on my PC?
Akzeptierte Antwort
Sumukh
am 30 Okt. 2024 um 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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!