<?xml version="1.0"?>
<installer-gui-script minSpecVersion="2">
    <title>Folding@home Client 8.5.6</title>
    <options allow-external-scripts="no" customize="ask" hostArchitectures="x86_64,arm64" rootVolumeOnly="true"/>
    <domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/>
    <welcome file="Welcome.rtf"/>
    <license file="LICENSE.txt"/>
    <readme file="Readme.rtf"/>
    <conclusion file="Conclusion.rtf"/>
    <background alignment="bottomleft" file="fah-opacity-50.png" mime-type="image/png" scaling="none"/>
    <background-darkAqua alignment="bottomleft" file="fah-opacity-50.png" mime-type="image/png" scaling="none"/>
    <installation-check script="install_check();"/>
    <volume-check script="volume_check();">
        <allowed-os-versions>
            <os-version min="10.13"/>
        </allowed-os-versions>
    </volume-check>
    <choices-outline>
        <line choice="fahclient"/>
    </choices-outline>
    <choice id="fahclient" title="FAHClient" description="FAH_CLIENT_DESC">
        <pkg-ref id="org.foldingathome.fahclient.pkg"/>
    </choice>
    <pkg-ref id="org.foldingathome.fahclient.pkg" auth="Root">#FAHClient.pkg</pkg-ref>
    <pkg-ref id="org.foldingathome.fahclient.pkg" version="8.5.6" installKBytes="79057">
        <must-close>
            <app id="org.foldingathome.fahviewer"/>
            <app id="org.foldingathome.fahcontrol"/>
            <app id="edu.stanford.folding.fahviewer"/>
            <app id="edu.stanford.folding.fahcontrol"/>
        </must-close>
        <bundle-version/>
    </pkg-ref>
    <script><![CDATA[

function is_min_version(ver) {
  if (my.target && my.target.systemVersion &&
    system.compareVersions(my.target.systemVersion.ProductVersion, ver) >= 0)
    return true;
  return false;
}
function have_64_bit_cpu() {
  if (system.sysctl('hw.optional.x86_64'))
    return true;
  if (system.sysctl('hw.cpu64bit_capable'))
    return true;
  if (system.sysctl('hw.optional.64bitops'))
    return true;
  return false;
}
function volume_check() {
  if (!is_min_version('10.13')) {
    my.result.title = 'Unable to Install';
    my.result.message = 'macOS 10.13 or later is required.';
    my.result.type = 'Fatal';
    return false;
  }
  return true;
}
function install_check() {
  return true;
}

]]></script>
    <product version="8.5.6"/>
</installer-gui-script>