I came across a new type of installer today.
We use a digital sculpting and painting program by Pixlogic called ZBrush.
ZBrush 4 was released in Apple package format.
ZBrush 4R2 and ZBrush 4R3 were released as drag-n-drop disk images.
ZBrush 4R4 was released as an application that did the install.
Digging a little deeper, I discovered that this app was built using BitRock InstallBuilder.
The website for this product is here:
http://installbuilder.bitrock.com
I was encouraged when I found this:
http://answers.bitrock.com/questions/41/how-can-i-perform-a-silent-installation
and this:
http://installbuilder.bitrock.com/docs/installbuilder-userguide.html#_unattended_mode
A little more experimenting, and I was able to do a silent install and uninstall without repackaging.
I munkiimported the installer as a drag-n-drop disk image. This causes Munki to copy the installer to /Applications. A postinstall_script then runs the installer in unattended mode:
#!/bin/sh
"/Applications/ZBrush 4R4 Installer OSX FL.app/Contents/MacOS/osx-intel" --mode unattended
rc=$?
/bin/rm -r "/Applications/ZBrush 4R4 Installer OSX FL.app"
exit $rc
The installation process creates an Uninstall.app. It turns out this can be executed in the same way, so I then created an uninstall_script:
#!/bin/sh
"/Applications/ZBrushOSX 4R4 FL/Uninstall/Uninstall ZBrush.app/Contents/MacOS/osx-intel" --mode unattended
rc=$?
/bin/rm -r "/Applications/ZBrushOSX 4R4 FL"
exit $rc
I also needed to modify the installs array to refer to the application installed by the BitRock installer instead of the installer application itself.
The final pkginfo looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>autoremove</key>
<false/>
<key>catalogs</key>
<array>
<string>production</string>
</array>
<key>description</key>
<string>Digital sculpting and painting software by Pixelogic</string>
<key>display_name</key>
<string>ZBrush 4R4</string>
<key>installer_item_hash</key>
<string>90ebd62f968a6f74aa87ff2b8eb3f742c1bf06e89d9e1b99df9e2e7e50aca6a0</string>
<key>installer_item_location</key>
<string>apps/ZBrush_4R4_Installer_OSX_FL.dmg</string>
<key>installer_item_size</key>
<integer>736284</integer>
<key>installer_type</key>
<string>copy_from_dmg</string>
<key>installs</key>
<array>
<dict>
<key>CFBundleIdentifier</key>
<string>ZBrushOSX</string>
<key>CFBundleName</key>
<string>ZBrushOSX</string>
<key>CFBundleShortVersionString</key>
<string>4.4</string>
<key>path</key>
<string>/Applications/ZBrushOSX 4R4 FL/ZBrush.app</string>
<key>type</key>
<string>application</string>
</dict>
</array>
<key>items_to_copy</key>
<array>
<dict>
<key>destination_path</key>
<string>/Applications</string>
<key>source_item</key>
<string>ZBrush 4R4 Installer OSX FL.app</string>
</dict>
</array>
<key>minimum_os_version</key>
<string>10.6.0</string>
<key>name</key>
<string>ZBrush4R4</string>
<key>postinstall_script</key>
<string>#!/bin/sh
"/Applications/ZBrush 4R4 Installer OSX FL.app/Contents/MacOS/osx-intel" --mode unattended
rc=$?
/bin/rm -r "/Applications/ZBrush 4R4 Installer OSX FL.app"
exit $rc
</string>
<key>uninstall_method</key>
<string>uninstall_script</string>
<key>uninstall_script</key>
<string>#!/bin/sh
"/Applications/ZBrushOSX 4R4 FL/Uninstall/Uninstall ZBrush.app/Contents/MacOS/osx-intel" --mode unattended
rc=$?
/bin/rm -r "/Applications/ZBrushOSX 4R4 FL"
exit $rc
</string>
<key>uninstallable</key>
<true/>
<key>version</key>
<string>4.4</string>
</dict>
</plist>