<?xml version="1.0" encoding="UTF-8"?>
<installer-gui-script minSpecVersion='1'>
    <options customize='never'/>
    <options hostArchitectures='ppc,i386'/>
    <platforms>
        <client arch="ppc,i386"/>
        <server arch="ppc,i386"/>
    </platforms>
    <title>SU_TITLE</title>
    <license file="License.rtf" sla="EA0390"/>
    <readme file='SUDescription.html'/>
    <choices-outline ui='SoftwareUpdate'>
        <line choice='su'/>
    </choices-outline>
    <choices-outline>
        <line choice='manual'/>
    </choices-outline>
    <choice id='su' suDisabledGroupID='MacOSXUpd10.5.8'>
        <pkg-ref id='patch' auth='Root' onConclusion='RequireRestart'>MacOSXUpd10.5.8Patch.pkg</pkg-ref>
        <pkg-ref id='auto' auth='Root' onConclusion='RequireRestart'>MacOSXUpd10.5.8.pkg</pkg-ref>
    </choice>
    <choice id='manual' title='SU_TITLE'>
        <pkg-ref id='manual' auth='Root' onConclusion='RequireRestart'>MacOSXUpd10.5.8.pkg</pkg-ref>
    </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' secondaryDescription='SU_SERVERCOMMENT'/>
    <choice id='su' visible="!checkAlreadyInstalled() &amp;&amp; !isServer()"/>
    <volume-check script='volumeCheck()'/>
    <installation-check script='installationCheck()'/>
    <script>

		function installationCheck() {		
			if (system.compareVersions(system.version.ProductVersion, '10.6') >= 0) {
				my.result.type = 'Fatal';
	            my.result.message = system.localizedString('ERROR_BOOT_LEOPARD');
	            return false;
			}
			
			return true;
		}

        function volumeCheck()
        {
            if (system.env.OS_INSTALL == 1) {
                return true;
            }
            
            if (commonRequirements()) {
                return true;
            }
            
            my.result.type = 'Fatal';
            my.result.message = system.localizedString('ERROR_INSTALL');
            return false;
        }
        
        function commonRequirements()
        {
			try {
            	if(-1 == system.compareVersions(my.target.systemVersion.ProductVersion, '10.5.7')) {
                	return false;
				}
				
            	if(1 == system.compareVersions(my.target.systemVersion.ProductVersion, '10.5.8')) {
					return false;
				}
				
				if (0 == system.compareVersions(my.target.systemVersion.ProductVersion, '10.5.8')) {
					if(-1 != system.compareVersions(my.target.systemVersion.ProductBuildVersion.substring(2), '2000')) {
						return false;
					}
				}
								
				if (isServer()) {
					return false;
				}
				
            }
            catch(err) { return false; }

            return true;
        }

		function hasX11Installed() {
			return system.files.fileExistsAtPath(my.target.mountpoint + "/Applications/Utilities/X11.app/Contents/Info.plist");
		}
		
        // for SU
        function checkAlreadyInstalled()
        {
			if(0 == system.compareVersions(my.target.systemVersion.ProductVersion, '10.5.8')) {
				return true;
			}
		
			return false;
		}
		
		function isServer() {
			if(!my.target['systemVersion'].isServer){
				return false;
			}
          	return true;
        }
		
    </script>
    <localization>
        <strings language="pl"><![CDATA["SU_TITLE" = "Uaktualnienie systemu Mac OS X";
"SU_VERS" = "10.5.8";
"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>
  <style type="text/css">
	body {font: 11.0px Lucida Grande;}
    p {margin: 0.0px 0.0px 0.0px 0.0px;}
  </style>
</head>
<body>
<p>Uaktualnienie 10.5.8 jest zalecane dla wszystkich użytkowników systemu Mac OS X Leopard i zawiera ogólne poprawki zwiększające stabilność, zgodność i bezpieczeństwo tego Maca, a także rozwiązuje konkretne problemy:</p>
<p><ul>
<li>dotyczące zgodności i niezawodności podczas przyłączania do sieci AirPort,</li>
<li>brak określonych rozdzielczości monitora na liście w preferencjach systemowych,</li>
<li>mogące wpływać na niezawodność połączeń Bluetooth.</li>
</ul></p>
<p>Szczegółowe informacje o tym uaktualnieniu można znaleźć pod adresem: <a href="http://support.apple.com/kb/HT3606?viewlocale=pl_PL">http://support.apple.com/kb/HT3606</a>.</p>
<p>Szczegółowe informacje o zawartości tego uaktualnienia związanej z zabezpieczeniami można znaleźć pod adresem: <a href="http://support.apple.com/kb/HT1222?viewlocale=pl_PL">http://support.apple.com/kb/HT1222</a>.</p>
</body>
</html>
';
]]></strings>
    </localization>

	<pkg-ref id='auto' installKBytes='893858' version='1.0.1.1191932192'/>
	<pkg-ref id='manual' installKBytes='893858' version='1.0.1.1191932192'/>
	<pkg-ref id='patch' installKBytes='531390' version='1.0.1.1191932192'/>
</installer-gui-script>
