How can I create an Application Installer for my MATLAB Compiler standalone application from the command line?
28 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2024 年 8 月 31 日
編集済み: MathWorks Support Team
2024 年 9 月 1 日
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.
採用された回答
MathWorks Support Team
2024 年 9 月 1 日
編集済み: MathWorks Support Team
2024 年 9 月 1 日
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB Compiler についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!