Matlab Compiler standalone program file size issue

4 visualizzazioni (ultimi 30 giorni)
Y Li
Y Li il 11 Mar 2014
Modificato: Walter Roberson il 28 Apr 2016
I have a program compiled to standalone exe file and the size is about 15M. After I removed the DSP system toolbox, which I didn't use in my code, the exe file size reduced to less than 1M. Both programs run fine with no issue. Looks like the compiler is including unnecessary files depending on how many toolboxes are installed. My question is how can I tell the compiler to exclude certain toolbox?

Risposte (1)

Roja
Roja il 24 Giu 2014
You can use –p flag in conjunction with –N flag to clear the path of all folders except the core folders and then to add specific folders under matlabroot\toolbox to the compilation MATLAB path. For more details you can refer to the following link:
  2 Commenti
Ellen Marie Nordgård-Hansen
From the question or your site "How can I reduce the size or footprint of a stand-alone application I bundle for deployment using MATLAB Compiler 3.0.1 (R13SP2) or earlier?" it seems very difficult to avoid including the whole Matlab runtime library in a stand-alone application. From the answer here, it now seems pretty easy. However, I do not currently have the Matlab Compiler license, so I cannot access the documentation. Do I need to know the exact files to include, or does the Compiler parse my code to see what files are required? I do not want a huge program, and I do not want the user to have problems with missing files.
Marie-Helene
Marie-Helene il 28 Apr 2016
Modificato: Walter Roberson il 28 Apr 2016
If the compiler parse the code, it does not do it efficiently... Here are the result of the exact same functions compiled with different version on my computer
R2009a : size = 475 Ko (run properly)
R2016a : size = 3835 Ko (run properly)
R2016a with -N option, : size = 1020 Ko (does not run properly... database toolbox seems missing... more than twice the size without any improvement :( )
Since 2010, I tried many releases... I'm still using R2009a every day for compiling standalone application. However, I'm using R2014b for 64bits COM component. I will surely not used R2016a... I'm still waiting for a release with a better compiler for me.

Accedi per commentare.

Categorie

Scopri di più su MATLAB Compiler in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by