<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
    <options post-logout="true" allow-install-later="true" should-launch-first-login-optimization="false" should-authenticate-reboot="true"/>
    <title>SU_TITLE</title>
    <script/>
    <volume-check script="VolumeCheck()"/>
    <installation-check script="InstallationCheck()"/>
    <pkg-ref id="OSXYosemiteUpdate" installKBytes="23944" version="1.0.0.0.1.1411161746">
        <must-close>
            <app id="com.apple.mail"/>
        </must-close>
    </pkg-ref>
    <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 (compareBuildVersions(my.target.systemVersion.ProductBuildVersion, '14A361c') &lt; 0) {
		my.result.message = system.localizedString('ERROR_2');
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function BundleCheck0(prefix) {
	var bundle = system.files.bundleAtPath(prefix + '/Applications/Mail.app');
	if (!bundle) {
		return false;
	}
	var bundleKeyValue = bundle['CFBundleVersion'];
	if (!bundleKeyValue) {
		return false;
	}
	if (system.compareVersions(bundleKeyValue, '1985.3') != 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="OS X Yosemite Mail Update" start_selected="true" visible="BundleCheck0('/')">
        <pkg-ref id="OSXYosemiteUpdate" auth="Root" packageIdentifier="com.apple.pkg.update.os.yosemite.mail.1.0.4.1-2">OSXYosemiteUpdate.pkg</pkg-ref>
    </choice>
    <localization>
        <strings language="pl">"SU_TITLE" = "Uaktualnienie programu Mail w systemie OS X Yosemite";
"SU_VERS" = " ";
"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&gt;To uaktualnienie rozwiązuje problem, który mógł uniemożliwiać tworzenie wiadomości, i jest zalecane dla wszystkich użytkowników.&lt;/p&gt;
    &lt;/body&gt;
&lt;/html&gt;
';
</strings>
    </localization>
</installer-gui-script>