<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
    <options customize="never" hostArchitectures="ppc,i386" rootVolumeOnly="true"/>
    <title>SU_TITLE</title>
    <script>
</script>
    <installation-check script="InstallationCheck()"/>
    <pkg-ref id="iMovieUpdate">
        <must-close>
            <app id="com.apple.iMovieApp"/>
        </must-close>
    </pkg-ref>
    <script>
function InstallationCheck(prefix) {
	my.result.message = system.localizedString('ERROR_0');
	if (!PlistCheck0("/") || !LogicalAnd1("/") || !FileCheck4("/")) {
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function PlistCheck0(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.7.4') &lt; 0) {
		return false;
	}
	return true;
}
function LogicalAnd1(prefix) {
	if (BundleCheck2(prefix) &amp;&amp; BundleCheck3(prefix)) {
		return true;
	}
	return false;
}
function BundleCheck2(prefix) {
	if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_2');
	var bundle = system.files.bundleAtPath(prefix + '/Applications/iMovie.app');
	if (!bundle) {
		return false;
	}
	var bundleKeyValue = bundle['CFBundleShortVersionString'];
	if (!bundleKeyValue) {
		return false;
	}
	if (system.compareVersions(bundleKeyValue, '9.0.0') &lt; 0) {
		return false;
	}
	return true;
}
function BundleCheck3(prefix) {
	if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_3');
	var bundle = system.files.bundleAtPath(prefix + '/Applications/iMovie.app');
	if (!bundle) {
		return false;
	}
	var bundleKeyValue = bundle['CFBundleShortVersionString'];
	if (!bundleKeyValue) {
		return false;
	}
	if (system.compareVersions(bundleKeyValue, '9.0.9.0') > 0) {
		return false;
	}
	return true;
}
function FileCheck4(prefix) {
	if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_4');
	if (system.files.fileExistsAtPath(prefix + '/Applications/iMovie.app/Contents/_MASReceipt/receipt') == 0) {
		return true;
	}
	return false;
}
function BundleCheck5(prefix) {
	var bundle = system.files.bundleAtPath(prefix + '/Applications/iMovie.app');
	if (!bundle) {
		return false;
	}
	var bundleKeyValue = bundle['CFBundleShortVersionString'];
	if (!bundleKeyValue) {
		return false;
	}
	if (system.compareVersions(bundleKeyValue, '9.0.0') &lt; 0) {
		return false;
	}
	if (system.compareVersions(bundleKeyValue, '9.0.9.0') >= 0) {
		return false;
	}
	return true;
}
</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="iMovieUpdate" visible="BundleCheck5('/')">
        <pkg-ref id="iMovieUpdate" auth="Root" packageIdentifier="com.apple.pkg.iMovie9.0.9Update" active="LogicalAnd1('/')">iMovie9.0.9Update.pkg</pkg-ref>
    </choice>
    <localization>
        <strings language="pl"><![CDATA["SU_TITLE" = "Uaktualnienie iMovie";
"SU_VERS" = "9.0.9";
"SU_SERVERCOMMENT" = "Dla komputerów klienckich i serwerów";
"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>
  <meta name="Generator" content="Cocoa HTML Writer">
  <meta name="CocoaVersion" content="1138.32">
  <style type="text/css">
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px \'Lucida Grande\'}
    p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px \'Lucida Grande\'; min-height: 13.0px}
  </style>
</head>
<body>

<p class="p1">Nowości w wersji 9.0.9</p>
<p class="p1">• Rozwiązanie problemów związanych z rozpoznawaniem przez iMovie kamer wideo podłączonych do Maca

<p class="p1">• Zwiększenie zgodności z projektami importowanymi z iMovie dla systemu iOS</p>

<p class="p1">• Poprawki dotyczące stabilności</p>

</body>
</html>


';
]]></strings>
    </localization>

	<pkg-ref id='iMovieUpdate' installKBytes='758776' version='9.0.9.0.1.1263389684'/>
</installer-gui-script>