Packaging Unity for Munki

I recently needed to package Unity for the Munki server we have in place at our college.

Unity is one of those installers that looks like a regular installer, but actually downloads a bunch of additional files depending on what the user selects during the install workflow.
Luckily, it’s fairly easy to use JAMF’s Composer software to create a ‘Normal Snapshot’ that tracks changes before and after running the installation.
Be sure to tweak the files Composer includes; the only files we actually need are inside the ‘/Applications/Unity’ folder.

However, on first run of Unity, the program does also try and create a folder where it can store a license file. If you’d just packaged Unity through Composer and done nothing else, you’d have missed this. (I know this because I made this mistake).

An error will be thrown up stating that Unity needs to spawn a process with admin rights to create this folder. Of course, if you have end users without admin permissions, this will then mean a call to the helpdesk for someone from IT to enter an admin password. This is a bad thing.

The fix? Simply add an empty folder with the path ‘/Library/Application Support/Unity’ that has read and write permissions for all users, into the source of the package snapshot in Composer and then click Build PKG.
Your file and folder structure should look much the same as below:

Screen Shot 2017-04-27 at 14.16.52.png

Problem solved!