<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
    <options should-authenticate-reboot="true" should-launch-first-login-optimization="true" post-logout="true" allow-install-later="true"/>
    <title>SU_TITLE</title>
    <script/>
    <volume-check script="VolumeCheck()"/>
    <installation-check script="InstallationCheck()"/>
    <script>
function InstallationCheck(prefix) {
	if (system.compareVersions(system.version.ProductVersion, '10.11') &lt; 0 || system.compareVersions(system.version.ProductVersion, '10.12') &gt;= 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_0', '10.11');
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function VolumeCheck(prefix) {
	if (system.env.OS_INSTALL == 1) return true;
	var myTargetSystemVersion = (my.target.systemVersion || system.files.plistAtPath(my.target.mountpoint + "/System/Library/CoreServices/SystemVersion.plist"));
	if (!myTargetSystemVersion || system.compareVersions(myTargetSystemVersion.ProductVersion, '10.11') &lt; 0 || system.compareVersions(myTargetSystemVersion.ProductVersion, '10.12') &gt;= 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_0', '10.11');
		my.result.type = 'Fatal';
		return false;
	}
	my.result.message = system.localizedString('ERROR_2');
	if (!LogicalOr0(my.target.mountpoint)) {
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function LogicalOr0(prefix) {
	if (PlistCheck1(prefix)) {
		return true;
	}
	return false;
}
function PlistCheck1(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, '15E2066') != 0) {
		return false;
	}
	return true;
}
function PlistCheck2(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, '15E2071') &gt;= 0) {
		return false;
	}
	return true;
}
function Script3(prefix) {
	return !!((!my.target.receiptForIdentifier('com.apple.pkg.update.os.BluetoothUpdateforMacBook.15E2071')));
}
</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="Bluetooth Update for MacBook (Retina, 12-inch, Early 2016)" start_selected="true" visible="PlistCheck2('/') &amp;&amp; Script3('/')">
        <pkg-ref id="BluetoothUpdateforMacBook" auth="Root" packageIdentifier="com.apple.pkg.update.os.BluetoothUpdateforMacBook.15E2071" onConclusion="RequireRestart">BluetoothUpdateforMacBook.pkg</pkg-ref>
        <pkg-ref id="FirmwareUpdate" auth="Root" packageIdentifier="com.apple.update.firmwareupdate">FirmwareUpdate.pkg</pkg-ref>
    </choice>
    <localization>
        <strings language="pl">"SU_TITLE" = "Uaktualnienie Bluetooth dla MacBooka (z ekranem Retina, 12-calowego, z początku 2016 roku)";
"SU_TITLE_ALT" = "";
"SU_VERS" = "1.0";
"SU_VERS_ALT" = "";
"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;Uaktualnienie Bluetooth dla MacBooka (z ekranem Retina, 12-calowego, z początku 2016 roku) poprawia zgodność z urządzeniami bluetooth innych firm i jest zalecane dla wszystkich użytkowników.
&lt;/p&gt;
    &lt;/body&gt;
&lt;/html&gt;
';
"SU_DESCRIPTION_ALT" = '';
</strings>
    </localization>
    <pkg-ref id="BluetoothUpdateforMacBook" installKBytes="96929" version="1.0.0.0.1.1460600831"/>
    <pkg-ref id="FirmwareUpdate" installKBytes="63" version="1.0.0.0.1.1460600831"/>
</installer-gui-script>