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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With