Ticket #236 (closed Task: fixed)
MatlabDependency.Initialize should fix up PATH environment variable
|Reported by:||jjr8||Owned by:||jjr8|
|Component:||Core - MATLAB Interop||Version:|
Description (last modified by jjr8) (diff)
Currently the MATLAB-interop code in MGET requires the user to install either MATLAB 2007b or the MATLAB Component Runtime (MCR) 7.7, a free redistributable from MATLAB 2007b. It turns out that the MCR installer appends one of its directories to the PATH environment variable:
C:\Program Files\MATLAB\MATLAB Component Runtime\v77\runtime\win32
But this is not sufficient. When the MGET tool tries to execute, a dependent DLL, mclmcr.dll, cannot be loaded. That DLL is in this directory:
C:\Program Files\MATLAB\MATLAB Component Runtime\v77\bin\win32
Adding this directory to the path solves the problem. The MGET MatlabDependency.Initialize method should do this automatically, to work around the bug in the MCR installer.
In addition, the MGET method should move the MCR paths to the front of the PATH variable, so that if a version of MATLAB was installed prior to installing the MCR, the MCR DLLs will be used rather than the MATLAB DLLs.