<?xml version="1.0" encoding="utf-8"?>
<installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.3" authoringToolBuild="174">
    <title>Samsung Scan Driver</title>
    <options customize="never" allow-external-scripts="no" rootVolumeOnly="true"/>
    <installation-check script="pm_install_check();"/>
    <volume-check script="pm_volume_check();"/>
    <script>function verify_version()
{
return ( (system.files.fileExistsAtPath('/Library/Image Capture/Devices/Samsung Scanner.app') == false) || ((system.files.bundleAtPath('/Library/Image Capture/Devices/Samsung Scanner.app').CFBundleVersion > '2.01.03') == false) );
}

function pm_volume_check() {
  if(!(my.target.systemVersion.ProductVersion >= '10.5')) {
    my.result.title = 'Failure';
    my.result.message = 'Installation cannot proceed, as not all requirements were met.';
    my.result.type = 'Fatal';
    return false;
  }
  return true;
}


function pm_install_check() {
  if(!(system.version.ProductVersion >= '10.5')) {
    my.result.title = 'Failure';
    my.result.message = 'Installation cannot proceed, as not all requirements were met.';
    my.result.type = 'Fatal';
    return false;
  }
  return true;
}



function pm_choice9_selected() {
  result = true;
  result = result &amp;&amp; (system.version.ProductVersion &lt; '10.6');
  result = result &amp;&amp; (my.target.systemVersion.ProductVersion &lt; '10.6');
  result = result &amp;&amp; (verify_version() == true);
  return result;
}


function pm_choice9_enabled() {
  result = true;
  result = result &amp;&amp; (system.version.ProductVersion &lt; '10.6');
  result = result &amp;&amp; (my.target.systemVersion.ProductVersion &lt; '10.6');
  result = result &amp;&amp; (verify_version() == true);
  return result;
}


function pm_choice10_selected() {
  result = true;
  result = result &amp;&amp; (system.version.ProductVersion >= '10.6');
  result = result &amp;&amp; (my.target.systemVersion.ProductVersion >= '10.6');
  result = result &amp;&amp; (verify_version() == true);
  return result;
}


function pm_choice10_enabled() {
  result = true;
  result = result &amp;&amp; (system.version.ProductVersion >= '10.6');
  result = result &amp;&amp; (my.target.systemVersion.ProductVersion >= '10.6');
  result = result &amp;&amp; (verify_version() == true);
  return result;
}</script>
    <choices-outline>
        <line choice="choice9"/>
        <line choice="choice10"/>
        <line choice="choice11"/>
    </choices-outline>
    <choice id="choice9" title="10.5" customLocation="/Library/Image Capture/Devices" selected="pm_choice9_selected()" enabled="pm_choice9_enabled()">
        <pkg-ref id="com.samsung.ica.samsungScanDriver.icdmscanner.pkg"/>
    </choice>
    <choice id="choice10" title="10.6" customLocation="/Library/Image Capture/Devices" selected="pm_choice10_selected()" enabled="pm_choice10_enabled()">
        <pkg-ref id="com.samsung.ica.samsungScanDriver.icdmscanner-1.pkg"/>
    </choice>
    <choice id="choice11" title="Profiles" customLocation="/Library/Image Capture/Devices/Samsung Scanner.app/Resources">
        <pkg-ref id="com.samsung.ica.samsungScanDriver.profiles.pkg"/>
    </choice>
    <pkg-ref id="com.samsung.ica.samsungScanDriver.icdmscanner.pkg" installKBytes="1236" version="2.01.03" auth="Root">file:./Contents/Packages/icdmscanner.pkg</pkg-ref>
    <pkg-ref id="com.samsung.ica.samsungScanDriver.icdmscanner.pkg">
        <relocate search-id="pkmktoken10">
            <bundle id="com.samsung.imagecapture.scanner.app"/>
        </relocate>
    </pkg-ref>
    <pkg-ref id="com.samsung.ica.samsungScanDriver.icdmscanner-1.pkg" installKBytes="1272" version="2.01.03" auth="Root">file:./Contents/Packages/icdmscanner-1.pkg</pkg-ref>
    <pkg-ref id="com.samsung.ica.samsungScanDriver.icdmscanner-1.pkg">
        <relocate search-id="pkmktoken18">
            <bundle id="com.samsung.imagecapture.scanner.app"/>
        </relocate>
    </pkg-ref>
    <pkg-ref id="com.samsung.ica.samsungScanDriver.profiles.pkg" installKBytes="0" version="1" auth="Root">file:./Contents/Packages/profiles.pkg</pkg-ref>
    <locator>
        <search id="pkmktoken10-1" type="component">
            <bundle CFBundleIdentifier="com.samsung.imagecapture.scanner.app" path="/Library/Image Capture/Devices/Samsung Scanner.app"/>
        </search>
        <search id="pkmktoken10-0" type="script" script="pkmktoken10_combined()">
            <script>
function pkmktoken10_combined() {
	function pkmk_add_results_to_array(results, array) {
		for(i = 0; i &lt; results.length; i++)
			array.push(results[i]);
	}
	var result = new Array();
	var search;
	search = my.search.results['pkmktoken10-1'];
	if(search) pkmk_add_results_to_array(search, result);
	return result;
}
</script>
        </search>
        <search type="script" id="pkmktoken10" script="pkmktoken10_final()">
            <script>
function pkmktoken10_final() {
	var combined = my.search.results['pkmktoken10-0'];
	return combined;
}
</script>
        </search>
        <search id="pkmktoken18-1" type="component">
            <bundle CFBundleIdentifier="com.samsung.imagecapture.scanner.app" path="/Library/Image Capture/Devices/Samsung Scanner.app"/>
        </search>
        <search id="pkmktoken18-0" type="script" script="pkmktoken18_combined()">
            <script>
function pkmktoken18_combined() {
	function pkmk_add_results_to_array(results, array) {
		for(i = 0; i &lt; results.length; i++)
			array.push(results[i]);
	}
	var result = new Array();
	var search;
	search = my.search.results['pkmktoken18-1'];
	if(search) pkmk_add_results_to_array(search, result);
	return result;
}
</script>
        </search>
        <search type="script" id="pkmktoken18" script="pkmktoken18_final()">
            <script>
function pkmktoken18_final() {
	var combined = my.search.results['pkmktoken18-0'];
	return combined;
}
</script>
        </search>
    </locator>
</installer-script>