<?xml version="1.0" encoding="UTF-8"?>
<installer-gui-script minSpecVersion='1'>
    <title>SU_TITLE</title>
    <license file="License.rtf"/>
    <readme file="ReadMe.rtf"/>
    <background file="background.tiff" scaling="none" alignment="bottomleft"></background>
    <options hostArchitectures='i386,ppc' customize='never'/>
    <platforms>
        <client arch="i386,ppc"/>
        <server arch="i386,ppc"/>
    </platforms>
    <!-- Manual Install package layout -->
    <choices-outline>
        <line choice='manPPC'/>
        <line choice='manIntel'/>
    </choices-outline>
    <choice id='manPPC' title="SU_TITLE" versStr='SU_VERS' enabled='false' selected='!isIntel()'>
        <pkg-ref id='com.apple.pkg.VoiceOverMacPPC' auth='Root'>file:./Contents/Installers/VoiceOverMacPPC.pkg</pkg-ref>
    </choice>
    <choice id='manIntel' title="SU_TITLE" versStr='SU_VERS' enabled='false' selected='isIntel()'>
        <pkg-ref id='com.apple.pkg.VoiceOverMacIntel' auth='Root'>file:./Contents/Installers/VoiceOverMacIntel.pkg</pkg-ref>
    </choice>
    <!-- Software Update package layout -->
    <choices-outline ui='SoftwareUpdate'>
        <line choice='su'/>
    </choices-outline>
    <choices-outline ui='invisible'>
        <line choice='suIntel'/>
        <line choice='suPPC'/>
    </choices-outline>
    <choice id='suPPC' selected="((typeof(choices.su) != &quot;undefined&quot;) &amp;&amp; !isIntel())">
        <pkg-ref id='autoPPC' auth='Root'>VoiceOverMacPPC.pkg</pkg-ref>
    </choice>
    <choice id='suIntel' selected="((typeof(choices.su) != &quot;undefined&quot;) &amp;&amp; isIntel())">
        <pkg-ref id='autoIntel' auth='Root'>VoiceOverMacIntel.pkg</pkg-ref>
    </choice>
    <choice id='su' suDisabledGroupID='iPodVoiceOverKit'></choice>
    <choice id='su' title='SU_TITLE'/>
    <choice id='su' versStr='SU_VERS'/>
    <choice id='su' description='SU_DESCRIPTION' description-mime-type='text/html'/>
    <choice id='su' visible='!alreadyInstalled()'/>
    <volume-check script="VolumeCheck()"/>
    <script>

    function VolumeCheck()
    {
    
		if(system.compareVersions(my.target.systemVersion.ProductVersion, '10.4.11') == -1) {
					      my.result.message = system.localizedString('OS_VER_ERR');
					      my.result.type = 'Fatal';                                                                                               
					      return false;
		}

		if (system.compareVersions(my.target.systemVersion.ProductVersion, '10.7.0') != -1){
			// must have iTunes less than 10.4
			var ITPlist = system.files.plistAtPath(my.target.mountpoint + "/Applications/iTunes.app/Contents/Info.plist");
	        if (!ITPlist || (-1 == system.compareVersions(ITPlist.CFBundleShortVersionString, "8.1")) || (-1 != system.compareVersions(ITPlist.CFBundleShortVersionString, "10.4"))) {
	            my.result.type = 'Fatal';
	            my.result.message = system.localizedStringWithFormat('ERR_ITVERSION');
	            return false;
	        }
		}
        
		
        if ( system.compareVersions(my.target.systemVersion.ProductVersion, '10.8.0') != -1 ) {
            my.result.message = system.localizedString('OS_HIGH_ERR');
            my.result.type = 'Fatal';
            return false;
        }

        return true;
    }
	function alreadyInstalled()
        {
			try {
				var filename = my.target.mountpoint + "/Library/Application Support/iTunes/iPodVoiceOver.framework/Versions/A/Resources/version.plist";
				if ( !system.files.fileExistsAtPath(filename) ) {
					//not installed but file not set so don't show up
					return true;
				}
				var plist = system.files.plistAtPath(filename);
				if (plist &amp;&amp; (-1 != system.compareVersions(plist.CFBundleShortVersionString, "1.4.0"))) {
					//already installed
					return true;
				}
			}
			catch(err) { return false; }
	        return(false);
        }

	function isIntel()
	{
		if ( system.sysctl('hw.machine') != 'x86' &amp;&amp; system.sysctl('hw.byteorder') != '1234'){
			return false;
		}
		return true;
	}
    </script>
    <localization>
        <strings language="pl"><![CDATA["SU_TITLE" = "VoiceOver Kit dla iPoda";
"SU_VERS" = "1.4";
"SU_SERVERCOMMENT" = "Dla komputerów klienckich";

"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="949.43">
  <style type="text/css">
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Lucida Grande; min-height: 15.0px}
    p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Lucida Grande}
    p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Lucida Grande; color: #244fab}
    span.s1 {letter-spacing: 0.0px}
    span.s2 {color: #000f95}
    span.s3 {text-decoration: underline ; letter-spacing: 0.0px color: #244fab}
    span.Apple-tab-span {white-space:pre}
    ul.ul2 {list-style-type: disc}
  </style>
</head>
<body>
<p class="p2">Pakiet VoiceOver Kit pozwala na iPodzie shuffle (3. oraz 4. generacji) oraz na iPodzie nano (5. generacji) odczytywać nazwy list, utworów i wykonawców, a także komunikaty o stanie baterii i inne. </p>	
<p class="p1"><br></p>
<p class="p2"><b>Co nowego w tej wersji?</b></p>
<p class="p2">&nbsp;•&nbsp;Poprawiono wymowę nazw wielu wykonawców oraz tytułów utworów.</p>
<p class="p2">&nbsp;•&nbsp;Poprawiono głosy języka koreańskiego, niemieckiego oraz rosyjskiego.</p>
<p class="p2">&nbsp;•&nbsp;Wprowadzono obsługę języka węgierskiego, rumuńskiego, słowackiego oraz tajskiego w iPodzie shuffle (4. generacji).</p>
<p class="p1"><br></p>
<p class="p2"><span class="s1">Dodatkowe informacje o pakiecie VoiceOver Kit oraz zgodnych z nim iPodach można znaleźć pod adresem:</span></p>
<p class="p3"><span class="s2"><span class="Apple-tab-span">	</span><a href="http://support.apple.com/kb/HT4046?viewlocale=pl_PL"><span class="s3">http://support.apple.com/kb/HT4046?viewlocale=pl_PL</span></a></span>.</p>
<p class="p1"><br></p>
</body>
</html>
';
]]></strings>
    </localization>
</installer-gui-script>