Description
Nice to see mpm
now supports macOS! However, I see some unexpected behavior regarding destination
(at least for me after reading the doc and knowing the existing non-mpm installer on macOS).
First the defaults. When I run mpm
with just the minimum required arguments, I see:
❯ ./mpm install --release R2023b --products MATLAB
Installing with the following parameters:
--doc=false
--release=R2023b
--products=MATLAB
---------------------------------------------
The following MathWorks Products are licensed under the The MathWorks, Inc. Software License
Agreement, available in the installation of the MathWorks Product or in the virtual machine image.
MATLAB
Products will be installed to: /Applications/MATLAB/R2023b
Starting install...
And I end up with a matlabroot in /Applications/MATLAB/R2023b
but no .app folder:

This does not seem to be the expected default behavior for installing MATLAB on macOS. Is this intended?
The docs say that the default --destination
on macOS should be /Applications
. But if I specify that for mpm
, I get something completely different:
❯ ./mpm install --release R2023b --products MATLAB --destination /Applications
Installing with the following parameters:
--destination=/Applications.app
--doc=false
--release=R2023b
--products=MATLAB
---------------------------------------------
Error: Unable to create install destination. Check folder permissions.
It's good that I don't have the required permissions for that, because that's for sure not what I intended...
Ok, so I guess the path I specify needs to be the target folder and .app will be appended, I can then specify the following, for what I expected for the default destination:
❯ ./mpm install --release R2023b --products MATLAB --destination /Applications/MATLAB_R2023b
Installing with the following parameters:
--destination=/Applications/MATLAB_R2023b.app
--doc=false
--release=R2023b
--products=MATLAB
---------------------------------------------
The following MathWorks Products are licensed under the The MathWorks, Inc. Software License
Agreement, available in the installation of the MathWorks Product or in the virtual machine image.
MATLAB
Products will be installed to: /Applications/MATLAB_R2023b.app
Starting install...
Finished install
Completing setup...
Installation complete
Indeed this gives the expected installation:

Now I'm curious, can I somehow provide the input for destination
that results in the same behavior as not providing a destination? I couldn't, even when providing a path with a trailing slash, it then still changes the folder to contain .app:
❯ ./mpm install --release R2023b --products MATLAB --destination /Applications/MATLAB/R2023b/
Installing with the following parameters:
--destination=/Applications/MATLAB/R2023b.app
--doc=false
--release=R2023b
--products=MATLAB
---------------------------------------------
The following MathWorks Products are licensed under the The MathWorks, Inc. Software License
Agreement, available in the installation of the MathWorks Product or in the virtual machine image.
MATLAB
Products will be installed to: /Applications/MATLAB/R2023b.app
AFAIK the MATLAB installer for macOS asks you for the folder in which the installer will create the MATLAB_.app folder for you, i.e. /Applications
for the default location. So while I always thought that was a little strange (and different compared to Windows and Linux installers), now that same logic is not applied for mpm
for macOS, not for the default and not for how you can specify it manually. I'm not sure what I would want: consistent with macOS non-mpm installer or consistent with how mpm
works for Linux. From my experiments above at least, it seems the default is quite strange and not consistent with the documentation.