some issues with the matlab runtime
조회 수: 53 (최근 30일)
I have an app that runs smoothly when run through the app designer or compiled to a matlab app. I am now trying to turn it into a standalone desktop app, and a few issues and questions came up.
- I have a runtime installer that was downloaded two months ago. howver matlab cannot find it, neither automatically in the aplication compiler nor when I type "mcrinstaller". I tried to give the location of the zip file but got the message "The file is not a valid runtime installer for this version of matlab". both the installer and my matlab are 2020b. do I have to download the installer every time I want to package my app?
- The compiled app doesn't work. i tried to ask about it here but didn't get an answer. I now suspect it has something to do with path clashes between matlab and matlab runtime. in the page about matlab runtime under "Install MATLAB and MATLAB Runtime on Same Machine" they wrote "If you install MATLAB Runtime on a machine that already has MATLAB on it, you must adjust the system library path according to your needs". what does this mean? is the system path the matlab path? what does "according to your needs" mean?
- following 2- will all users of my app who have matlab on their computer have to adjust their paths as well?
thanks in advance to anyone brave enough to read this long question
Image Analyst 2021년 9월 13일
You don't give the location of the zip file. You download and install the MCR and you should have a folder (if using Windows) like C:\Program Files\MATLAB\runtime\r2020b. What folders do you have under C:\Program Files\MATLAB on your computer where it does not run?
What is the name of your program and what folder did you install in to?
I use Gammadyne Centurion Setup as my installation package builder. It's far, far superior to MATLAB's deploytool. No contest.
You do not have to download the installer every time you want to run your program or change it. You just need to do it once and it should continue to work. You'll only have to download and install a new release if you compiled your program in the new release.
You do not need to install the runtime library on your development computer. I don't have it installed and I can install and run the deployable standalone program just fine on my computer.
End users will have to install the MCR for the same release you compiled in. The installation process should adjust any paths automatically - they don't need to do anything manually. On rare occasions I've seen them need to reboot but usually they don't.
Don't double click on the icon if you have trouble because the console window will vanish. Get a console window and change directory there and then type the name of your program. Any error messages should remain as long as you compiled with the -m option instead of the -e option of mcc.
See the FAQ: