Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install Matlab MCR as part of the C# Installer Wizard

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

Now I want to create an installer for my C# program. I have came across Visual Studio 2015 Installer Projects which provides some tools to create program setup wizard. The problem is, I don't know how to include download and setup of MCR package as a step in installation process to ensure the user has all the required prerequisites in order for program to run.

like image 761
Ilya Cherevkov Avatar asked Feb 08 '16 12:02

Ilya Cherevkov


People also ask

Is it necessary to install MATLAB in C drive?

NOTE: MATLAB never requires that it be installed on the C: drive. If you have a D: drive and a C: drive on the machine, it is possible to install on the D: drive without issues.

What is MCR MATLAB?

The MATLAB Compiler Runtime (MCR) enables you to run applications compiled within MATLAB using MATLAB Compiler. MCR does not require a MATLAB license and can be used to run the MATLAB compiled program on computers which do not have MATLAB installed.

Do I need to install MATLAB runtime?

Run compiled MATLAB applications or components without installing MATLAB. The MATLAB Runtime is a standalone set of shared libraries that enables the execution of compiled MATLAB, Simulink applications, or components.


1 Answers

Well this is not really an answer, but comment area in question was too short ...

I don't know much about VS2015 Installer as I personnally use innosetup. Anyway to check if runtime is installed on target machine you can look if following key exists in the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\MathWorks\MATLAB Runtime\9.0   

See my posts here and here for further details.

NB1: Note that installer for Matlab runtime is very large (about 1 GB). I would not package it with application to deploy, but just warn the user to install it separately.

NB2: I think Mathworks is packaging C:\Program Files\MATLAB\R2015b\toolbox\compiler\deploy\win64\InstallAgent.zip (~66MB) rather than MCRInstall.exe (~1GB) when deploying standalone installer with deploytool for downloading the runtime during install but I don't know how it works.

like image 77
CitizenInsane Avatar answered Oct 23 '22 16:10

CitizenInsane