<?xml version="1.0" encoding="UTF-8"?>
<installer-gui-script minSpecVersion="1">
    <options type="firmware" customize="never" hostArchitectures="i386" rootVolumeOnly="true"/>
    <title>SU_TITLE</title>
    <script>
</script>
    <volume-check script="VolumeCheck()"/>
    <installation-check script="InstallationCheck()"/>
    <script>
function InstallationCheck(prefix) {
	var versions = ['1.53f10','1.54f33','0.000',];
	var rom = system.ioregistry.fromPath('IOService:/AppleACPIPlatformExpert/SMC/AppleSMC');
	if (!rom || !(rom['smc-version']) || versions.indexOf(rom['smc-version']) == -1) {
		my.result.message = system.localizedString('ERROR_1');
		my.result.type = 'Fatal';
		return false;
	}
	if (system.compareVersions(system.version.ProductVersion, '10.6.3') &lt; 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_0', '10.6.3');
		my.result.type = 'Fatal';
		return false;
	}
	my.result.message = system.localizedString('ERROR_1');
	if (!Script0("/")) {
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function Script0(prefix) {
	if (!(system.ioregistry.fromPath('IOService:/')['board-id'] == 'Mac-F2268DC8' || system.ioregistry.fromPath('IOService:/')['board-id'] == 'Mac-F2268DAE')) {
		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.3') &lt; 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_0', '10.6.3');
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function LogicalOr1(prefix) {
	if (EFIVersionCheck2(prefix) || Script3(prefix)) {
		return true;
	}
	return false;
}
function EFIVersionCheck2(prefix) {
	var versions = ['IM111.88Z.0034.B02.1003171314'];
	var obj = system.ioregistry.fromPath('IODeviceTree:/rom@0');
	if (obj) {
		var property = obj.version;
		if (!property) return false;
		for (var i = 0; i &lt; versions.length; i++) {
			if (versions[i] == property) return true;
		}
	}
	return false;
}
function Script3(prefix) {
	if (!(system.ioregistry.fromPath('IOService:/')['board-id'] == 'Mac-F2268DC8')) {
		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="iMacSMCUpdate1.0" visible="LogicalOr1('/')">
        <pkg-ref id="iMac" auth="Root" packageIdentifier="com.apple.pkg.iMacSMCUpdate" onConclusion="RequireRestart">iMacSMCUpdate.pkg</pkg-ref>
    </choice>
    <localization>
        <strings language="pl"><![CDATA["SU_TITLE" = "Uaktualnienie oprogramowania sprzętowego SMC 27-calowego iMaca";
"SU_VERS" = "1.0";
"SU_SERVERCOMMENT" = "Dla komputerów klienckich oraz 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 class="p1">To uaktualnienie rozwiązuje problemy ze zgodnością 27-calowych iMaców pracujących w trybie monitora zewnętrznego.
</p><br>
<p class="p1">Po ponownym uruchomieniu komputera pojawi się szary ekran z paskiem statusu, wskazujący postęp uaktualniania. Wentylatory komputera będą podczas uaktualniania pracowały z pełną szybkością, lecz po zakończeniu powrócą do normalnego trybu pracy. Procesu uaktualniania nie można przerywać, ani wyłączać iMaca w jego trakcie.</p>
</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">To uaktualnienie rozwiązuje problemy ze zgodnością 27-calowych iMaców pracujących w trybie monitora zewnętrznego.</p><br>
<p class="p1">Po ponownym uruchomieniu komputera pojawi się szary ekran z paskiem statusu, wskazujący postęp uaktualniania. Wentylatory komputera będą podczas uaktualniania pracowały z pełną szybkością, lecz po zakończeniu powrócą do normalnego trybu pracy. Procesu uaktualniania nie można przerywać, ani wyłączać iMaca w jego trakcie.</p>
</body>
</html>
]]></readme>

	<pkg-ref id='iMac' installKBytes='624' version='1.0.1.1271808514'/>
</installer-gui-script>