<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<installer-gui-script minSpecVersion="2">
    <title>eID Middleware</title>
    <options hostArchitectures="x86_64,arm64"/>
    <options customize="never" rootVolumeOnly="true"/>
    <script>
      <![CDATA[
	function osx_before_yosemite() {
	 system.log('system OS version ' + system.version.ProductVersion + ' detected');
	 if((system.compareVersions(system.version.ProductVersion, '10.10')) == -1)
	 {
	  return true;
	 }
	 else
	 {
	  return false;
	 }
	}
	function osx_before_elcapitan() {
	 if((system.compareVersions(system.version.ProductVersion, '10.11')) == -1)
	 {
	  return true;
	 }
	 else
	 {
	  return false;
	 }
	}
	function osx_before_sierra() {
	 if((system.compareVersions(system.version.ProductVersion, '10.12')) == -1)
	 {
	  return true;
	 }
	 else
	 {
	  return false;
	 }
	}
	function macos_after_elcapitan() {
	 if((system.compareVersions(system.version.ProductVersion, '10.12')) >= 0)
	 {
	  return true;
	 }
	 else
	 {
	  return false;
	 }
	}
      ]]>
    </script>
    <readme file="ReadMe.rtf"/>
    <license file="license.rtf"/>
    <background file="eid.png" scaling="proportional" alignment="bottomleft" mime-type="image/png"/>
    <allowed-os-versions>
        <os-version min="10.9.0" />
    </allowed-os-versions>    
    <options customize="never" require-scripts="false"/>
    <choices-outline>
        <line choice="eid.belgium.be"/>
	<line choice="eid.belgium.tokend"/>
        <line choice="com.acs.acsccid"/>
	<line choice="com.acs.ccid_remove_acs"/>
	<line choice="org.opensc.pcscd_autostart"/>
	<line choice="beidtoken"/>
    </choices-outline>
    <choice id="eid.belgium.be" visible="false">
        <pkg-ref id="eid.belgium.be"/>
    </choice>
    <choice id="eid.belgium.tokend" visible="false" selected="osx_before_sierra()">
        <pkg-ref id="eid.belgium.tokend"/>
    </choice>
    <choice id="com.acs.acsccid" visible="false" selected="osx_before_elcapitan()">
        <pkg-ref id="com.acs.acsccid"/>
    </choice>
    <choice id="com.acs.ccid_remove_acs" visible="false" selected="osx_before_elcapitan()">
        <pkg-ref id="com.acs.ccid_remove_acs"/>
    </choice>
    <choice id="org.opensc.pcscd_autostart" visible="false" selected="osx_before_yosemite()">
        <pkg-ref id="org.opensc.pcscd_autostart"/>
    </choice>
    <choice id="beidtoken" visible="false" selected="macos_after_elcapitan()">
        <pkg-ref id="beidtoken"/>
    </choice>

    <pkg-ref id="eid.belgium.be" onConclusion="none">beidbuild.pkg</pkg-ref>
    <pkg-ref id="eid.belgium.tokend" onConclusion="none">beidtokend.pkg</pkg-ref>
    <pkg-ref id="com.acs.acsccid" onConclusion="none">acsccid_flat.pkg</pkg-ref>
    <pkg-ref id="com.acs.ccid_remove_acs" onConclusion="none">ccid_remove_acs_flat.pkg/</pkg-ref>
    <pkg-ref id="org.opensc.pcscd_autostart" onConclusion="RequireRestart">pcscd_autostart_flat.pkg</pkg-ref>
    <pkg-ref id="beidtoken" onConclusion="none">BEIDToken.pkg</pkg-ref>
</installer-gui-script>