Packaging LightroomCC 5.4 for munki

Lightroom isn’t an easy install with munki. There are some tricks you have to keep in mind.

  1. Detect if Lightroom is already installed in installs section
  2. Write the license file as part of postinstall_script
  3. Write default settings as part of postinstall_script
  4. You need an uninstall_script as it doesn’t have an uninstaller

1. Detect if Lightroom is already installed.

For this munki has the installs section. You can create the necessary entry on a Mac that has Lightroom already installed issuing the makepkginfo command.

user@host: ~/Library/Preferences $ makepkginfo -f /Applications/Adobe\ Photoshop\ Lightroom\\ Photoshop\ Lightroom\ 5

Which gives you this output that you can copy into the munki plist file:

      <string>/Applications/Adobe Photoshop Lightroom Photoshop Lightroom 5</string>

2. Write the license file

The license information is located in:
/Library/Application\ Support/Adobe/Lightroom/Lightroom\ 5.0\ Registration

This is written as part of the post_installscript section.

mkdir -p /Library/Application\ Support/Adobe/Lightroom 

defaults write /Library/Application\ Support/Adobe/Lightroom/Lightroom\ 5.0\ Registration"<dict> 
  <string>your serial number goes here</string> 
  <string>your UUID goes here</string> 

chmod 644 /Library/Application\ Support/Adobe/Lightroom/Lightroom\ 5.0\ Registration.plist 

mv /Library/Application\ Support/Adobe/Lightroom/Lightroom\ 5.0\ Registration.plist /Library/Application\ Support/Adobe/Lightroom/Lightroom\ 5.0\ Registration 

3. Write default settings

The default settings go into: /Library/Preferences/com.adobe.Lightroom5.plist
You have to set the country_region settings according to your country.
Probably it isn’t necessary to write the settings in the Non_localized user template too.

This too is written as part of the post_installscript section.

rm /System/Library/User\ Template/Non_localized/Library/Preferences/com.adobe.Lightroom5.plist

defaults write /System/Library/User\ Template/Non_localized/Library/Preferences/com.adobe.Lightroom5 noAutomaticallyCheckUpdates true

defaults write /System/Library/User\ Template/Non_localized/Library/Preferences/com.adobe.Lightroom5 firstLaunchHasRun30 -bool true

defaults write /System/Library/User\ Template/Non_localized/Library/Preferences/com.adobe.Lightroom5 RegistrationField_CountryRegion -string 191

rm /Library/Preferences/com.adobe.Lightroom5.plist

cp /System/Library/User\ Template/Non_localized/Library/Preferences/com.adobe.Lightroom5.plist /Library/Preferences/

chown root:wheel /Library/Preferences/com.adobe.Lightroom5.plist

chmod 777 /Library/Preferences/com.adobe.Lightroom5.plist

4. You need an uninstall_script as it doesn’t have an uninstaller

This script goes into the uninstall_script section of the munki plist file.

#remove license file
rm -R /Library/Application\ Support/Adobe/Lightroom

#remove default settings
rm /Library/Preferences/com.adobe.Lightroom5.plist
rm /System/Library/User\ Template/Non_localized/Library/Preferences/com.adobe.Lightroom5.plist

#remove Lightroom applikation
rm -R /Applications/Adobe\ Photoshop\ Lightroom\

Leave a Reply

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

You are commenting using your 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