<?xml version="1.0" encoding="UTF-8"?>
<installer-gui-script minSpecVersion="1">
    <options hostArchitectures="ppc,i386" customize="never" rootVolumeOnly="true"/>
    <title>SU_TITLE</title>
    <script>
</script>
    <volume-check script="VolumeCheck()"/>
    <installation-check script="InstallationCheck()"/>
    <script>
function InstallationCheck(prefix) {
	if (system.compareVersions(system.version.ProductVersion, '10.5') &lt; 0 || system.compareVersions(system.version.ProductVersion, '10.6') >= 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_0', '10.5');
		my.result.type = 'Fatal';
		return false;
	}
	if (system.compareVersions(system.version.ProductVersion, '10.5.8') &lt; 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_1', '10.5.8');
		my.result.type = 'Fatal';
		return false;
	}
	my.result.message = system.localizedString('ERROR_2');
	if (!ExistingNotTooNew("/") || !ExistingNotTooOld("/")) {
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function ExistingNotTooNew(prefix) {
	if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_3');
	var plist = system.files.plistAtPath(prefix + '/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Info.plist');
	if (!plist) {
		return true;
	}
	var plistKeyValue = plist['CFBundleShortVersionString'];
	if (!plistKeyValue) {
		return true;
	}
	if (system.compareVersions(plistKeyValue, '12.9.0') > 0) {
		return false;
	}
	return true;
}
function ExistingNotTooOld(prefix) {
	if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_4');
	var plist = system.files.plistAtPath(prefix + '/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Info.plist');
	if (!plist) {
		return true;
	}
	var plistKeyValue = plist['CFBundleShortVersionString'];
	if (!plistKeyValue) {
		return true;
	}
	if (system.compareVersions(plistKeyValue, '12.4.1') &lt; 0) {
		return false;
	}
	return true;
}
function VolumeCheck(prefix) {
	if (system.env.OS_INSTALL == 1) return true;
	var hasOS = system.files.fileExistsAtPath(my.target.mountpoint + "/System/Library/CoreServices/SystemVersion.plist");
	my.result.message = system.localizedString('ERROR_5');
	if (!NotTier3(my.target.mountpoint) || !DestSystemVersion(my.target.mountpoint)) {
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function NotTier3(prefix) {
	if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_6');
	if (system.files.fileExistsAtPath(prefix + '/var/db/.AppleTier3Language') == 0) {
		return true;
	}
	return false;
}
function DestSystemVersion(prefix) {
	if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_7');
	if (!my.target.systemVersion) {
		return false;
	}
	return true;
}
function NeedsUpgrade(prefix) {
	var plist = system.files.plistAtPath(prefix + '/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Info.plist');
	if (!plist) {
		return true;
	}
	var plistKeyValue = plist['CFBundleShortVersionString'];
	if (!plistKeyValue) {
		return true;
	}
	if (system.compareVersions(plistKeyValue, '12.9.0') >= 0) {
		return false;
	}
	return true;
}
</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="JavaForMacOSX10.5Update10" visible="NeedsUpgrade('/')">
        <pkg-ref id="JavaForMacOSX10.5Update" auth="Root" packageIdentifier="com.apple.pkg.JavaForMacOSX10.5Update10">JavaForMacOSX10.5Update10.pkg</pkg-ref>
    </choice>
    <localization>
        <strings language="pl"><![CDATA["SU_TITLE" = "Java dla Mac OS X 10.5, uaktualnienie 10";
"SU_VERS" = "1.0";
"SU_SERVERCOMMENT" = "Dla komputerów klienckich i serwerów";
"SU_DESCRIPTION" = '<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="1038.35">
  <style type="text/css">
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px \'Lucida Grande\'}
    p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px \'Lucida Grande\'; min-height: 15.0px}
  </style>
</head>
<body>
<p class="p1">Java dla Mac OS X 10.5, uaktualnienie 10 zawiera poprawki zgodności, bezpieczeństwa oraz niezawodności. Uaktualnia J2SE 5.0 do wersji 1.5.0_30, natomiast Java SE 6 uaktualnia do wersji 1.6.0_26 w 64-bitowych Macach z procesorem Intel.<span class="Apple-converted-space">  </span>Pakiet J2SE 1.4.2 nie jest już uaktualniany i żadne błędy ani problemy bezpieczeństwa w nim wykryte nie są poprawiane. Pakiet w tym uaktualnieniu zostaje domyślnie wyłączony.</p>
<p class="p2"><br></p>
<p class="p1">Przed zainstalowaniem tego uaktualnienia zamknij wszystkie przeglądarki Internetu oraz programy Java.</p>
<p class="p2"><br></p>
<p class="p1">Więcej informacji o tym uaktualnieniu można znaleźć pod adresem <a href="http://support.apple.com/kb/HT4592?viewlocale=pl_PL">http://support.apple.com/kb/HT4592?viewlocale=pl_PL</a>.</p>
<p class="p2"><br></p>
<p class="p1">Informacje na temat 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?viewlocale=pl_PL</a>.</p>
</body>
</html>
';
]]></strings>
    </localization>

	<pkg-ref id='JavaForMacOSX10.5Update' installKBytes='145195' version='10.5.0.10.1.1192168948'/>
</installer-gui-script>