mpm on macOS unexpected logic for destination
Closed this issue · 6 comments
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.
Thanks a lot for this report @versionbayjc, i ran into the exact same issue
Thank you for reporting this issue @versionbayjc !
The concerned teams have been notified of the issue, and are working towards fixing this for an upcoming release of MPM.
In the mean time, the documentation has been updated in bfdcc47 with the current defaults.
Hi @versionbayjc ,
Thank you for reporting this issue and explaining how MPM's behavior was inconsistent with the MathWorks Product Installer. The latest MPM release has fixed this. Now, the default installation folder on macOS when using MPM is /Applications/MATLAB/.app, just like the MathWorks Product Installer.
I am closing this issue for now, but please feel free to reopen it if you encounter any further issues. Thanks!
That is great! Thanks, please also update the documentation regarding this in MPM.md
, since that was actually updated to describe the previous behavior, which is now no longer correct:
**macOS:** `/Applications/MATLAB/<release>`
should become:
**macOS:** `/Applications/MATLAB_<release>.app`
@mw-skardile should I create a new issue for the fact that the documentation is outdated after the latest update(s)? I thought a message in this closed issue would be ok, so shortly after the closure
I see this is no longer documented in GitHub in MPM.md, but now on the MathWorks Install documentation, unfortunately the old (now wrong) default location is now published there:
https://www.mathworks.com/help/install/ug/mpminstall.html
The default location table shows for macOS:
/Applications/MATLAB/<release>