Changing the location of unpacking for deployed application
조회 수: 6 (최근 30일)
이전 댓글 표시
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)?
댓글 수: 0
답변 (1개)
Harsha Medikonda
2015년 8월 21일
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
Nasser Hosseini
2019년 4월 2일
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?
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!