You mention it shows up when the user clicks to download additional content. Previously, with the DVD versions of Garageband, clicking the button to get the extra "apple loops" would set some plist values at: /Library/Application Support/GarageBand/Package Registry.plist.
To me it looks possible that the content may just show up as installable based on whether FCP X 10.0 or greater _exists_, from a quick look at the content update .dist file, pasted below. Looks like the Motion content looks for at least 5.0.3. It also considers FCP X content installed if "'/Library/Audio/Apple Loops/Apple/Final Cut Pro Sound Effects/Ambience/Airport.caf" exists. Yet another case of Apple not using its own basic installer receipts mechanism.
Since the content packages are readily available from
support.apple.com/downloads (or as a simple package, from SUS directly), why not just import this into Munki as well and make it an update_for?
-Tim
~/git/reposado/code$ ./repoutil --dist=041-4538
<?xml version="1.0" encoding="UTF-8"?>
<installer-gui-script minSpecVersion="1">
<options customize="never" hostArchitectures="i386" rootVolumeOnly="true"/>
<title>SU_TITLE</title>
<script>
</script>
<volume-check script="VolumeCheck()"/>
<installation-check script="InstallationCheck()"/>
<script>
var updateName = "FCP Content";
function shouldAllowInstall()
{
// nothing found, fail
var results = my.search.results[ 'find-App-by-id' ];
if ( ! results || results.length == 0 )
{
debuglog("Didn't find FCP.");
return false;
}
// If any result is version 9.9 or newer, allow install
for ( var i = 0 ; i < results.length ; ++i )
{
debuglog("Found a copy at " + results[i] + " with version " + PathGetShortVersion(results[i]));
if ( system.compareVersions(PathGetShortVersion(results[i]),9.9) >= 0 )
{
debuglog("Success!");
return true;
}
else
{
debuglog("Not new enough.");
}
}
// else fail
debuglog("Ran out of copies, alas.");
return false;
}
function PathGetShortVersion(path)
{
var bundle = system.files.bundleAtPath(path);
if (bundle == null) return _PadVersionString(0, 3);
var shortVers = bundle.CFBundleShortVersionString;
shortVers = _PadVersionString(shortVers, 3);
return shortVers;
}
function _PadVersionString(version, tupleCount)
{
if (version == null) version = "0";
var components = version.split(".");
if (components.length > tupleCount)
components = components.slice(0, tupleCount);
else
for (; components.length<tupleCount; )
components.push("0");
return components.join(".");
}
function debuglog(message)
{
// yes, this is secure
if (system.files.fileExistsAtPath("/tmp/com.apple.pkg.testing")) system.log("********** " + updateName + ": " + message);
}
</script>
<locator>
<search id="find-App-by-id" type="component">
<bundle CFBundleIdentifier="com.apple.FinalCut"/>
</search>
</locator>
<script>
function InstallationCheck(prefix) {
my.result.message = system.localizedString('ERROR_0');
if (!LogicalOr0("/")) {
my.result.type = 'Fatal';
return false;
}
return true;
}
function LogicalOr0(prefix) {
if (Script1(prefix) || PlistCheck2(prefix)) {
return true;
}
return false;
}
function Script1(prefix) {
if (!system.env.COMMAND_LINE_INSTALL) {
return false;
}
return true;
}
function PlistCheck2(prefix) {
if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_1');
var plist = system.files.plistAtPath(prefix + '/System/Library/CoreServices/SystemVersion.plist');
if (!plist) {
return false;
}
var plistKeyValue = plist['ProductVersion'];
if (!plistKeyValue) {
return false;
}
if (system.compareVersions(plistKeyValue, '10.6.6') < 0) {
return false;
}
return true;
}
function VolumeCheck(prefix) {
if (system.env.OS_INSTALL == 1) return true;
var hasOS = system.files.fileExistsAtPath(my.target.mountpoint + "/System/Library/CoreServices/SystemVersion.plist");
my.result.message = system.localizedString('ERROR_2');
if (!Script3(my.target.mountpoint)) {
my.result.type = 'Fatal';
return false;
}
return true;
}
function Script3(prefix) {
if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_3');
if (!shouldAllowInstall()) {
return false;
}
return true;
}
function FileCheck4(prefix) {
if (system.files.fileExistsAtPath(prefix + '/Library/Audio/Apple Loops/Apple/Final Cut Pro Sound Effects/Ambience/Airport.caf') == 0) {
return true;
}
return false;
}
</script>
<platforms>
<client arch="i386"/>
<server arch="i386"/>
</platforms>
<choices-outline ui="SoftwareUpdate">
<line choice="su"/>
</choices-outline>
<choices-outline>
<line choice="su"/>
</choices-outline>
<choice id="su" title="SU_TITLE" versStr="SU_VERS" description="SU_DESCRIPTION" description-mime-type="text/html" secondaryDescription="SU_SERVERCOMMENT" suDisabledGroupID="FCPContent" start_selected="true" visible="FileCheck4('/')">
<pkg-ref id="FCPContent" auth="Root" packageIdentifier="com.apple.pkg.FCPContent">FCPContent.pkg</pkg-ref>
</choice>
<localization>
<strings language="English"><![CDATA["SU_TITLE" = "Final Cut Pro X Supplemental Content";
"SU_VERS" = "1.0";
"SU_SERVERCOMMENT" = "For Desktop and Server systems";
"SU_DESCRIPTION" = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "
http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<style type="text/css">
body {font: 12.0px Lucida Grande;}
p {margin: 0.0px 0.0px 0.0px 0.0px;}
</style>
</head>
<body>
<p>This update adds the following content for use in Final Cut Pro X:</p>
<ul>
<li>Sound Effects: Over 1300 rights-free sound effects installed into the Audio Browser of Final Cut Pro X.</li>
<li>Audio Effect Presets: Additional preset effects for the Space Designer plug-in.</li>
</ul>
<p>This update is recommended for all users of Final Cut Pro X.</p>
</body>
</html>
';
]]></strings>
</localization>
<pkg-ref id='FCPContent' installKBytes='519178' version='1.0.0.0.1.1191509119'/>
</installer-gui-script>