How to run a .exe file in other computers without Matlab?

23 vues (au cours des 30 derniers jours)
Hamlet López
Hamlet López le 24 Juin 2022
Modifié(e) : Image Analyst le 25 Juin 2022
Same old question, but what I want to know is if there is a way to include the necessary files in the same .exe so any computer (even if not having matlab or software needed) can run the program.
Maybe automatically putting necessary files temporary as the program is used and then remove them?. Otherwise I'm getting this error.

Réponses (2)

Image Analyst
Image Analyst le 24 Juin 2022
I don't think so because the library is so huge. It's up to 3.6 GB now. I don't think a 3.6 GB executable would be good. So they just need to install the MCR once, and then you can deploy your app over and over again with new features without them having to install the MCR all the time (which can take a long time).
  5 commentaires
Image Analyst
Image Analyst le 24 Juin 2022
Modifié(e) : Image Analyst le 25 Juin 2022
I understand what you're saying. But it's like saying why does Microsoft Office need to be 4 GB when I'm only writing a 5 line text file? Keep in mind that your program is not 3.6 GB, nor will your installer be if you include it in the installer (because, like I said, I think it only sticks in a small stub downloader into the installer).
Let's say that I installed a stripped-down, bare bones library and I used only base MATLAB functions. OK, fine. But now let's say that I changed by code to include a function from the Image Processing Toolbox. Now the library does not have the function the end-user will need. So they'll have to download another library that has the proper function in it. Maybe it would include only the needed Toolbox function, not ALL of the possible Toolbox functions. So now another, unique version of the runtime library needs to be created and installed. That's an extra hassle for the end user. Maybe it would have been better to just include everything -- all toolboxes that the developer/compiler person had. Then the new versions could be deployed without updating the MCR at all.
If you want, you can call the Mathworks and ask them. There is a special option to get the "Deployment Products" tech support. The compiler is very expensive so might as well get some use out of the tech support you paid for.
Walter Roberson
Walter Roberson le 24 Juin 2022
If all you need is ocr(), then you might be interested in https://www.mathworks.com/discovery/matlab-opencv.html which provides an interface to OpenCV; see https://nanonets.com/blog/ocr-with-tesseract/ for a tutorial (Python based). That is, the idea would be to use MATLAB Compiler to generate code that called into OpenCV .
However... if you did that, you would probably have no support for graphics, other than possibly support for reading JPEG files ( specifically JPEG, not any other image type.)

Connectez-vous pour commenter.


Walter Roberson
Walter Roberson le 24 Juin 2022
If you are using the Matlab Compiler App there is an option in the GUI in the top right as to whether to build with or without including the MCR, but it will still be an installer that you would create that will wrap these together.
  2 commentaires
Hamlet López
Hamlet López le 24 Juin 2022
Modifié(e) : Hamlet López le 24 Juin 2022
"If you are using the Matlab Compiler App there is an option in the GUI in the top right as to whether to build with or without including the MCR"
I know but that doesnt solve the issue, still additional files have to be installed.
Image Analyst
Image Analyst le 24 Juin 2022
If you do that, I think it means using deploytool and it can build in the MCR installer into your installer that you deploy, along with your app's .exe and any other files you told it to include with the "-a" option. I could be wrong but I don't think it includes the whole GB+ installer -- I think it just installs a stub that checks if the correct version of MCR is already installed, and if not, then downloads the whole GB+ installer from the Mathworks web site. The stub is much smaller. But it still means that there will be over a GB of data that needs to be delivered to your end user. And the installer for your app will be many MB bigger because the MCR-checker stub will need to be attached to it.
What I prefer is to have the installers for MCR and for my app be separate. That way the MCR only needs to be delivered and installed once and I don't have this extra bits for the MCR-checker stub always there when I don't even need it for subsequent versions made with the same release of MATLAB.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Produits


Version

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by