Azzera filtri
Azzera filtri

How can I package the MATLAB Runtime Installer with my standalone application from a specific directory?

5 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 26 Lug 2024 alle 0:00
Modificato: MathWorks Support Team circa 18 ore fa
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:
  1. (If you don't already have the ZIP-file for the RE installer) Execute "compiler.runtime.download" in the MATLAB Command Window.
  2. 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
  3. 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
  4. In MATLAB, click the "Preferences" button in the "Environment" section of the "HOME" toolstrip.
  5. Select the "MATLAB Compiler" preferences, and then enter the path from Step 3 in the text field.
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.

Più risposte (0)

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Prodotti


Release

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by