<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
    <options hostArchitectures="i386" customize="never"/>
    <title>SU_TITLE</title>
    <script>
</script>
    <installation-check script="InstallationCheck()"/>
    <script>
function InstallationCheck(prefix) {
	var models = ['MacBookAir6,1','MacBookAir6,2',];
	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 (!PlistCheck0("/") || !PlistCheck1("/")) {
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function PlistCheck0(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, '12E3067') != 0) {
		return false;
	}
	return true;
}
function PlistCheck1(prefix) {
	var plist = system.files.plistAtPath(prefix + '/System/Library/Extensions/AppleIntelFramebufferAzul.kext/Contents/Info.plist');
	if (!plist) {
		return false;
	}
	var plistKeyValue = plist['CFBundleShortVersionString'];
	if (!plistKeyValue) {
		return false;
	}
	if (system.compareVersions(plistKeyValue, '8.14.50') > 0) {
		return false;
	}
	if (system.compareVersions(plistKeyValue, '8.14.38') &lt; 0) {
		return false;
	}
	return true;
}
function PlistCheck2(prefix) {
	var plist = system.files.plistAtPath(prefix + '/System/Library/Extensions/AppleIntelFramebufferAzul.kext/Contents/Info.plist');
	if (!plist) {
		return false;
	}
	var plistKeyValue = plist['CFBundleShortVersionString'];
	if (!plistKeyValue) {
		return false;
	}
	if (system.compareVersions(plistKeyValue, '8.14.38') &lt; 0) {
		return false;
	}
	if (system.compareVersions(plistKeyValue, '8.14.50') >= 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="MacBookAirUpdate" start_selected="true" visible="PlistCheck0('/') &amp;&amp; PlistCheck2('/')">
        <pkg-ref id="MacBookAirUpdate" auth="Root" packageIdentifier="com.apple.pkg.cpu.macbookair2013update1.0" onConclusion="RequireRestart">MacBookAirUpdate.pkg</pkg-ref>
    </choice>
    <localization>
        <strings language="pl"><![CDATA["SU_TITLE" = "Uaktualnienie oprogramowania MacBooka Air (z połowy 2013 roku)";
"SU_VERS" = "1.0";
"SU_SERVERCOMMENT" = "Dla komputerów klienckich i serwerów";
"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; }
        </style>
    </head>
    <body>
        <p>To uaktualnienie jest zalecane dla MacBooków Air (z połowy 2013 roku). To uaktualnienie rozwiązuje problem, który w rzadkich przypadkach może powodować czasową utratę łączności bezprzewodowej, problem z programem Adobe Photoshop, który może powodować migotanie ekranu co jakiś czas, a także problem, który może powodować nierówną głośność dźwięku podczas odtwarzania wideo.</p><br>
    </body>
</html>
';
]]></strings>
    </localization>

	<pkg-ref id='MacBookAirUpdate' installKBytes='4982' version='1.0.0.0.1.1306847324'/>
</installer-gui-script>