Install Matlab MCR as part of the C # setup wizard

I wrote a HelloApp program with Matlab and packaged it as a .NET assembly using deploytool , as described here . As a result, I have a helloapp.dll library, which I included in my Visual Studio 2015 as a link, so I can run Matlab methods directly from C #. To run the code without Matlab installed, the end user must install Matlab Runtime (MCR) at a minimum.

Now I want to create an installer for my C # program. I came across Visual Studio 2015 Installer Projects , which provides some tools for creating a program setup wizard. The problem is that I don’t know how to enable downloading and configuring the MCR package as a step in the installation process to ensure that the user has all the necessary prerequisites for running the program.

+5
source share
1 answer

Well, this is not quite the answer, but the comment area in question was too short ...

I know little about the VS2015 installer since I personally use InnoSetup . In any case, to check if the runtime is installed on the target machine, you can see if the following key exists in the registry:

 HKEY_LOCAL_MACHINE\SOFTWARE\MathWorks\MATLAB Runtime\9.0 

For more details, see my posts here and here .

NB1: Please note that the installer for Matlab runtime is very large (about 1 GB). I would not pack it with the deployment application, but simply warned the user about installing it separately.

NB2: I think Mathworks packs C:\Program Files\MATLAB\R2015b\toolbox\compiler\deploy\win64\InstallAgent.zip (~ 66 MB) instead of MCRInstall.exe (~ 1 GB) when deploying a standalone installer with deploytool for loading the runtime during installation, but I do not know how this works.

+2
source

Source: https://habr.com/ru/post/1242536/


All Articles