<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
    <options hostArchitectures="i386" customize="never"/>
    <title>SU_TITLE</title>
    <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.10') &lt; 0 || system.compareVersions(system.version.ProductVersion, '10.11') &gt;= 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_0', '10.10');
		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.10') &lt; 0 || system.compareVersions(my.target.systemVersion.ProductVersion, '10.11') &gt;= 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_0', '10.10');
		my.result.type = 'Fatal';
		return false;
	}
	if (!hasOS || system.compareVersions(my.target.systemVersion.ProductVersion, '10.10.3') &lt; 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_2', '10.10.3');
		my.result.type = 'Fatal';
		return false;
	}
	if (!hasOS || system.compareVersions(my.target.systemVersion.ProductVersion, '10.10.3') &gt; 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_3', '10.10.3');
		my.result.type = 'Fatal';
		return false;
	}
	if (compareBuildVersions(my.target.systemVersion.ProductBuildVersion, '14D131') &lt; 0) {
		my.result.message = system.localizedString('ERROR_4');
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function LogicalOr0(prefix) {
	if (Script1(prefix) || Script2(prefix) || Script3(prefix)) {
		return true;
	}
	return false;
}
function Script1(prefix) {
	if (!(system.sysctl('hw.model') == 'iMac14,3')) {
		return false;
	}
	return true;
}
function Script2(prefix) {
	if (!(system.sysctl('hw.model') == 'iMac14,2')) {
		return false;
	}
	return true;
}
function Script3(prefix) {
	if (!(system.sysctl('hw.model') == 'iMac15,1')) {
		return false;
	}
	return true;
}
function Script4(prefix) {
	if (!(!my.target.receiptForIdentifier('com.apple.pkg.update.os.#SUMASTERINGBUILDVERSION#.iMac2015Update1.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="iMac10.10.3Supp" start_selected="true" visible="LogicalOr0('/') &amp;&amp; Script4('/')">
        <pkg-ref id="iMacSupp" auth="Root" packageIdentifier="com.apple.pkg.update.os.#SUMASTERINGBUILDVERSION#.iMac2015Update1.0" onConclusion="RequireRestart">iMac2015Update1.0.pkg</pkg-ref>
    </choice>
    <localization>
        <strings language="pl">"SU_TITLE" = "Uaktualnienie grafiki iMaca";
"SU_VERS" = "10.10.3";
"SU_SERVERCOMMENT" = "Dla komputerów klienckich i serwerów";
"SU_DESCRIPTION" = '&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
        &lt;meta http-equiv="Content-Style-Type" content="text/css"&gt;
        &lt;title&gt;&lt;/title&gt;
        &lt;style type="text/css"&gt;
            body {font: 11.0px Lucida Grande;}
            p {margin: 0.0px 0.0px 0.0px 0.0px;}
        &lt;/style&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;p class="p1"&gt;To uaktualnienie usuwa problem, który mógł powodować, że komputery iMac przestawały odpowiadać po wyświetleniu bardzo dużych obrazków JPEG.&lt;/p&gt;
    
    &lt;p class="p2"&gt;&lt;br&gt;&lt;/p&gt;

    &lt;p class="p1"&gt;Modele, których to dotyczy:&lt;/p&gt;
    &lt;ul&gt;
        &lt;li&gt;iMac (Retina 5K, 27 cali, koniec 2014 r.)&lt;/li&gt;
        &lt;li&gt;iMac (21,5 cala, koniec 2013 r.)&lt;/li&gt;
        &lt;li&gt;iMac (27 cali, koniec 2013 r.)&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p class="p2"&gt;&lt;br&gt;&lt;/p&gt;

    &lt;p class="p1"&gt;Aby uzyskać bardziej szczegółowe informacje o tym uaktualnieniu, zobacz: &lt;a href="http://support.apple.com/kb/HT204779?viewlocale=pl_PL"&gt;http://support.apple.com/kb/HT204779?viewlocale=pl_PL&lt;/a&gt;&lt;/p&gt;

    &lt;/body&gt;
&lt;/html&gt;
';
</strings>
    </localization>
    <pkg-ref id="iMacSupp" installKBytes="248" version="1.0.0.0.1.1429642676"/>
</installer-gui-script>