<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<installer-gui-script minSpecVersion="2">
    <title>FishMix Mac 0.2.21 安装器</title>
    <options customize="never" require-scripts="true" allow-external-scripts="false" hostArchitectures="arm64"/>
    <domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/>
    <welcome file="welcome.html" mime-type="text/html"/>
    <readme file="readme.html" mime-type="text/html"/>
    <conclusion file="conclusion.html" mime-type="text/html"/>
    <volume-check script="checkVersion()">
        <allowed-os-versions>
            <os-version min="12.0"/>
        </allowed-os-versions>
    </volume-check>
    <script><![CDATA[
    function checkVersion() {
      var p = system.files.plistAtPath('/Applications/FishMix.app/Contents/Info.plist');
      if (p && p.CFBundleIdentifier == 'art.fishmix.mac.native') {
        var previous = parseInt(p.CFBundleVersion, 10);
        if (previous > 23) {
          my.result.type = 'Fatal';
          my.result.message = '这台 Mac 已安装更新的 FishMix，请使用已安装版本。';
          return false;
        }
      }
      return true;
    }
  ]]></script>
    <choices-outline>
        <line choice="fishmix"/>
    </choices-outline>
    <choice id="fishmix" title="FishMix" visible="false">
        <pkg-ref id="art.fishmix.mac.installer"/>
    </choice>
    <pkg-ref id="art.fishmix.mac.installer" version="23.1" onConclusion="None">#FishMixComponent.pkg</pkg-ref>
    <pkg-ref id="art.fishmix.mac.installer" installKBytes="86743" updateKBytes="0">
        <must-close>
            <app id="art.fishmix.mac.native"/>
        </must-close>
        <bundle-version>
            <bundle CFBundleShortVersionString="0.2.21" CFBundleVersion="23" id="art.fishmix.mac.native" path="FishMix.app"/>
        </bundle-version>
    </pkg-ref>
</installer-gui-script>