<?xml version="1.0" encoding="UTF-8"?>
<installer-gui-script minSpecVersion='1'>
    <options customize='never'/>
    <options hostArchitectures='i386'/>
    <platforms>
        <client arch="i386"/>
        <server arch="i386"/>
    </platforms>
    <title>SU_TITLE</title>
    <welcome file='SUDescription.html'/>
    <license file='License.rtf' sla='EA0493'/>
    <background file='background.tif' alignment='bottomleft' scaling='none'/>
    <!-- manual choices -->
    <choices-outline>
        <line choice='manual'/>
    </choices-outline>
    <!-- SU choices -->
    <choices-outline ui='SoftwareUpdate'>
        <line choice='su'/>
    </choices-outline>
    <choice id='manual'>
        <pkg-ref auth='Root' id='manual' onConclusion='RequireRestart'>#AirPortClientUpdate2009001.pkg</pkg-ref>
    </choice>
    <choice id='su' suDisabledGroupID='AirPortClientUpdate2009001'>
        <pkg-ref id='auto' auth='Root' onConclusion='RequireRestart'>AirPortClientUpdate2009001.pkg</pkg-ref>
    </choice>
    <choice id='su' title='SU_TITLE' versStr='SU_VERS'/>
    <choice id='su' description='SU_DESCRIPTION' description-mime-type='text/html'/>
    <choice id='su' secondaryDescription='SU_SERVERCOMMENT'/>
    <choice id='su' visible='isVisible()'/>
    <volume-check script='VolumeCheck()'/>
    <script>

      function VolumeCheck()
      {
        // must have an OS
        if(! system.files.fileExistsAtPath(my.target.mountpoint + "/System/Library/CoreServices/SystemVersion.plist")) {
           my.result.type = 'Fatal';
          my.result.message = system.localizedString('ERR_OS');
          return (false);
        }

       	// 10.5.6+
        if(-1 == system.compareVersions(my.target.systemVersion.ProductVersion, '10.5.6')) {
        	my.result.type = 'Fatal';
        	my.result.message = system.localizedString('ERR_OS');
            return (false);
        }
		
		// 10.5.7+ not allowed
        if(-1 != system.compareVersions(my.target.systemVersion.ProductVersion, '10.5.7')) {
        	my.result.type = 'Fatal';
        	my.result.message = system.localizedString('ERR_REQ');
            return (false);
        }

        var plist = system.files.plistAtPath(my.target.mountpoint + "/System/Library/Extensions/IO80211Family.kext/Contents/version.plist");
        
        if ( !plist ) {
          my.result.type = 'Fatal';
          my.result.message = system.localizedString('ERR_REQ');
          return (false);
        } 
			
        if ( plist &amp;&amp;
            ((1 == system.compareVersions(plist.CFBundleVersion, '216.0'))) ) {
          my.result.type = 'Fatal';
          my.result.message = system.localizedString('ERR_REQ');
          return (false);
        }

		if (isServer()) {
			my.result.type = 'Fatal';
            my.result.message = system.localizedString('ERR_OS');
            return (false);
		}

        // must not have tier3 loc
        if(true == system.files.fileExistsAtPath(my.target.mountpoint + "/var/db/.AppleTier3Language")) {
          my.result.type = 'Fatal';
          my.result.message = system.localizedString('ERR_TIER3');
          return (false);
        }
    
        return true;
    }

	function isServer() {
			if(!my.target['systemVersion'].isServer){
				return false;
			}
          	return true;
    }
    
    function isVisible()
    {
      var plist = system.files.plistAtPath(my.target.mountpoint + "/System/Library/Extensions/IO80211Family.kext/Contents/version.plist");

      if ( plist &amp;&amp; (-1 != system.compareVersions(plist.CFBundleVersion, '215.0')) ) {
        return false;
      }
     
	  if (isServer()){
			return (false);
	  }
		
      return true;
    }
    
  </script>
    <localization>
        <strings language="pl"><![CDATA["SU_TITLE" = "Uaktualnienie oprogramowania klienta AirPort 2009-001";
"SU_VERS" = "1.0";
"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.35">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Lucida Grande}
</style>
</head>
<body>
<p class="p1">To uaktualnienie jest zalecane dla wszystkich komputerów Macintosh z procesorem Intel, pracujących z systemem Mac OS X 10.5.6.  Rozwiązuje problemy związane z roamingiem oraz wyborem sieci w środowiskach dwuzakresowych.</p>
</body>
</html>
';
]]></strings>
    </localization>

	<pkg-ref id='auto' installKBytes='4770' version='1.0.1.1188305148'/>
</installer-gui-script>