<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
    <options visibleOnlyForPredicate="true" hostArchitectures="i386" customize="never"/>
    <title>SU_TITLE</title>
    <script>
</script>
    <volume-check script="VolumeCheck()"/>
    <installation-check script="InstallationCheck()"/>
    <script>
function InstallationCheck(prefix) {
	var models = ['MacBook2,1','MacBook3,1','MacBook4,1','MacBook5,1','MacBook5,2','MacBook5,3','MacBook6,1','MacBook7,1','MacBookAir1,1','MacBookAir2,1','MacBookAir3,1','MacBookAir3,2','MacBookPro2,1','MacBookPro2,2','MacBookPro3,1','MacBookPro4,1','MacBookPro5,1','MacBookPro5,2','MacBookPro5,3','MacBookPro5,4','MacBookPro5,5','MacBookPro6,1','MacBookPro6,2','MacBookPro7,1','MacBookPro8,1','MacBookPro8,2','MacBookPro8,3','MacPro1,1','MacPro2,1','MacPro3,1','MacPro4,1','MacPro5,1','Macmini2,1','Macmini3,1','Macmini4,1','iMac5,1','iMac6,1','iMac7,1','iMac8,1','iMac9,1','iMac10,1','iMac11,1','iMac11,2','iMac11,3','iMac12,1','iMac12,2',];
	var model = system.sysctl('hw.model');
	if (models.indexOf(model) == -1) {
		my.result.message = system.localizedString('ERROR_2');
		my.result.type = 'Fatal';
		return false;
	}
	if (system.compareVersions(system.version.ProductVersion, '10.7') &lt; 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_0', '10.7');
		my.result.type = 'Fatal';
		return false;
	}
	if (system.compareVersions(system.version.ProductVersion, '10.9') > 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_1', '10.9');
		my.result.type = 'Fatal';
		return false;
	}
	my.result.message = system.localizedString('ERROR_2');
	if (!Script0("/")) {
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function Script0(prefix) {
	if (!system.ioregistry.matchingClass("ATIRadeonX1000").length == 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");
	if (!hasOS || system.compareVersions(my.target.systemVersion.ProductVersion, '10.7') &lt; 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_0', '10.7');
		my.result.type = 'Fatal';
		return false;
	}
	if (!hasOS || system.compareVersions(my.target.systemVersion.ProductVersion, '10.9') > 0) {
		my.result.message = system.localizedStringWithFormat('ERROR_1', '10.9');
		my.result.type = 'Fatal';
		return false;
	}
	return true;
}
function FileCheck1(prefix) {
	if (system.files.fileExistsAtPath(prefix + '/Library/Application Support/BootCamp/WindowsSupport.dmg') == 0) {
		return true;
	}
	return false;
}
</script>
    <tags>
        <tag>BootCamp</tag>
    </tags>
    <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="BootCampESD" start_selected="true" visible="FileCheck1('/') &amp;&amp; Script0('/')">
        <pkg-ref id="ESD" auth="Root" packageIdentifier="com.apple.pkg.BootCampESD">BootCampESD.pkg</pkg-ref>
    </choice>
    <localization>
        <strings language="English"><![CDATA["SU_TITLE" = "BootCamp";
"SU_VERS" = "1.0";
"SU_SERVERCOMMENT" = "For Desktop and Server systems";
"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>This is the BootCamp ESD update.</p>
</body>
</html>
';
]]></strings>
    </localization>

	<pkg-ref id='ESD' installKBytes='402166' version='1.0.1.1293150744'/>
</installer-gui-script>