Home > Mac administration, MATLAB > Repackaging Matlab 2011b with Composer

Repackaging Matlab 2011b with Composer

Since starting to use Casper at my workplace, I’ve wanted to be able to provide a unlicensed Matlab installer via Self Service. The reason I wanted it unlicensed is because, while we have a Matlab network license server, it has a very limited license pool. Instead, most of our labs purchase standalone licenses and register them to the person using it.

However, a showstopper issue I’ve run into has been that Matlab needs to have a license entered as part of the installation process. After some trial and error, I was able to figure out a way to use Jamf Software’s Composer build a Self Service-deployable installer that uses our network license and also an unlicensed installer. See below the jump for the details.

Building the Matlab network license installer with Composer

1. Find and launch the installer files for the version you require (in this case, I’m building a Matlab 2011b installer.)

2. Copy the installer directory to your desktop before running the installer.

3. Launch Jamf Software’s Composer and have it take a snapshot for packaging.

Screen Shot 2011-12-10 at 12.40.37 PM

Screen Shot 2011-12-10 at 12.40.59 PM

Screen Shot 2011-12-10 at 12.54.21 PM

Screen Shot 2011-12-10 at 12.55.04 PM

4. Launch the installer and use the Install without using the internet option.

Screen Shot 2011-12-10 at 12.56.08 PM

5. Accept the End User License.

Screen Shot 2011-12-10 at 12.56.17 PM

6. Enter the File Installation Key (FIK) for the version you wish to install (some information has been redacted.)

Screen Shot 2011-12-10 at 12.56.33 PM_redacted

7. Specify the installation type (I chose Typical)

Screen Shot 2011-12-10 at 12.56.39 PM

8. Specify the installation folder path (I chose /Applications.)

Screen Shot 2011-12-10 at 12.56.43 PM

9. Download and save the license.dat file for the Matlab network license to your desktop.

10. Direct the installer to this file’s location when requested.

Screen Shot 2011-12-10 at 12.57.01 PM

11. Proceed with the installation.

Screen Shot 2011-12-10 at 12.57.50 PM

When completed, Matlab should be set to run using the license on the server.

12. Open Terminal and run the following commands:

sudo chown -R root:admin /path/to/MATLAB_RXXXXX.app

Screen Shot 2011-12-10 at 1.01.40 PM

sudo chmod -R ug+rwx /path/to/MATLAB_RXXXXX.app

Screen Shot 2011-12-10 at 1.02.46 PM

(MATLAB_RXXXXX is your Matlab application. Fill in as appropriate.)

This will fix the permissions of the Matlab application, from being owned by the user account that installed it to now being owned by the root user and admin group. This allows multiple accounts on the box to use Matlab successfully.

13. Go back to Composer and have it finish the snapshot process.

Screen Shot 2011-12-10 at 1.03.13 PM

14. When the snapshot process finishes, delete the Users directory. The only directory that should be listed is Applications, with MATLAB_RXXXXX.app inside

15. Composer will then give the option of saving the installer package as a Casper-usable .dmg installer or as a standard Apple .pkg installer.

Screen Shot 2011-12-10 at 1.10.10 PM

Screen Shot 2011-12-10 at 1.17.40 PM

Removing the network license to force Matlab to prompt for activation

1. Log in with an account that has administrator privileges.

2. Open Terminal and run the following command to delete the Matlab network license file:

sudo rm /path/to/MATLAB_RXXXXX.app/licenses/*.lic

Screen Shot 2011-12-10 at 7.30.17 PM

(MATLAB_RXXXXX is your MatLab version)

3. Close out of Terminal.

4. Open Matlab. You should be prompted to activate a new license.

Screen Shot 2011-12-10 at 6.40.31 PM

5. Quit out of Matlab.

At this point, you should be able to repackage the Matlab application again to build an unlicensed installer that can be deployed via Casper or your other deployment tools.

Categories: Mac administration, MATLAB
  1. Mark
    May 27, 2016 at 4:27 pm

    Thank you for these extremely useful instructions! Are they still relevant for R2015A or R2015B?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: