Final Cut Pro X Additional Content Question

1,210 views
Skip to first unread message

Erik

unread,
Apr 1, 2013, 5:20:01 PM4/1/13
to munk...@googlegroups.com
This may be a "client management question" but does anyone have a post-install script that invokes the FCP X Additional Content?

Once a user installs FCP X, they select "Download Additional Content" in the Menu bar and on the following munki run, it will download the content from my ASUS. I would like for it to at least check on the second run without them clicking on that, as they may not realize it has the content.


Gregory Neagle

unread,
Apr 1, 2013, 5:26:31 PM4/1/13
to munk...@googlegroups.com
How about something like:

#!/bin/sh
/usr/sbin/softwareupdate -d FCPContent-1.0

or even:

#!/bin/sh
/usr/sbin/softwareupdate -i FCPContent-1.0

If you don't want to download from Apple's servers, append a

--CatalogURL <local SUS server catalogURL>

to the command.

-Greg

On Apr 1, 2013, at 2:20 PM, Erik <eriknico...@gmail.com> wrote:

This may be a "client management question" but does anyone have a post-install script that invokes the FCP X Additional Content?

Once a user installs FCP X, they select "Download Additional Content" in the Menu bar and on the following munki run, it will download the content from my ASUS. I would like for it to at least check on the second run without them clicking on that, as they may not realize it has the content.



--
You received this message because you are subscribed to the Google Groups "munki-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gregory Neagle

unread,
Apr 4, 2013, 9:43:56 PM4/4/13
to munk...@googlegroups.com
Erik: Did you try this?

-Greg

Erik

unread,
Apr 5, 2013, 10:15:01 AM4/5/13
to munk...@googlegroups.com
Apologies, I have not yet. I had some initial reservations about this method, but I've been a bit busy with other deployments. I'm going to test this next week.

Erik

unread,
Apr 10, 2013, 10:54:19 AM4/10/13
to munk...@googlegroups.com
The "reservations" I had aren't as bad as I thought they would be.

I knew that munki was going to just display "running post install scripts" as the display dialog through MSU.app, but in virtualized testing, it went significantly faster than I expected it to. (using -i rather than -d).

I'm debating whether I should just do this with the Garageband Extra Content as well, or just import this one into munki like the former. What I would like to figure out is what that button is invoking inside of FCP X, because then munki will eventually see the update and log it with mwa, etc.

Timothy Sutton

unread,
Apr 10, 2013, 11:42:55 AM4/10/13
to munk...@googlegroups.com
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 &lt; 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&lt;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') &lt; 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>

Erik

unread,
Apr 10, 2013, 1:44:50 PM4/10/13
to munk...@googlegroups.com

On Wednesday, April 10, 2013 10:42:55 AM UTC-5, Timothy Sutton wrote:

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?



I'm debating this. A few weeks ago, Greg, Heig and I were discussing post_install scripts and apple updates. With the new builds, munki will only offer both ASUS and munki packages if there are no conflicting packages (aka these packages). By importing them, you lose this ability on (some) runs. I'm trying to avoid this.

I actually have them imported in my repo but they are just not active. Running what Greg posted earlier allows me to install FCP X, the additional content and other SU's at the same time, with the only disadvantage being less verbose in the munki logs and the user only seeing "running post installs" during that process.

Not to derail my own topic, but what is the name for the GBExtraContent? I've tried running the -i command with every single name I could think of and all error with "package does not exist". I looked through the .dist and .sucatalog as well.

Timothy Sutton

unread,
Apr 10, 2013, 2:01:35 PM4/10/13
to munk...@googlegroups.com
GB extra content fir the DVD version was something with 'loops' in the name, but it's since moved to its own separate download outside of SUS for the MAS version.

I don't have it handy but there's a post on afp548 with its download location, which Allister made on my behalf.

Tim
--

Erik

unread,
Apr 10, 2013, 2:11:35 PM4/10/13
to munk...@googlegroups.com
Well I have it imported/active in munki. It's one of the few remaining SUS I am managing now. It's also on my ASUS as "GarageBand Instruments and Loops" with a v1.0 and 5.0. I've tried all sorts of combinations to invoke it, but none of them work using softwareupdate -d.

Gregory Neagle

unread,
Apr 10, 2013, 2:18:44 PM4/10/13
to munk...@googlegroups.com
"GBExtraContent-1.0" is the name you are looking for.  From the en.dist for 061-5890        GarageBand Instruments and Apple Loops             1.0:

<choice id='su' suDisabledGroupID='GBExtraContent'>

The suDisabledGroupID is the name you can use with /usr/sbin/softwareupdate.

But it's not magic.

If `softwareupdate -l` does not show GBExtraContent-1.0 as an available update, `softwareupdate -i GBExtraContent-1.0` is not going to have any effect.

`softwareupdate -i FOO` does not tell softwareupdate to install FOO even if softwareupdate doesn't think it's needed; instead it's more like a filter: "Of the available updates, if one is named FOO, install it."

-Greg

On Apr 10, 2013, at 11:11 AM, Erik <eriknico...@gmail.com> wrote:

Well I have it imported/active in munki. It's one of the few remaining SUS I am managing now. It's also on my ASUS as "GarageBand Instruments and Loops" with a v1.0 and 5.0. I've tried all sorts of combinations to invoke it, but none of them work using softwareupdate -d.

Erik

unread,
Apr 10, 2013, 3:00:20 PM4/10/13
to munk...@googlegroups.com
Okay that would explain why this wasn't working for me when I tried that exact name from my dist. Thanks for the lesson. I think you've tried to explain this to me before, but it didn't click.

I'm going to play with this and the plist Timothy posted earlier. Maybe I can use plistbuddy with a post install script to add the keys and then invoke the softwareupdate to install it.

Timothy Sutton

unread,
Apr 10, 2013, 4:12:49 PM4/10/13
to munk...@googlegroups.com
This is what I used to run to set this:

/usr/libexec/PlistBuddy -c "Set :GarageBand\ 5.0:Show\ Content\ Update true" /Library/Application\ Support/GarageBand/Package\ Registry.plist


-Tim
Reply all
Reply to author
Forward
0 new messages