<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
    <options customize="never" hostArchitectures="x86_64" rootVolumeOnly="true"/>
    <title>SU_TITLE</title>
    <script>
</script>
    <installation-check script="InstallationCheck()"/>
    <pkg-ref id="BookKit">
        <must-close>
            <app id="com.apple.iTunes"/>
            <app id="com.apple.Preview"/>
            <app id="com.apple.iBooksX"/>
        </must-close>
    </pkg-ref>
    <pkg-ref id="iBooks">
        <must-close>
            <app id="com.apple.iBooksX"/>
        </must-close>
    </pkg-ref>
    <pkg-ref id="BookKitDelta">
        <must-close>
            <app id="com.apple.iTunes"/>
            <app id="com.apple.Preview"/>
            <app id="com.apple.iBooksX"/>
        </must-close>
    </pkg-ref>
    <pkg-ref id="iBooksDelta">
        <must-close>
            <app id="com.apple.iBooksX"/>
        </must-close>
    </pkg-ref>
    <script>
function InstallationCheck(prefix) {
	if (system.compareVersions(system.version.ProductVersion, '10.9') &lt; 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_0', '10.9');
		my.result.type = 'Fatal';
		return false;
	}
	my.result.message = system.localizedString('ERROR_1');
	if (!canBeUpdated("/")) {
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function canBeUpdated(prefix) {
	if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_2');
	var bundle = system.files.bundleAtPath(prefix + '/Applications/iBooks.app');
	if (!bundle) {
		return false;
	}
	var bundleKeyValue = bundle['CFBundleShortVersionString'];
	if (!bundleKeyValue) {
		return false;
	}
	if (system.compareVersions(bundleKeyValue, '1.0.1') &gt; 0) {
		return false;
	}
	return true;
}
function needsUpdate(prefix) {
	var bundle = system.files.bundleAtPath(prefix + '/Applications/iBooks.app');
	if (!bundle) {
		return false;
	}
	var bundleKeyValue = bundle['CFBundleShortVersionString'];
	if (!bundleKeyValue) {
		return false;
	}
	if (system.compareVersions(bundleKeyValue, '1.0.1') &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="iBooksDelta" start_selected="true" visible="needsUpdate('/')">
        <pkg-ref id="iBooksDelta" auth="Root" packageIdentifier="com.apple.pkg.iBooksDelta">iBooksDelta.pkg</pkg-ref>
        <pkg-ref id="BookKitDelta" auth="Root" packageIdentifier="com.apple.pkg.BookKitDelta">BookKitDelta.pkg</pkg-ref>
    </choice>
    <localization>
        <strings language="pl"><![CDATA["SU_TITLE" = "Uaktualnienie iBooks";
"SU_VERS" = "1.0.1";
"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>
  <meta name="Generator" content="Cocoa HTML Writer">
  <meta name="CocoaVersion" content="1070.2">
  <style type="text/css">
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Helvetica}
    p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Helvetica; min-height: 16.0px}
    li.li1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Helvetica}
    span.s1 {text-decoration: underline ; color: #264faf}
    span.s2 {text-decoration: underline ; color: #244faf}
    ul.ul1 {list-style-type: disc}
  </style>
</head>
<body><p>Ta wersja iBooks zawiera poprawki błędów i udoskonalenia w zakresie wydajności i stabilności.</p>
</body>
</html>
';
]]></strings>
    </localization>

	<pkg-ref id='BookKitDelta' installKBytes='187' version='1.0.1.0.1.1325645198'/>
	<pkg-ref id='iBooksDelta' installKBytes='24430' version='1.0.1.0.1.1325645198'/>
</installer-gui-script>