Installing the Final Cut Server client application is probably the easiest part of a deployment. Unfortunately, it's also very time-consuming, especially when you have alot of clients. What would be nice would be to wrap up that client in a package and push it out via ARD. There are some things to keep in mind, though. Final Cut Server doesn't behave the same as many other applications.
Step 1, of course, is to download the client from your Final Cut Server. You point a web browser at your Final Cut Server, click the Download button, and you're rewarded with a file called "Final Cut Server.jnlp". Of course, this isn't the actual client app. It's a JNLP file, which means it's simply an XML file that gets handed to your Java Runtime Environment, which then downloads the actual Java app from the Final Cut Server. If you look at this in a text editor, you'll notice one important thing - the address of your Final Cut Server is specified right up at the top of that XML:
codebase="http://127.0.0.1" href="/~fcsvr/webstart/macJnlp.php"
The address will be whatever address you used to connect to your Final Cut Server. If you download it locally on the server, and you save yourself some keystrokes by going to http://localhost/finalcutserver, that's the address that will be in the JNLP, and that will get written into the resulting client application. So unless you want to edit that file after downloading it to put in the proper host name, you should use the hostname you want the clients to use.
(This also means that you can just keep a copy of this file on hand, edit it to contain the host name of whatever Final Cut Server you're deploying, and skip the Download step.)
After you've downloaded the JNLP, run it, and you'll be asked whether or not you want to trust the certificate provided with the app. If you want to avoid this step for your users, you can export the certificate from your keychain, and app a postflight script to your installer package that uses security (a very handy command for manipulating keychains) to add the certificate to they system keychain.
The app bundle that it creates (Final Cut Server.app) is essentially another Java Web Start app, but in a prettier package. When you launch it, it uses the address specified in the app bundle to download the actual client application and run it. What you can do is just take that Final Cut Server.app, wrap it in a simple installer package and send that to your clients. Important note here, though: the client app really wants to live on the Desktop of the user running it. If you deploy the app to a machine's /Applications folder, and the user runs it, it will download the app from Final Cut Server, and then create a new app on the user's Desktop if one doesn't already exist.
(Try it - move your FCS client to /Applications, run it, and see what happens.)
A nice side effect of this is that when the app is in /Applications, ownership and permissions aren't so important - the user simply needs read access, and a copy of the app that's owned by the user will be created on their desktop.
So you've got your downloaded Final Cut Server client app, and you've trusted the certificate. Let's put that in an installer so we can distribute it. The first order of business is to get the necessary resources in order.
Export the Apple Inc. certificate from your keychain. The easiest way to do this is to open up Keychain Access, and drag the Apple cert from your Keychain to your Desktop. While you're at it, remove the extra dot and the space from the name, so it's just AppleInc.cer. Now we need to create the postflight script that will add the certificate to the System Keychain. In your favorite text editor (I use TextMate, and I highly recommend it), create a simple bash script in a file named "postflight", like so:
#!/bin/bash
Make sure it's executable.
# Script to import Apple cert into System Keychain
# Variables
myName="FCSClientInstaller"
# resourceDir=`dirname "${0}"`
resourceDir="/Users/gsullivan/Desktop/finalCutServer/resources/postflight"
certFile="AppleInc.cer"
myKeychain="/Library/Keychains/System.keychain"
certPath="$resourceDir/$certFile"
# Make a note in system.log that we're installing the cert
logger -s "${myName}: Installing Certificate to System Keychain"
# Add cert to system Keychain
security add-trusted-cert -d -r trustRoot -k "$myKeychain" "$certPath"
# Make a note in system.log that we're done
logger -s "${myName}: Done installing certificate"
bash$ chmod a+x postflight
Now we'll lay out the hierarchy. We need a folder to keep all this in which has two folders in it. One we'll call Resources. This will hold the postflight script and the AppleInc.cer file. The other will contain the app to be installed in a relative hierarchy that tells PackageMaker where things should go. I call my myRoot, and it contains an Applications folder that in turn contains the Final Cut Server.app bundle. It's important to note a couple things:
The permissions on the Applications folder should match the actual permissions on the system's Applications folder, because Installer will set those permissions based on what's in the package. If you take a look at your Applications folder, you'll see what those should be:
bash$ ls -ld /Applications/
If there's a .DS_Store file in the faux root's Applications folder, it will overwrite the target system's .DS_Store, which could cause unexpected behavior. Make sure you remove any .DS_Store files.
drwxrwxr-x+ 83 root admin 2822 Jun 26 16:25 /Applications/
bash$ find /path/to/myRoot/ -name ".DS_Store" -exec rm -f {} ;
Your folder should look about like this:
bash$ ls -R finalCutServer/
myRoot resources
finalCutServer//myRoot:
Applications
finalCutServer//myRoot/Applications:
Final Cut Server.app
finalCutServer//resources:
AppleInc.cer postflight
Open up PackageMaker, and set your Organization appropriately (naturally, I'll be using com.318). The Final Cut Server client requires 10.4.11, so you could set the minimum target to Mac OS X 10.4, but we'll assume for deployment purposes, you'll be working some sort of standardized system. Set the minimum target accordingly. Drag your myRoot folder into the Contents pane, and then in the Configuration tab, make sure the Destination is /, and the package identifier is as you'd like it to be. Mine is "com.318.finalcutserverclient.pkg". On the Scripts tab, next to the Scripts Directory field, click on the gear, select "Choose", and give it the location of your Resources folder. You'll notice that next to Postflight, it now says "Specified in Scripts directory". It has deduced from the name of the script that it should be a postflight action. In the contents tab, make sure that the permissions on the Applications folder and its contents are correct, and make sure there are no .DS_Store files. If it all looks good, click "Build", save it to your Desktop, and you've got a package that's ready for installation.


---
Nicholas Stokes
XPlatform Consulting
310-738-1454
email: nick@xplatformconsulting.com
im: nicholasstokes@mac.com
web: http://www.