<?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()"/>
    <pkg-ref id="SafariMavericks" installKBytes="113798" version="1.0.0.0.1.1472661287">
        <must-close>
            <app id="com.apple.Safari"/>
        </must-close>
    </pkg-ref>
    <script>
function InstallationCheck(prefix) {
	if (system.compareVersions(system.version.ProductVersion, '10.9') &lt; 0 || system.compareVersions(system.version.ProductVersion, '10.10') &gt;= 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_0', '10.9');
		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.9.5') &lt; 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_2', '10.9.5');
		my.result.type = 'Fatal';
		return false;
	}
	if (!myTargetSystemVersion || system.compareVersions(myTargetSystemVersion.ProductVersion, '10.9.5') &gt; 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_3', '10.9.5');
		my.result.type = 'Fatal';
		return false;
	}
	my.result.message = system.localizedString('ERROR_4');
	if (!DoesntHaveNewerWebkit(my.target.mountpoint)) {
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function DoesntHaveNewerWebkit(prefix) {
	if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_5');
	if (FrameworkOlderOrEqual(prefix) &amp;&amp; StagedOlderOrEqual(prefix)) {
		return true;
	}
	return false;
}
function FrameworkOlderOrEqual(prefix) {
	var plist = system.files.plistAtPath(prefix + '/System/Library/Frameworks/WebKit.framework/Resources/Info.plist');
	if (!plist) {
		return true;
	}
	var plistKeyValue = plist['CFBundleVersion'];
	if (!plistKeyValue) {
		return true;
	}
	if (system.compareVersions(plistKeyValue, '9601.7.8') &gt; 0) {
		return false;
	}
	return true;
}
function StagedOlderOrEqual(prefix) {
	var plist = system.files.plistAtPath(prefix + '/System/Library/StagedFrameworks/Safari/WebKit.framework/Resources/Info.plist');
	if (!plist) {
		return true;
	}
	var plistKeyValue = plist['CFBundleVersion'];
	if (!plistKeyValue) {
		return true;
	}
	if (system.compareVersions(plistKeyValue, '9601.7.8') &gt; 0) {
		return false;
	}
	return true;
}
function DoesntHaveNewerOrSameWebkit(prefix) {
	if (FrameworkOlder(prefix) &amp;&amp; StagedOlder(prefix)) {
		return true;
	}
	return false;
}
function FrameworkOlder(prefix) {
	var plist = system.files.plistAtPath(prefix + '/System/Library/Frameworks/WebKit.framework/Resources/Info.plist');
	if (!plist) {
		return true;
	}
	var plistKeyValue = plist['CFBundleVersion'];
	if (!plistKeyValue) {
		return true;
	}
	if (system.compareVersions(plistKeyValue, '9601.7.8') &gt;= 0) {
		return false;
	}
	return true;
}
function StagedOlder(prefix) {
	var plist = system.files.plistAtPath(prefix + '/System/Library/StagedFrameworks/Safari/WebKit.framework/Resources/Info.plist');
	if (!plist) {
		return true;
	}
	var plistKeyValue = plist['CFBundleVersion'];
	if (!plistKeyValue) {
		return true;
	}
	if (system.compareVersions(plistKeyValue, '9601.7.8') &gt;= 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="Safari9.1.3Mavericks" start_selected="true" visible="DoesntHaveNewerOrSameWebkit('/')">
        <pkg-ref id="SafariMavericks" auth="Root" packageIdentifier="com.apple.pkg.Safari9.1.3Mavericks">Safari9.1.3Mavericks.pkg</pkg-ref>
    </choice>
    <localization>
        <strings language="pl">"SU_TITLE" = "Safari";
"SU_TITLE_ALT" = "";
"SU_VERS" = "9.1.3";
"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;meta name="Generator" content="Cocoa HTML Writer"&gt;
  &lt;meta name="CocoaVersion" content="1265.19"&gt;
  &lt;style type="text/css"&gt;
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px \'-apple-system\'}
    p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px \'-apple-system\'; min-height: 13.0px}
    span.s1 {text-decoration: underline ; color: #4787ff}
    span.Apple-tab-span {white-space:pre}
  &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p class="p1"&gt;Uaktualnienie Safari 9.1.3 zawiera poprawki w zakresie bezpieczeństwa i jest zalecane dla wszystkich użytkowników systemu OS X Mavericks.&lt;/p&gt;
&lt;p class="p2"&gt;&lt;br&gt;&lt;/p&gt;
&lt;p class="p1"&gt;Szczegółowe informacje na temat zawartości tego uaktualnienia związanej z zabezpieczeniami można znaleźć pod adresem: &lt;a href="https://support.apple.com/pl-pl/HT201222"&gt;&lt;span class="s1"&gt;https://support.apple.com/pl-pl/HT201222&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
';
"SU_DESCRIPTION_ALT" = '';
</strings>
    </localization>
</installer-gui-script>