- (If you don't already have the ZIP-file for the RE installer) Execute "compiler.runtime.download" in the MATLAB Command Window.
- After the download completes, MATLAB will print out the path where it was installed. For example: C:\Users\<username>\AppData\Local\Temp\<username>\MCRInstaller24.1\MATLAB_Runtime_R2024a_win64.zip
- Move the file to a permanent directory that MATLAB will be able to access. For example: C:\Program Files\MATLAB\MATLAB Runtime\MATLAB_Runtime_R2024a_win64.zip
- In MATLAB, click the "Preferences" button in the "Environment" section of the "HOME" toolstrip.
- Select the "MATLAB Compiler" preferences, and then enter the path from Step 3 in the text field.
How can I package the MATLAB Runtime Installer with my standalone application from a specific directory?
5 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2024-7-26,0:00
编辑: MathWorks Support Team
about 18 hours 前
I am using the Application Compiler to build standalone desktop applications from my MATLAB code with MATLAB Compiler. I am using the "Runtime included in package" option to package the MATLAB Runtime with my application installer.
I am using "compiler.runtime.download" to download the ZIP-file for the MATLAB Runtime installer. However, the file is downloaded to a temporary directory. For example, the MATLAB Runtime for R2024a on Windows is downloaded to:
C:\Users\<username>\AppData\Local\Temp\<username>\MCRInstaller24.1\MATLAB_Runtime_R2024a_Update_4_win64.zip
After a few days, the temporary directory is cleared by my operating system, and I need to redownload it in order to package the Runtime with my application installer. How can I configure MATLAB to store the Runtime installer in a non-temporary directory to package with my standalone applications?
采纳的回答
MathWorks Support Team
2024-7-26,0:00
编辑:MathWorks Support Team
about 18 hours 前
Executing "compiler.runtime.download" will always download the Runtime installer ZIP-file to a temporary directory. After downloading, the file can be moved to a different location, and you can update the MATLAB preferences to point to the new location.
Use the following procedure to store the Runtime installer in a custom directory and configure MATLAB to use that location for the "Runtime included in package" option:
Now, selecting the "Runtime included in package" option in the Application Compiler will use the Runtime installer located at the path entered in Step 5.
0 个评论
更多回答(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!