<?xml version="1.0" encoding="utf-8"?>
<installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.3" authoringToolBuild="174">
    <title>AJA KonaLHi - 6.5.0</title>
    <options customize="always" allow-external-scripts="yes" rootVolumeOnly="false"/>
    <volume-check script="pm_volume_check();"/>
    <script>function driverCanInstall()
{
	var path = "/Library/Preferences/com.aja.driver.plist";

	if(system.files.fileExistsAtPath(path) == false)
		return true;

	var installedVersion = system.files.plistAtPath(path)['Version'];
	if(installedVersion == null)
		return true;

	var newVersion = "6.5.0";

	if(system.compareVersions(installedVersion,newVersion) == 1)
	{
		system.runOnce('wrongVersionMsg.rb',"driver",installedVersion,newVersion);
		return false;
	}

	return true;
}

function setupsCanInstall()
{
	var path = "/Library/Preferences/com.aja.easysetups.plist";

	if(system.files.fileExistsAtPath(path) == false)
		return true;

	var installedVersion = system.files.plistAtPath(path)['Version'];
	if(installedVersion == null)
		return true;

	var newVersion = "6.5.0";

	if(system.compareVersions(installedVersion,newVersion) == 1)
	{
		system.runOnce('wrongVersionMsg.rb',"easy setups",installedVersion,newVersion);
		return false;
	}

	return true;	
}

function pm_volume_check() {
  if(!(my.target.systemVersion.ProductVersion >= '10.5')) {
    my.result.title = 'Failure';
    my.result.message = 'This update requires Mac OS 10.5.0 or higher.';
    my.result.type = 'Fatal';
    return false;
  }
  return true;
}



function pm_choicedriver_startSelected() {
  result = true;
  result = result &amp;&amp; (driverCanInstall() == true);
  return result;
}


function pm_choicedriver_startEnabled() {
  result = true;
  result = result &amp;&amp; (driverCanInstall() == true);
  return result;
}


function pm_choicesetups_selected() {
  result = true;
  result = result &amp;&amp; (setupsCanInstall() == true);
  return result;
}


function pm_choicesetups_enabled() {
  result = true;
  result = result &amp;&amp; (setupsCanInstall() == true);
  return result;
}


function pm_choicesetups_startSelected() {
  result = true;
  result = result &amp;&amp; (setupsCanInstall() == true);
  return result;
}


function pm_choicesetups_startEnabled() {
  result = true;
  result = result &amp;&amp; (setupsCanInstall() == true);
  return result;
}</script>
    <background file="background" alignment="topleft" scaling="tofit"/>
    <welcome file="Welcome"/>
    <readme file="ReadMe"/>
    <license file="License"/>
    <choices-outline>
        <line choice="choicedriver"/>
        <line choice="choicesetups">
            <line choice="choicebase"/>
            <line choice="choice141"/>
            <line choice="choice140"/>
            <line choice="choice143"/>
            <line choice="choice142"/>
            <line choice="choice144"/>
            <line choice="choice147"/>
            <line choice="choice145"/>
            <line choice="choice139"/>
            <line choice="choice138"/>
            <line choice="choice193"/>
            <line choice="choice146"/>
        </line>
    </choices-outline>
    <choice id="choicedriver" title="Driver" description="Driver for Kona LHi." start_selected="pm_choicedriver_startSelected()" start_enabled="pm_choicedriver_startEnabled()">
        <pkg-ref id="com.aja.KonaLHi.pkg"/>
    </choice>
    <choice id="choicesetups" title="Kona LHi Setups" start_selected="pm_choicesetups_startSelected()" start_enabled="pm_choicesetups_startEnabled()" selected="pm_choicesetups_selected()" enabled="pm_choicesetups_enabled()"/>
    <choice id="choicebase" title="Base" description="This installs 720p50, 720p59.94, 1080i25, 1080i29.97, 1080psf23.98 Easy Setups in 8 and 10bit Uncompressed, Apple ProRes 422 (HQ), and Apple ProRes 422 formats. This also installs PAL and NTSC Easy Setups in 8 and 10bit Uncompressed, Apple ProRes 422 (HQ), Apple ProRes 422, DV, DVCPro, and DVCPro50 formats" start_selected="pm_choicesetups_startSelected()"   enabled="pm_choicesetups_enabled()">
        <pkg-ref id="com.aja.konalhi.konalhiBaseEasySetups.pkg"/>
    </choice>
    <choice id="choice141" title="Additional 23.98/24 fps" description="This installs 1080p23.98 and 1080psf24 Easy Setups in 8 and 10bit Uncompressed, Apple ProRes 422 (HQ), and Apple ProRes 422 formats. This set also installs NTSC 23.98 Easy Setups" start_selected="false"  enabled="pm_choicesetups_enabled()">
        <pkg-ref id="com.aja.konalhi.konalhiAdditional239824FpsEasySetups.pkg"/>
    </choice>
    <choice id="choice140" title="Additional 23.98/24 fps DVCProHD" description="This installs 1080psf23.98 and 1080psf24 Easy Setups in the DVCProHD format" start_selected="false"  enabled="pm_choicesetups_enabled()">
        <pkg-ref id="com.aja.konalhi.konalhiAdditional239824FpsDvcprohdEasySetups.pkg"/>
    </choice>
    <choice id="choice143" title="Additional 25/50 fps" description="This installs 720p25 Easy Setups in 8 and 10bit Uncompressed, Apple ProRes 422 (HQ), and Apple ProRes 422 formats" start_selected="false"  enabled="pm_choicesetups_enabled()">
        <pkg-ref id="com.aja.konalhi.konalhiAdditional2550FpsEasySetups.pkg"/>
    </choice>
    <choice id="choice142" title="Additional 25/50 fps DVCProHD" description="This installs 720p25, 1080i25 and 1080i25 Easy Setups in the DVCProHD format" start_selected="false"  enabled="pm_choicesetups_enabled()">
        <pkg-ref id="com.aja.konalhi.konalhiAdditional2550FpsDvcprohdEasySetups.pkg"/>
    </choice>
    <choice id="choice144" title="Additional 29.97/30 fps DVCProHD" description="This installs 1080i29.97 Easy Setups in the DVCProHD format" start_selected="false"  enabled="pm_choicesetups_enabled()">
        <pkg-ref id="com.aja.konalhi.konalhiAdditional299730FpsDvcprohdEasySetups.pkg"/>
    </choice>
    <choice id="choice147" title="Additional 59.94/60 fps" description="This installs 1080p59.94 Easy Setups in 8 and 10bit Uncompressed, Apple ProRes 422 (HQ), and Apple ProRes 422 formats" start_selected="false"  enabled="pm_choicesetups_enabled()">
        <pkg-ref id="com.aja.konalhi.konalhiAdditional599460FpsEasySetups.pkg"/>
    </choice>
    <choice id="choice145" title="Additional 59.94/60 fps DVCProHD" description="This installs 720p59.94 Easy Setups in the DVCProHD format" start_selected="false"  enabled="pm_choicesetups_enabled()">
        <pkg-ref id="com.aja.konalhi.konalhiAdditional599460FpsDvcprohdEasySetups.pkg"/>
    </choice>
    <choice id="choice139" title="720/1080 VFR" description="This installs 720p23.98, 720p25 and 1080p23.98 VFR Easy Setups in 8 and 10bit Uncompressed, Apple ProRes 422 (HQ), and Apple ProRes 422 formats" start_selected="false"  enabled="pm_choicesetups_enabled()">
        <pkg-ref id="com.aja.konalhi.konalhi7201080VfrEasySetups.pkg"/>
    </choice>
    <choice id="choice138" title="720/1080 VFR DVCProHD" description="This installs 720p23.98, 720p25 and 1080p23.98 VFR Easy Setups in the DVCProHD format" start_selected="false"  enabled="pm_choicesetups_enabled()">
        <pkg-ref id="com.aja.konalhi.konalhi7201080VfrDvcprohdEasySetups.pkg"/>
    </choice>
    <choice id="choice193" title="IMX50Mb" description="This installs NTSC and PAL Easy Setups in IMX50Mb format" start_selected="false"  enabled="pm_choicesetups_enabled()">
        <pkg-ref id="com.aja.konalhi.konalhiImx50MbEasySetups.pkg"/>
    </choice>
    <choice id="choice146" title="HDV" description="This installs 720p30, 1080i50 and 1080i60 Easy Setups in the HDV format" start_selected="false"  enabled="pm_choicesetups_enabled()">
        <pkg-ref id="com.aja.konalhi.konalhiHdvEasySetups.pkg"/>
    </choice>
    <pkg-ref id="com.aja.KonaLHi.pkg" installKBytes="18812" version="1" auth="Root" onConclusion="RequireRestart">file:./Contents/Packages/KonaLHi.pkg</pkg-ref>
    <pkg-ref id="com.aja.konalhi.konalhiBaseEasySetups.pkg" installKBytes="376" version="" auth="Root">file:./Contents/Packages/KonaLHi%20Base%20Easy%20Setups.pkg</pkg-ref>
    <pkg-ref id="com.aja.konalhi.konalhiAdditional239824FpsEasySetups.pkg" installKBytes="96" version="" auth="Root">file:./Contents/Packages/KonaLHi%20Additional%2023.98:24%20fps%20Easy%20Setups.pkg</pkg-ref>
    <pkg-ref id="com.aja.konalhi.konalhiAdditional239824FpsDvcprohdEasySetups.pkg" installKBytes="16" version="" auth="Root">file:./Contents/Packages/KonaLHi%20Additional%2023.98:24%20fps%20DVCProHD%20Easy%20Setups.pkg</pkg-ref>
    <pkg-ref id="com.aja.konalhi.konalhiAdditional2550FpsEasySetups.pkg" installKBytes="96" version="" auth="Root">file:./Contents/Packages/KonaLHi%20Additional%2025:50%20fps%20Easy%20Setups.pkg</pkg-ref>
    <pkg-ref id="com.aja.konalhi.konalhiAdditional2550FpsDvcprohdEasySetups.pkg" installKBytes="32" version="" auth="Root">file:./Contents/Packages/KonaLHi%20Additional%2025:50%20fps%20DVCProHD%20Easy%20Setups.pkg</pkg-ref>
    <pkg-ref id="com.aja.konalhi.konalhiAdditional299730FpsDvcprohdEasySetups.pkg" installKBytes="8" version="" auth="Root">file:./Contents/Packages/KonaLHi%20Additional%2029.97:30%20fps%20DVCProHD%20Easy%20Setups.pkg</pkg-ref>
    <pkg-ref id="com.aja.konalhi.konalhiAdditional599460FpsEasySetups.pkg" installKBytes="48" version="" auth="Root">file:./Contents/Packages/KonaLHi%20Additional%2059.94:60%20fps%20Easy%20Setups.pkg</pkg-ref>
    <pkg-ref id="com.aja.konalhi.konalhiAdditional599460FpsDvcprohdEasySetups.pkg" installKBytes="16" version="" auth="Root">file:./Contents/Packages/KonaLHi%20Additional%2059.94:60%20fps%20DVCProHD%20Easy%20Setups.pkg</pkg-ref>
    <pkg-ref id="com.aja.konalhi.konalhi7201080VfrEasySetups.pkg" installKBytes="144" version="" auth="Root">file:./Contents/Packages/KonaLHi%20720:1080%20VFR%20Easy%20Setups.pkg</pkg-ref>
    <pkg-ref id="com.aja.konalhi.konalhi7201080VfrDvcprohdEasySetups.pkg" installKBytes="24" version="" auth="Root">file:./Contents/Packages/KonaLHi%20720:1080%20VFR%20DVCProHD%20Easy%20Setups.pkg</pkg-ref>
    <pkg-ref id="com.aja.konalhi.konalhiImx50MbEasySetups.pkg" installKBytes="16" version="" auth="Root">file:./Contents/Packages/KonaLHi%20IMX50Mb%20Easy%20Setups.pkg</pkg-ref>
    <pkg-ref id="com.aja.konalhi.konalhiHdvEasySetups.pkg" installKBytes="48" version="" auth="Root">file:./Contents/Packages/KonaLHi%20HDV%20Easy%20Setups.pkg</pkg-ref>
</installer-script>
