Posted on 12-10-2011 05:09 PM
After working on the problem a while, I've found a way to repackage Matlab 2011b with Composer for my worksite's needs. I've documented the process I'm using and posted it here:
http://derflounder.wordpress.com/2011/12/11/repackaging-matlab-2011b-with-composer/
Posted on 12-12-2011 06:15 AM
Nice doc. This is pretty much the same process I use.
+1
Posted on 07-26-2016 01:22 AM
Is this still relevant for 2016A?
Posted on 07-26-2016 05:13 AM
@ianmb, this process still works for Matlab 2016A.
Posted on 05-22-2017 06:47 AM
I know this is an older thread (began in 2011 and last response in 2016!) but I thought I'd throw my $0.02 in just in case anyone else came across it.
While I've no doubt this works, especially considering Rich Trouton came up with it, I use Matlab's silent install method.
Now, to get the right files, you need to download the ISOs, not the DMG files from MathWorks. The DMGs only contain the "InstallForMacOSX.app" installer which will not let you install silently.
The ISOs contain the install.sh script and the options file. Configure that for your license key, then dump the entire ISO contents plus the config file in a folder and have it copy down to /tmp (or some other directory) in Composer. Create a simple postinstall to run the installer with the options file and let it go.
Posted on 06-07-2017 05:28 AM
@jrippy How do I find the ISOs? All the links I can find point me to the dmg with the java-based installer that I can't get to work through our proxy.
Posted on 06-08-2017 07:05 AM
@AVmcclint I wasn't the one to actually download the ISOs so I may be off a bit, but go to that same download page where the DMGs are. Just under the DMG links I believe, there was a link that said "Other downloads" or "See More Downloads" or something like that. When my colleague, our license administrator, clicked that, he saw the ISO downloads.
I wish I had the screenshots for you. I will try to get with him and see if we can get screenshots of that area but it was on the page but just in a way that our eyes traveled right over the option the first 5 times we looked at it.
Hope that helps.
Posted on 06-08-2017 07:12 AM
I found out from our MATLAB "administrator" account holder that it is only available under the administrator account access. I was able to get it downloaded and installed and I was reminded of how their software is unlike anything else. UGH.
Posted on 07-19-2018 05:21 AM
Thanks for the details. Does this still work for 2018? What would you change if you were going to push out MatLab to clients that you wanted pointed to a license server?
Posted on 07-19-2018 08:58 AM
For a license server based version the process is near enough identical. To link Matlab to license server(s) it essentially has the file /Applications/Matlab/MATLAB_RXXXXa.app/licenses/network.lic which contains something like:
SERVER SERVER_DNS1 SERVER_ID SERVER_PORT
USE_SERVER
SERVER SERVER_DNS2 SERVER_ID SERVER_PORT
USE_SERVER
Posted on 08-17-2018 08:45 AM
Is the SERVER_ID the same as the MAC of the license server?
Posted on 08-17-2018 09:30 AM
@mark.mahabir Yes, the SERVER_ID is the same as the MAC address of the license server.
Posted on 08-17-2018 09:41 AM
@brwnbn @mark.mahabir As @dsavageED mentioned, the file is just placed in that location.
For our installs though, using the silent install method, I set the licensePath variable in the installer_input.txt config file and point it to our license stub named "license.dat". I'm not sure if it came from MathWorks or created/exported by our license server administrator.
The license.dat file is copied to a temporary location during the package install and verified as available before the silent install script runs.
The installer then goes on to create that network.lic file during setup.
There is plenty of other configuration you can do with the installer_input.txt file as well.
My license.dat stub looks like this:
# BEGIN--------------BEGIN--------------BEGIN
# MathWorks license passcode file.
# LicenseNo: 999999 HostID: MAC999999999
# HostID: MAC99999999A
# HostID: MAC99999999B
#
# R2017a
#
SERVER SERVER1.domain.com MAC999999999 PORT# PRIMARY_IS_MASTER
SERVER SERVER2.domain.com MAC99999999A PORT#
SERVER SERVER3.domain.com MAC99999999B PORT#
USE_SERVER
Posted on 02-19-2019 01:43 PM
@jrippy Thank you for your leads in terms of dumping with the contents of iso to a tmp folder and packaging them there. Can I know what post-install that you use to trigger the installation. I used this command ./install -mode silent -agreeToLicense yes but I guess it does nothing.
Thanks
Posted on 06-13-2019 02:40 AM
I did a similar capture like DerFlounder in the above link but slightly modified. Since dragging the MathLab app into composer doesn't quite work like normal apps. What I did was use the installer and selected the log in to matlab account to down load the rest of the components and grabbed the license.dat file from our lmtools/flexnet server. Once installed and launched to verify it was getting a license from the server, I created a new folder in Applications named MatLab. Placed the app in that. Took a snapshot. Moved the app back out of the new folder back into Applications. Then finalized the post install snapshot and cleared up the rest of the modified folder cruff captured and then just created the PKG.
Launches nicely when the PKG was deployed via JAMF.
Posted on 01-07-2020 02:14 AM
You can use the silent installer for 2019 instead of re-packaging it. You just need to package up the installer app and the license.lic file and put in a hidden location. Then reference that location in your silent installer command.
sudo /path/to/InstallForMacOSX.app/Contents/MacOS/InstallForMacOSX install -mode silent -agreeToLicense yes -fileInstallationKey 123456 -licensePath /path/to/license.lic
Posted on 01-06-2021 03:17 AM
Does anyone have a good repackaging method without a FIK?
I'm comfortable with downloading the installation files and I only have a licence.dat file (which essentially just points to our campus license server).
Posted on 02-03-2021 10:32 PM
I'm really struggling with this. Working on MATLAB2020b and just setting up as needed. Then, dragging the installed App from /Applications into the bottom left of Jamf Composer. Instead of the normal folder structure /Applications with the App MATLAB_R2020b, I see the contents of the App at the Root level i.e. no Applications folder and no MATLAB_R2020b.app inside it
Any thoughts on this?
I'll give @Liam.Donnelly 's method above a try in the meantime.
Posted on 02-04-2021 02:01 AM
Well packaging the installer in /tmp was more successful than the installed App
However there seems to be something wrong with the postinstall command for the package. I tried it from the command line just to see what error I was getting:
sudo /private/tmp/InstallForMacOSX.app/Contents/MacOS/InstallForMacOSX install -mode silent agreeToLicense yes -fileInstallationKey MyFileInstallationKeyHere -licensePath /private/tmp/license.dat Password: BAD KEY VALUE, no '-' prefix: "install" find: installer_9039: No such file or directory find: installer_9039/archives: No such file or directory find: installer_9039/archives: No such file or directory
It doesn't look like that word install is correct. This is the only place I have found this form of the installation so far
Posted on 07-11-2021 07:43 PM
@dlondon Did you get any further with this? I packaged the installer in /tmp but I am getting a different error below
/private/tmp/matlab2021/InstallForMacOSX.app/Contents/MacOS/InstallForMacOSX: line 312: exec: /private/tmp/matlab2021/bin/maci64/install_unix_legacy: cannot execute: No such file or directory
Posted on 07-11-2021 09:08 PM
Hi @Ammar - greetings to another Jamf Admin downunder :)
Yes I did get somewhere. Here's my notes:
This is the method used after trying a lot of other ways which all failed because the App was too big. This way downloads the files and uses an answer file (installer_input.txt) and a license file (license.dat)
1) get the download file from the Mathworks web site for the latest version
https://au.mathworks.com/ Sign in at the top right Download the Matlab Individual Installer for the latest version (2020b in this case)
2) you place the downloaded DMG in some folder such as ~/Downloads/mathworks
You open the DMG and run the executable You enter your info and then choose to download all the files and tell it the location is ~/Downloads/mathworks Many, many hours later you have the files.
3) Move the mathworks folder to /private/tmp
Place a copy of installer_input.txt in /private/tmp Place a copy of license.dat (or whatever you call it) in /private/tmp
4) Drag installer_input.txt into composer from /private/tmp and rename the project to something meaningful like the version of Matlab
With that project hilighted, drag license.dat from /private/tmp into ther right pane of composer to add it Then drag mathworks folder from /private/tmp into the right side tools Add a postinstall script into the project with this:
/private/tmp/mathworks/R2020b/install -inputFile /private/tmp/installer_input.txt
Create package Upload to Jamf Pro using Jamf Admin
My file installer_input.txt looks like this:
##################################################################
##
## Use this file to specify parameters required by the installer at runtime.
##
## Instructions for using this file.
##
## 1. Create a copy of this template file and fill in the required
## information.
##
## 2. Uncomment only those lines that start with a single '#'
## and set the desired values. All allowed values for the
## parameters are defined in the comments section for each
## parameter.
##
## 3. Launch the installer from the command line, using the -inputFile option
## to specify the name of your installer initialization file.
##
## (Windows) setup.exe -inputFile <file_name>
## (Mac/Unix) install -inputFile <file_name>
##
destinationFolder=/Applications
fileInstallationKey=YourFileInstallationKeyHere
agreeToLicense=yes
outputFile=/tmp/mathworks_install.log
mode=silent
licensePath=/tmp/license.dat
#################################################################
And the license.dat file is just your normal license.dat file that points at your license server
The postinstall script for the package looks like this:
#!/bin/sh
## postinstall
pathToScript=$0
pathToPackage=$1
targetLocation=$2
targetVolume=$3
/private/tmp/mathworks/R2020b/install -inputFile /private/tmp/installer_input.txt
Posted on 07-19-2021 04:06 PM
Hi Dlondon,
Greetings! Thank you very much for that detailed response you saved me a lot of hassle! Matlab has now worked. Much appreciated!
Cheers mate!
Posted on 05-04-2022 10:23 PM
Hi Dlondon,
Thanks you for the detailed explanation about packing, Matlab deployment is working as expected.
Regard's
Hemanth
Posted on 05-27-2022 05:25 AM
@dlondon
have followed the instructions you provided getting this error
The install failed. The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. The package is attempting to install content to the system volume
Posted on 05-29-2022 05:43 PM
So what happens if you break it down and do it manually instead of packaging into a pkg file with a post install script? That is, if you run this command:
sudo /private/tmp/mathworks/R2020b/install -inputFile /private/tmp/installer_input.txt
Posted on 06-13-2022 03:30 AM
@dlondon did use this method in the end works a treat.
Posted on 06-21-2022 10:46 AM
Good Evening All.
Has anyone got a workflow there happy to share, to apply security updates to Matlab.
I appear to have some permission issues that I'm sorting out at the moment. It's preventing the updater run.
Be interested to hear your thoughts on this.
Thanks