<?xml version="1.0" encoding="utf-8"?>
<!--
  Printhop 2.2.0 for macOS (Intel), filled in by
  packaging/gui/build-pkg.sh. One package per processor: the updater
  replaces the binary with the signed release for the same artefact
  (darwin-arm64 or darwin-amd64), so a universal binary would not match.
-->
<installer-gui-script minSpecVersion="2">
  <title>Printhop</title>
  <welcome file="welcome.html" mime-type="text/html"/>
  <conclusion file="conclusion.html" mime-type="text/html"/>
  <options customize="never" require-scripts="true" rootVolumeOnly="true" hostArchitectures="arm64,x86_64"/>
  <domains enable_localSystem="true" enable_anywhere="false" enable_currentUserHome="false"/>
  <allowed-os-versions>
    <os-version min="13.0"/>
  </allowed-os-versions>
  <volume-check>
    <allowed-os-versions>
      <os-version min="13.0"/>
    </allowed-os-versions>
  </volume-check>
  <installation-check script="printhop_arch_ok()"/>
  <script><![CDATA[
function printhop_arch_ok() {
  // 1 on Apple silicon (also for a process under Rosetta), else 0 or unset.
  var appleSilicon = system.sysctl('hw.optional.arm64') == 1;
  if (appleSilicon == false) {
    return true;
  }
  my.result.type = 'Fatal';
  my.result.title = 'This package is for another kind of Mac';
  my.result.message = 'This package is for Intel Macs. Download printhop-2.2.0-darwin-arm64.pkg for this Mac.';
  return false;
}
]]></script>
  <choices-outline>
    <line choice="default">
      <line choice="app.printhop.pkg"/>
    </line>
  </choices-outline>
  <choice id="default"/>
  <choice id="app.printhop.pkg" visible="false">
    <pkg-ref id="app.printhop.pkg"/>
  </choice>
  <pkg-ref id="app.printhop.pkg" version="2.2.0" installKBytes="30968" onConclusion="none">#printhop.pkg</pkg-ref>
  <product id="app.printhop" version="2.2.0"/>
</installer-gui-script>
