<?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.7.5') &lt; 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_0', '10.7.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.2.2.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, '1200012002002025') &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.2.2.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, '1200012002002025') &gt;= 0) {
		return false;
	}
	return true;
}
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.2.1.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="iTunesXPatch" start_selected="true" visible="needsUpdate('/') &amp;&amp; usePatch('/')">
        <pkg-ref id="iTunesXPatch" auth="Root" packageIdentifier="com.apple.pkg.iTunesX.12.2.2.delta">iTunesXPatch.pkg<must-close>
                <app id="com.apple.iTunes"/>
                <app id="com.apple.dt.Xcode"/>
            </must-close>
        </pkg-ref>
        <pkg-ref id="iTunesXDelta" auth="Root" packageIdentifier="com.apple.pkg.iTunesX.12.2.2.delta">iTunesXDelta.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.2.2";
"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="1348.17"&gt;
  &lt;style type="text/css"&gt;
    p.p1 {margin: 0.0px 0.0px 0.0px 8.9px; text-indent: -8.9px; font: 14.0px \'Helvetica Neue\'}
    p.p2 {margin: 0.0px 0.0px 0.0px 8.9px; text-indent: -8.9px; font: 14.0px \'Helvetica Neue\'; min-height: 16.0px}
  &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p class="p1"&gt;Uaktualnienie zawiera następujące udoskonalenia:&lt;/p&gt;
&lt;p class="p2"&gt;&lt;br&gt;&lt;/p&gt;
&lt;p class="p1"&gt;• Pozwala kliknięciem w baner Beats 1 sprawdzić, jaki utwór jest aktualnie grany, lub przeglądać program stacji w poszukiwaniu godzin emisji ulubionych audycji.&lt;/p&gt;
&lt;p class="p1"&gt;• Oferuje listę wykonawców, których obserwujesz na Apple Music.&lt;/p&gt;
&lt;p class="p1"&gt;• Rozwiązuje problem, w wyniku którego program iTunes zapominał ostatnie miejsce po przejściu do poprzedniej strony Apple Music.&lt;/p&gt;
&lt;p class="p1"&gt;• Rozwiązuje problem, który mógł powodować nieprawidłowe sortowanie wykonawców na karcie Moja muzyka.&lt;/p&gt;
&lt;p class="p1"&gt;• Usuwa problem, w wyniku którego listy utworów wyświetlane w menu czynności nie były zgodne z listami w Twojej bibliotece.&lt;/p&gt;
&lt;p class="p1"&gt;• Daje wykonawcom możliwość dzielenia się refleksjami, zdjęciami, muzyką i wideo poprzez Connect, bezpośrednio z iTunes.&lt;/p&gt;
&lt;p class="p2"&gt;&lt;br&gt;&lt;/p&gt;
&lt;p class="p1"&gt;Uaktualnienie zawiera także szereg poprawek ogólnej stabilności i wydajności.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
';
</strings>
    </localization>
    <pkg-ref id="iTunesXDelta" installKBytes="106031" version="12.2.2.0.1.1188253749"/>
    <pkg-ref id="iTunesAccess" installKBytes="1176" version="12.2.2.0.1.1188253749"/>
    <pkg-ref id="CoreFP" installKBytes="28163" version="2.8.30.0.1.1188253749"/>
    <pkg-ref id="iTunesXPatch" installKBytes="71098" version="12.2.2.0.1.1188253749"/>
    <pkg-ref id="CoreADI" installKBytes="1889" version="2.9.2.0.1.1188253749"/>
    <pkg-ref id="MobileDevice" installKBytes="25338" version="4.0.0.0.1.1217269835"/>
</installer-gui-script>