<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
    <options type="firmware" customize="never" hostArchitectures="i386" rootVolumeOnly="true"/>
    <title>SU_TITLE</title>
    <script>
</script>
    <installation-check script="InstallationCheck()"/>
    <script>
function InstallationCheck(prefix) {
	var models = ['MacBook7,1',];
	var model = system.sysctl('hw.model');
	if (models.indexOf(model) == -1) {
		my.result.message = system.localizedString('ERROR_0');
		my.result.type = 'Fatal';
		return false;
	}
	my.result.message = system.localizedString('ERROR_0');
	if (!LogicalAnd0("/")) {
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function LogicalAnd0(prefix) {
	if (LogicalOr1(prefix) &amp;&amp; LogicalOr5(prefix)) {
		return true;
	}
	return false;
}
function LogicalOr1(prefix) {
	if (PlistCheck2(prefix) || PlistCheck3(prefix) || PlistCheck4(prefix)) {
		return true;
	}
	return false;
}
function PlistCheck2(prefix) {
	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.8.2') &lt; 0) {
		return false;
	}
	return true;
}
function PlistCheck3(prefix) {
	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.5') &lt; 0) {
		return false;
	}
	if (system.compareVersions(plistKeyValue, '10.8') >= 0) {
		return false;
	}
	return true;
}
function PlistCheck4(prefix) {
	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.8') &lt; 0) {
		return false;
	}
	if (system.compareVersions(plistKeyValue, '10.7') >= 0) {
		return false;
	}
	return true;
}
function LogicalOr5(prefix) {
	if (SMCVersionCheck6(prefix) || SMCVersionCheck7(prefix)) {
		return true;
	}
	return false;
}
function SMCVersionCheck6(prefix) {
	var versions = ['1.60f5'];
	var obj = system.ioregistry.fromPath('IOService:/AppleACPIPlatformExpert/SMC/AppleSMC');
	if (obj) {
		var property = obj['smc-version'];
		if (!property) return false;
		for (var i = 0; i &lt; versions.length; i++) {
			if (versions[i] == property) return true;
		}
	}
	return false;
}
function SMCVersionCheck7(prefix) {
	var versions = ['0.000'];
	var obj = system.ioregistry.fromPath('IOService:/AppleACPIPlatformExpert/SMC/AppleSMC');
	if (obj) {
		var property = obj['smc-version'];
		if (!property) return false;
		for (var i = 0; i &lt; versions.length; i++) {
			if (versions[i] == property) 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="MacBookSMCUpdate1.5" start_selected="true">
        <pkg-ref id="MacBook" auth="Root" packageIdentifier="com.apple.pkg.MacBookSMCUpdate" onConclusion="RequireRestart" active="LogicalOr5('/')">MacBookSMCUpdate.pkg</pkg-ref>
    </choice>
    <localization>
        <strings language="pl"><![CDATA["SU_TITLE" = "Uaktualnienie oprogramowania sprzętowego SMC MacBooka";
"SU_VERS" = "1.5";
"SU_SERVERCOMMENT" = "Dla komputerów klienckich i serwerów";
"SU_DESCRIPTION" = '<HTML><!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">
	p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11px Lucida Grande;}
  </style>
</head>
<body>
<p><b>Uaktualnienie oprogramowania sprzętowego SMC MacBooka 1.5</b></p>
<p class="p1">To uaktualnienie rozwiązuje rzadko występujący problem z niektórymi komputerami przenośnymi Apple, w wyniku którego bateria po przekroczeniu 1000 cyklów ładowania mogła nieoczekiwanie odłączać zasilanie lub przestać działać.</p><br>
</body>
</html>
';
]]></strings>
    </localization>
    <readme mime-type="text/html"><![CDATA[<HTML><!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">
	p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11px Lucida Grande;}
  </style>
</head>
<body>
	<p class="p1">Komputer musi być podłączony do sprawnego źródła zasilania albo jego bateria musi być naładowana w co najmniej 25%.
	</p><br>
	<p class="p1">Po ponownym uruchomieniu komputera wyświetlony zostanie szary ekran z paskiem stanu wskazującym postęp uaktualniania. W czasie uaktualniania wentylator komputera będzie działał na pełnych obrotach, ale po jego zakończeniu wróci do normalnej pracy. Nie przerywaj uaktualniania ani nie wyłączaj komputera w jego trakcie.</p><br>
</body>
</html>
]]></readme>

	<pkg-ref id='MacBook' installKBytes='355' version='1.5.0.0.1.1359143240'/>
</installer-gui-script>