How to run a .exe file in other computers without Matlab?
49 次查看(过去 30 天)
显示 更早的评论
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1044025/image.png)
0 个评论
回答(2 个)
Image Analyst
2022-6-24
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 个评论
Image Analyst
2022-6-24
编辑:Image Analyst
2022-6-25
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
2022-6-24
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.)
Walter Roberson
2022-6-24
https://www.mathworks.com/products/compiler/matlab-runtime.html has links to download mcr 8.5 (R2015a)
In https://www.mathworks.com/matlabcentral/answers/440034-how-can-i-embed-mcr-in-an-executable-file#comment_661077 Adam wrote,
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 个评论
Image Analyst
2022-6-24
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!