- (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?
조회 수: 15 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2024년 7월 26일
편집: MathWorks Support Team
2024년 7월 26일
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일
편집: MathWorks Support Team
2024년 7월 26일
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!