<?xml version="1.0" encoding="UTF-8"?>
<installer-gui-script minSpecVersion="1">
    <options hostArchitectures="i386" customize="never"/>
    <title>SU_TITLE</title>
    <script>
</script>
    <volume-check script="VolumeCheck()"/>
    <installation-check script="InstallationCheck()"/>
    <script>
function compareBuildVersions(lhs, rhs) {
	var lhsMatch = lhs.match(/([0-9]+)([A-Z])([0-9]+)([a-z])?/);
	var rhsMatch = rhs.match(/([0-9]+)([A-Z])([0-9]+)([a-z])?/);
	return system.compareVersions(lhsMatch.slice(1).join(","), rhsMatch.slice(1).join(","));
}
function InstallationCheck(prefix) {
	if (system.compareVersions(system.version.ProductVersion, '10.6') &lt; 0 || system.compareVersions(system.version.ProductVersion, '10.7') >= 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_0', '10.6');
		my.result.type = 'Fatal';
		return false;
	}
	if (compareBuildVersions(system.version.ProductBuildVersion, '10A432') &lt; 0) {
		my.result.message = system.localizedString('ERROR_1');
		my.result.type = 'Fatal';
		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");
	if (!hasOS || system.compareVersions(my.target.systemVersion.ProductVersion, '10.6') &lt; 0 || system.compareVersions(my.target.systemVersion.ProductVersion, '10.7') >= 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_0', '10.6');
		my.result.type = 'Fatal';
		return false;
	}
	if (!hasOS || system.compareVersions(my.target.systemVersion.ProductVersion, '10.6.8') &lt; 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_2', '10.6.8');
		my.result.type = 'Fatal';
		return false;
	}
	if (!hasOS || system.compareVersions(my.target.systemVersion.ProductVersion, '10.6.8') > 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_3', '10.6.8');
		my.result.type = 'Fatal';
		return false;
	}
	if (compareBuildVersions(my.target.systemVersion.ProductBuildVersion, '10K540') &lt; 0) {
		my.result.message = system.localizedString('ERROR_4');
		my.result.type = 'Fatal';
		return false;
	}
	my.result.message = system.localizedString('ERROR_4');
	if (!FileCheck0(my.target.mountpoint)) {
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function FileCheck0(prefix) {
	if (system.files.fileExistsAtPath(prefix + '/System/Library/CoreServices/ServerVersion.plist') == 1) {
		return true;
	}
	return false;
}
function PlistCheck1(prefix) {
	var plist = system.files.plistAtPath(prefix + '/System/Library/CoreServices/ServerVersion.plist');
	if (!plist) {
		return false;
	}
	var plistKeyValue = plist['ProductBuildVersion'];
	if (!plistKeyValue) {
		return false;
	}
	if (system.compareVersions(plistKeyValue, '10K540') != 0) {
		return false;
	}
	return true;
}
function PlistCheck2(prefix) {
	var plist = system.files.plistAtPath(prefix + '/System/Library/CoreServices/SystemVersion.plist');
	if (!plist) {
		return false;
	}
	var plistKeyValue = plist['ProductBuildVersion'];
	if (!plistKeyValue) {
		return false;
	}
	if (system.compareVersions(plistKeyValue, '10K540') != 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="Mac OS X Server 10.6.8 Supplemental Update" visible="FileCheck0('/') &amp;&amp; PlistCheck1('/')">
        <pkg-ref id="MacOSXUpd10.6.8Supp" auth="Root" packageIdentifier="com.apple.pkg.update.os.10.6.8.supp" onConclusion="RequireRestart" active="PlistCheck2('/')">MacOSXUpd10.6.8Supp.pkg</pkg-ref>
        <pkg-ref id="MacOSXSrvrUpd10.6.8Supp" auth="Root" packageIdentifier="com.apple.pkg.update.osserver.10.6.8.supp" onConclusion="RequireRestart">MacOSXSrvrUpd10.6.8Supp.pkg</pkg-ref>
    </choice>
    <localization>
        <strings language="pl"><![CDATA["SU_TITLE" = "Uaktualnienie uzupełniające systemu Mac OS X 10.6.8";
"SU_VERS" = "1.0";
"SU_SERVERCOMMENT" = "Dla serwerów z systemem Snow Leopard";
"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="1038.35">
  <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: 12.0px Times; min-height: 14.0px}
    p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px \'Lucida Grande\'; min-height: 13.0px}
    p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Verdana; min-height: 11.0px}
    span.s1 {text-decoration: underline ; color: #1843e1}
  </style>
</head>
<body>
<p class="p1">Uaktualnienie uzupełniające dla wersji 10.6.8 jest zalecane dla wszystkich serwerów pracujących obecnie pod systemem Snow Leopard Server. Zawiera ono m.in. poprawki:</p>
<p class="p2"><br></p>
<p class="p1">- problemów z wydajnością po stronie serwera w czasie korzystania z programu Server Monitor.</p>
</body>
</html>
';
]]></strings>
    </localization>

	<pkg-ref id='MacOSXSrvrUpd10.6.8Supp' installKBytes='136' version='1.0.0.0.1.1249367152'/>
	<pkg-ref id='MacOSXUpd10.6.8Supp' installKBytes='22439' version='1.0.0.0.1.1249367152'/>
</installer-gui-script>