How can I create an Application Installer for my MATLAB Compiler standalone application from the command line?
26 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 31 de Ag. de 2024
Editada: MathWorks Support Team
el 1 de Sept. de 2024
How can I create an application installer for my MATLAB Compiler standalone application from the command line?
I checked the options for the 'mcc' command but couldn't find an equivalent to the "Runtime downloaded from web" or "Runtime included in package" options available in application deployment GUIs like the Application Compiler.
Respuesta aceptada
MathWorks Support Team
el 1 de Sept. de 2024
Editada: MathWorks Support Team
el 1 de Sept. de 2024
Since MATLAB R2020a, you can create an application installer for the files generated by MATLAB Compiler with the 'compiler.package.installer' function:
There are two approaches to using 'compiler.package.installer':
OPTION 1: Use compiler.package.installer with compiler.build functions (R2020b+)
The recommended approach is to use 'compiler.package.installer' together with the new 'compiler.build' functions (available in R2020b and later). The full workflow is documented on the following page:
To include the MATLAB Runtime in the package, run the 'compiler.package.installer' command with the 'RuntimeDelivery' name-value pair set to 'installer'. See an example as follows:
>> buildResults = compiler.build.standaloneApplication(appFile);
>> compiler.package.installer(buildResults, 'RuntimeDelivery', 'installer');
To download MATLAB Runtime from the web, run the 'compiler.package.installer' command with the 'RuntimeDelivery' name-value pair set to 'web'. See an example as follows:
>> buildResults = compiler.build.standaloneApplication(appFile);
>> compiler.package.installer(buildResults, 'RuntimeDelivery', 'web');
.
OPTION 2: Use compiler.package.installer with mcc (R2020a+)
Creating an application installer for files generated by the 'mcc' command requires a different syntax. Instead of passing a buildResults object, you need to point 'compiler.package.installer' to the locations of generated files. Refer to the examples in the 'compiler.package.installer' documentation for guidance.
When migrating your existing application deployment project (.prj), if you still have access to the "PackagingLog.html" file, you can see the "mcc" command used by the deployment app to create the application at the top of that file.
In R2019b and prior, there is a 'deploytool' command-line tool in addition to the application deployment GUIs. Use the "-package" option to create an installer for an existing application deployment project (.prj) without the need to open the GUI:
deploytool -package myproject.prj
For more information, access the 'deploytool' documentation from MATLAB R2019b and prior:
>> doc deploytool
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with MATLAB Compiler en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!