<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
    <options hostArchitectures="i386" customize="never"/>
    <title>SU_TITLE</title>
    <script/>
    <installation-check script="InstallationCheck()"/>
    <script>
function InstallationCheck(prefix) {
	if (system.compareVersions(system.version.ProductVersion, '10.8.5') &lt; 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_0', '10.8.5');
		my.result.type = 'Fatal';
		return false;
	}
	my.result.message = system.localizedString('ERROR_1');
	if (!dontDowngrade("/")) {
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function dontDowngrade(prefix) {
	if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_2');
	if (iTunesAppOlderOrEqual(prefix) &amp;&amp; sourceVersionOlderOrEqual(prefix)) {
		return true;
	}
	return false;
}
function iTunesAppOlderOrEqual(prefix) {
	var bundle = system.files.bundleAtPath(prefix + '/Applications/iTunes.app');
	if (!bundle) {
		return true;
	}
	var bundleKeyValue = bundle['CFBundleShortVersionString'];
	if (!bundleKeyValue) {
		return true;
	}
	if (system.compareVersions(bundleKeyValue, '12.4.3.0') &gt; 0) {
		return false;
	}
	return true;
}
function sourceVersionOlderOrEqual(prefix) {
	var bundle = system.files.bundleAtPath(prefix + '/Applications/iTunes.app');
	if (!bundle) {
		return true;
	}
	var bundleKeyValue = bundle['SourceVersion'];
	if (!bundleKeyValue) {
		return true;
	}
	if (system.compareVersions(bundleKeyValue, '1200012004003001') &gt; 0) {
		return false;
	}
	return true;
}
function needsUpdate(prefix) {
	if (iTunesAppOlder(prefix) &amp;&amp; sourceVersionOlder(prefix)) {
		return true;
	}
	return false;
}
function iTunesAppOlder(prefix) {
	var bundle = system.files.bundleAtPath(prefix + '/Applications/iTunes.app');
	if (!bundle) {
		return true;
	}
	var bundleKeyValue = bundle['CFBundleShortVersionString'];
	if (!bundleKeyValue) {
		return true;
	}
	if (system.compareVersions(bundleKeyValue, '12.4.3.0') &gt;= 0) {
		return false;
	}
	return true;
}
function sourceVersionOlder(prefix) {
	var bundle = system.files.bundleAtPath(prefix + '/Applications/iTunes.app');
	if (!bundle) {
		return true;
	}
	var bundleKeyValue = bundle['SourceVersion'];
	if (!bundleKeyValue) {
		return true;
	}
	if (system.compareVersions(bundleKeyValue, '1200012004003001') &gt;= 0) {
		return false;
	}
	return true;
}
function dontUsePatch(prefix) {
	if (!(usePatch(prefix))) {
		return true;
	}
	return false;
}
function usePatch(prefix) {
	var bundle = system.files.bundleAtPath(prefix + '/Applications/iTunes.app');
	if (!bundle) {
		return false;
	}
	var bundleKeyValue = bundle['CFBundleShortVersionString'];
	if (!bundleKeyValue) {
		return false;
	}
	if (system.compareVersions(bundleKeyValue, '12.4.2.0') != 0) {
		return false;
	}
	return true;
}
function installMobileDevice(prefix) {
	if (system.files.fileExistsAtPath(prefix + '/tmp/com.apple.mpkg.iTunes.noAMDS') == 0) {
		return true;
	}
	return false;
}
</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="iTunesX" start_selected="true" visible="needsUpdate('/') &amp;&amp; dontUsePatch('/')">
        <pkg-ref id="iTunesX" auth="Root" packageIdentifier="com.apple.pkg.iTunesX">iTunesX.pkg<must-close>
                <app id="com.apple.iTunes"/>
                <app id="com.apple.dt.Xcode"/>
            </must-close>
        </pkg-ref>
        <pkg-ref id="iTunesAccess" auth="Root" packageIdentifier="com.apple.pkg.iTunesAccess">iTunesAccess.pkg</pkg-ref>
        <pkg-ref id="CoreFP" auth="Root" packageIdentifier="com.apple.pkg.CoreFP">CoreFP.pkg</pkg-ref>
        <pkg-ref id="CoreADI" auth="Root" packageIdentifier="com.apple.pkg.CoreADI">CoreADI.pkg</pkg-ref>
        <pkg-ref id="MobileDevice" auth="Root" packageIdentifier="com.apple.pkg.MobileDevice" active="installMobileDevice('/')">MobileDevice.pkg<must-close>
                <app id="com.apple.dt.Xcode"/>
                <app id="com.apple.PurpleRestore"/>
                <app id="com.apple.AppleConfigurationUtility"/>
                <app id="com.apple.configurator"/>
                <app id="com.apple.iTunes"/>
                <app id="com.apple.iPhoto"/>
                <app id="com.apple.Aperture"/>
            </must-close>
        </pkg-ref>
    </choice>
    <localization>
        <strings language="pl">"SU_TITLE" = "iTunes";
"SU_VERS" = "12.4.3";
"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="1404.47"&gt;
  &lt;style type="text/css"&gt;
    p.p1 {margin: 0.0px 0.0px 10.0px 0.0px; font: 14.0px \'Helvetica Neue\'}
    span.s1 {font-kerning: none}
  &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;To uaktualnienie rozwiązuje problem, w wyniku którego zmiany list utworów dokonywane na innych urządzeniach mogły nie pojawiać się w iTunes.&lt;/span&gt;&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
';
</strings>
    </localization>
    <pkg-ref id="iTunesAccess" installKBytes="1108" version="12.4.3.0.1.1188253749"/>
    <pkg-ref id="CoreFP" installKBytes="28967" version="2.10.6.0.1.1188253749"/>
    <pkg-ref id="iTunesX" installKBytes="172442" version="12.4.3.0.1.1188253749"/>
    <pkg-ref id="CoreADI" installKBytes="1948" version="2.9.2.0.1.1188253749"/>
    <pkg-ref id="MobileDevice" installKBytes="45475" version="4.0.0.0.1.1456965519"/>
</installer-gui-script>