Lightroom isn’t an easy install with munki. There are some tricks you have to keep in mind.
- Detect if Lightroom is already installed in installs section
- Write the license file as part of postinstall_script
- Write default settings as part of postinstall_script
- 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\ 5.app/Contents/MacOS/Adobe\ Photoshop\ Lightroom\ 5
Which gives you this output that you can copy into the munki plist file:
<key>installs</key>
<array>
<dict>
<key>md5checksum</key>
<string>6ecaf256ee9ebc91cab0254a1c73b787</string>
<key>path</key>
<string>/Applications/Adobe Photoshop Lightroom 5.app/Contents/MacOS/Adobe Photoshop Lightroom 5</string>
<key>type</key>
<string>file</string>
</dict>
</array>
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.
#!/bin/bash
mkdir -p /Library/Application\ Support/Adobe/Lightroom
defaults write /Library/Application\ Support/Adobe/Lightroom/Lightroom\ 5.0\ Registration"<dict>
<key>serial_number</key>
<string>your serial number goes here</string>
<key>uuid</key>
<string>your UUID goes here</string>
</dict>"
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.
#!/bin/bash
#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\ 5.app