Changing the location of unpacking for deployed application

7 Ansichten (letzte 30 Tage)
Vinayak Phalke
Vinayak Phalke am 19 Aug. 2015
Kommentiert: Nasser Hosseini am 2 Apr. 2019
Typically, the deployed application is unpacked in a directory named "application-name"_mcr in the directory where the deployed application .exe resides (at least on Windows platform, which is my use case). Hence the requirement for write permission to that directory (see MATLAB compiler documentation). But I would like to change it to somewhere else (like system tmp).
Googling for that I came across the option to use MCR_CACHE_ROOT environment variable (on undocumented MATLAB site) to specify the unpacking directory. But in MATLAB 2014a (which is the revision I use), that option seems to have been deprecated. Earlier versions of MATLAB used to document that environment variable, but in the newer versions, that information is gone from the documentation too.
So is there a way to change the unpacking location for the packaged standalone applications in the newer MATLAB (version 2014a or newer)?

Antworten (1)

Harsha Medikonda
Harsha Medikonda am 21 Aug. 2015
I understand that you wish to change the default directory where the CTF archive is extracted.
"MCR_CACHE_ROOT" is not deprecated in MATLAB R2014a or above. Refer to the following documentation link
You can use "setenv" function in MATLAB to set the "MCR_CACHE_ROOT" to the new location. Also, make sure that the environment variable is set using the "getenv" function. Refer to the following documentation links for its usage.
  1 Kommentar
Nasser Hosseini
Nasser Hosseini am 2 Apr. 2019
I'm using MATLAB 2014b in Windows 10 envirornment. The defult directory where the CTF archive is extracted is not changed, whatever method I use, i.e. using setenv or setting the environment variable in Windows. The CTF archive is still extracted in the same directory where the .exe and .ctf files are!
Do you have any explanation? Any other suggestions for speeding up the startup of the stand-alone MATLAB applications?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Application Deployment finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by