<?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 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;
	}
	my.result.message = system.localizedString('ERROR_1');
	if (!ModelVersionCheck0("/")) {
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function ModelVersionCheck0(prefix) {
	var versions = ['MacBookPro6,2'];
	var property = system.sysctl('hw.model');
	if (property) {
		for (var i = 0; i &lt; versions.length; i++) {
			if (versions[i] == property) return true;
		}
	}
	return false;
}
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;
	}
	return true;
}
function PlistCheck1(prefix) {
	var plist = system.files.plistAtPath(prefix + '/System/Library/Extensions/NVDAResman.kext/Contents/version.plist');
	if (!plist) {
		return false;
	}
	var plistKeyValue = plist['CFBundleVersion'];
	if (!plistKeyValue) {
		return false;
	}
	if (system.compareVersions(plistKeyValue, '6.4.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="MacBook Pro Video Update" visible="PlistCheck1('/')">
        <pkg-ref id="MacBookProVideoUpdate1.0" auth="Root" packageIdentifier="com.apple.pkg.update.macbookprovideoupdate.snowleopard.1.0" onConclusion="RequireRestart">MacBookProVideoUpdate1.0.pkg</pkg-ref>
    </choice>
    <localization>
        <strings language="pl"><![CDATA["SU_TITLE" = "Uaktualnienie wideo MacBooka Pro";
"SU_VERS" = "1.0";
"SU_SERVERCOMMENT" = "Dla komputerów klienckich";
"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: 11.0px Lucida Grande;}
    p {margin: 0.0px 0.0px 0.0px 0.0px;}
  </style>
</head>
<body>
<p>To uaktualnienie rozwiązuje problem z MacBookiem Pro (15-calowym, z połowy 2010 roku), który mógł powodować sporadyczne zatrzymywanie lub wyłączanie wyświetlania wideo.</p><br>

<p>Szczegółowe informacje na temat tego uaktualnienia można znaleźć pod adresem: <a href="http://support.apple.com/kb/TS4088?viewlocale=pl_PL">http://support.apple.com/kb/TS4088?viewlocale=pl_PL</a>.</p>
</body>
</html>
';
]]></strings>
    </localization>

	<pkg-ref id='MacBookProVideoUpdate1.0' installKBytes='121863' version='1.0.0.0.1.1249367152'/>
</installer-gui-script>