<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<installer-gui-script minSpecVersion="2">
    <title>CueMachine</title>
    <options customize="always" require-scripts="false" hostArchitectures="arm64,x86_64" rootVolumeOnly="true"/>
    <domains enable_localSystem="true"/>
    <allowed-os-versions>
        <os-version min="13.0"/>
    </allowed-os-versions>
    <license file="license.rtf"/>
    <background file="background.tiff" alignment="bottomleft" scaling="none"/>
    <background-darkAqua file="background.tiff" alignment="bottomleft" scaling="none"/>
    <script><![CDATA[
function installedVersion(app) {
    var plist = system.files.plistAtPath('/Applications/' + app + '.app/Contents/Info.plist');
    if (!plist) { return null; }
    return plist.CFBundleShortVersionString || null;
}
function appState(app, pkgVersion) {
    var v = installedVersion(app);
    if (v === null) { return 'install'; }
    if (system.compareVersions(v, pkgVersion) < 0) { return 'update'; }
    return 'current';
}
function extrasOSOK() {
    return system.compareVersions(system.version.ProductVersion, '14.0') >= 0;
}
]]></script>
    <choices-outline>
        <line choice="cuemachine_install"/>
        <line choice="cuemachine_update"/>
        <line choice="cuemachine_current"/>
        <line choice="fasttempo_install"/>
        <line choice="fasttempo_update"/>
        <line choice="fasttempo_current"/>
        <line choice="projectswitch_install"/>
        <line choice="projectswitch_update"/>
        <line choice="projectswitch_current"/>
        <line choice="tunedout_install"/>
        <line choice="tunedout_update"/>
        <line choice="tunedout_current"/>
    </choices-outline>
    <choice id="cuemachine_install" title="Install CueMachine 1.2.1" description="The core CueMachine application. Required — your CueMachine license or free trial also unlocks the three included apps." start_visible="appState('CueMachine','1.2.1') == 'install'" start_selected="appState('CueMachine','1.2.1') == 'install'" start_enabled="false">
        <pkg-ref id="com.cuemachinesoftware.pkg.cuemachine"/>
    </choice>
    <choice id="cuemachine_update" title="Update CueMachine to 1.2.1" description="The core CueMachine application. Required — your CueMachine license or free trial also unlocks the three included apps." start_visible="appState('CueMachine','1.2.1') == 'update'" start_selected="appState('CueMachine','1.2.1') == 'update'" start_enabled="false">
        <pkg-ref id="com.cuemachinesoftware.pkg.cuemachine"/>
    </choice>
    <choice id="cuemachine_current" title="CueMachine 1.2.1 (already installed)" description="This Mac already has CueMachine 1.2.1 or newer." start_visible="appState('CueMachine','1.2.1') == 'current'" start_selected="false" start_enabled="false">
        <pkg-ref id="com.cuemachinesoftware.pkg.cuemachine"/>
    </choice>
    <choice id="fasttempo_install" title="Install FastTempo 1.0.2" description="Tap tempo at your fingertips. Included with CueMachine. Requires macOS 14 or later." start_visible="appState('FastTempo','1.0.2') == 'install'" start_selected="extrasOSOK() &amp;&amp; appState('FastTempo','1.0.2') == 'install'" start_enabled="extrasOSOK()">
        <pkg-ref id="com.cuemachinesoftware.pkg.fasttempo"/>
    </choice>
    <choice id="fasttempo_update" title="Update FastTempo to 1.0.2" description="Tap tempo at your fingertips. Included with CueMachine. Requires macOS 14 or later." start_visible="appState('FastTempo','1.0.2') == 'update'" start_selected="extrasOSOK() &amp;&amp; appState('FastTempo','1.0.2') == 'update'" start_enabled="extrasOSOK()">
        <pkg-ref id="com.cuemachinesoftware.pkg.fasttempo"/>
    </choice>
    <choice id="fasttempo_current" title="FastTempo 1.0.2 (already installed)" description="This Mac already has FastTempo 1.0.2 or newer." start_visible="appState('FastTempo','1.0.2') == 'current'" start_selected="false" start_enabled="false">
        <pkg-ref id="com.cuemachinesoftware.pkg.fasttempo"/>
    </choice>
    <choice id="projectswitch_install" title="Install ProjectSwitch 1.0.2" description="Open DAW sessions, asset folders, and reference URLs, all at once. Included with CueMachine. Requires macOS 14 or later." start_visible="appState('ProjectSwitch','1.0.2') == 'install'" start_selected="extrasOSOK() &amp;&amp; appState('ProjectSwitch','1.0.2') == 'install'" start_enabled="extrasOSOK()">
        <pkg-ref id="com.cuemachinesoftware.pkg.projectswitch"/>
    </choice>
    <choice id="projectswitch_update" title="Update ProjectSwitch to 1.0.2" description="Open DAW sessions, asset folders, and reference URLs, all at once. Included with CueMachine. Requires macOS 14 or later." start_visible="appState('ProjectSwitch','1.0.2') == 'update'" start_selected="extrasOSOK() &amp;&amp; appState('ProjectSwitch','1.0.2') == 'update'" start_enabled="extrasOSOK()">
        <pkg-ref id="com.cuemachinesoftware.pkg.projectswitch"/>
    </choice>
    <choice id="projectswitch_current" title="ProjectSwitch 1.0.2 (already installed)" description="This Mac already has ProjectSwitch 1.0.2 or newer." start_visible="appState('ProjectSwitch','1.0.2') == 'current'" start_selected="false" start_enabled="false">
        <pkg-ref id="com.cuemachinesoftware.pkg.projectswitch"/>
    </choice>
    <choice id="tunedout_install" title="Install TunedOut 1.0.2" description="A precise instrument tuner that lives in your menu bar. Included with CueMachine. Requires macOS 14 or later." start_visible="appState('TunedOut','1.0.2') == 'install'" start_selected="extrasOSOK() &amp;&amp; appState('TunedOut','1.0.2') == 'install'" start_enabled="extrasOSOK()">
        <pkg-ref id="com.cuemachinesoftware.pkg.tunedout"/>
    </choice>
    <choice id="tunedout_update" title="Update TunedOut to 1.0.2" description="A precise instrument tuner that lives in your menu bar. Included with CueMachine. Requires macOS 14 or later." start_visible="appState('TunedOut','1.0.2') == 'update'" start_selected="extrasOSOK() &amp;&amp; appState('TunedOut','1.0.2') == 'update'" start_enabled="extrasOSOK()">
        <pkg-ref id="com.cuemachinesoftware.pkg.tunedout"/>
    </choice>
    <choice id="tunedout_current" title="TunedOut 1.0.2 (already installed)" description="This Mac already has TunedOut 1.0.2 or newer." start_visible="appState('TunedOut','1.0.2') == 'current'" start_selected="false" start_enabled="false">
        <pkg-ref id="com.cuemachinesoftware.pkg.tunedout"/>
    </choice>
    <pkg-ref id="com.cuemachinesoftware.pkg.cuemachine" version="1.2.1" onConclusion="none" installKBytes="98703" updateKBytes="0">#CueMachine.pkg</pkg-ref>
    <pkg-ref id="com.cuemachinesoftware.pkg.fasttempo" version="1.0.2" onConclusion="none" installKBytes="38589" updateKBytes="0">#FastTempo.pkg</pkg-ref>
    <pkg-ref id="com.cuemachinesoftware.pkg.projectswitch" version="1.0.2" onConclusion="none" installKBytes="41481" updateKBytes="0">#ProjectSwitch.pkg</pkg-ref>
    <pkg-ref id="com.cuemachinesoftware.pkg.tunedout" version="1.0.2" onConclusion="none" installKBytes="38430" updateKBytes="0">#TunedOut.pkg</pkg-ref>
    <pkg-ref id="com.cuemachinesoftware.pkg.cuemachine">
        <bundle-version>
            <bundle CFBundleShortVersionString="2.9.1" CFBundleVersion="2054" id="org.sparkle-project.Sparkle" path="CueMachine.app/Contents/Frameworks/Sparkle.framework"/>
            <bundle CFBundleShortVersionString="2.9.1" CFBundleVersion="2054" id="org.sparkle-project.InstallerLauncher" path="CueMachine.app/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices/Installer.xpc"/>
            <bundle CFBundleShortVersionString="2.9.1" CFBundleVersion="2054" id="org.sparkle-project.Sparkle.Updater" path="CueMachine.app/Contents/Frameworks/Sparkle.framework/Versions/B/Updater.app"/>
            <bundle CFBundleShortVersionString="1.2.1" CFBundleVersion="131" id="com.cuemachinesoftware.cuemachine" path="CueMachine.app"/>
            <bundle CFBundleShortVersionString="2.9.1" CFBundleVersion="2054" id="org.sparkle-project.DownloaderService" path="CueMachine.app/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices/Downloader.xpc"/>
        </bundle-version>
    </pkg-ref>
    <pkg-ref id="com.cuemachinesoftware.pkg.fasttempo">
        <bundle-version>
            <bundle CFBundleShortVersionString="1.0.2" CFBundleVersion="20" id="com.overstory.FastTempo" path="FastTempo.app"/>
            <bundle CFBundleShortVersionString="2.9.2" CFBundleVersion="2057" id="org.sparkle-project.Sparkle" path="FastTempo.app/Contents/Frameworks/Sparkle.framework"/>
            <bundle CFBundleShortVersionString="8.58.3" CFBundleVersion="8.58.3" id="io.sentry.Sentry" path="FastTempo.app/Contents/Frameworks/Sentry.framework"/>
            <bundle CFBundleShortVersionString="2.9.2" CFBundleVersion="2057" id="org.sparkle-project.DownloaderService" path="FastTempo.app/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices/Downloader.xpc"/>
            <bundle CFBundleShortVersionString="2.9.2" CFBundleVersion="2057" id="org.sparkle-project.Sparkle.Updater" path="FastTempo.app/Contents/Frameworks/Sparkle.framework/Versions/B/Updater.app"/>
            <bundle CFBundleShortVersionString="2.9.2" CFBundleVersion="2057" id="org.sparkle-project.InstallerLauncher" path="FastTempo.app/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices/Installer.xpc"/>
        </bundle-version>
    </pkg-ref>
    <pkg-ref id="com.cuemachinesoftware.pkg.projectswitch">
        <bundle-version>
            <bundle CFBundleShortVersionString="1.0.2" CFBundleVersion="39" id="com.overstory.ProjectSwitch" path="ProjectSwitch.app"/>
            <bundle CFBundleShortVersionString="2.9.2" CFBundleVersion="2057" id="org.sparkle-project.Sparkle" path="ProjectSwitch.app/Contents/Frameworks/Sparkle.framework"/>
            <bundle CFBundleShortVersionString="8.58.3" CFBundleVersion="8.58.3" id="io.sentry.Sentry" path="ProjectSwitch.app/Contents/Frameworks/Sentry.framework"/>
            <bundle CFBundleShortVersionString="2.9.2" CFBundleVersion="2057" id="org.sparkle-project.DownloaderService" path="ProjectSwitch.app/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices/Downloader.xpc"/>
            <bundle CFBundleShortVersionString="2.9.2" CFBundleVersion="2057" id="org.sparkle-project.Sparkle.Updater" path="ProjectSwitch.app/Contents/Frameworks/Sparkle.framework/Versions/B/Updater.app"/>
            <bundle CFBundleShortVersionString="2.9.2" CFBundleVersion="2057" id="org.sparkle-project.InstallerLauncher" path="ProjectSwitch.app/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices/Installer.xpc"/>
        </bundle-version>
    </pkg-ref>
    <pkg-ref id="com.cuemachinesoftware.pkg.tunedout">
        <bundle-version>
            <bundle CFBundleShortVersionString="2.9.3" CFBundleVersion="2058" id="org.sparkle-project.Sparkle" path="TunedOut.app/Contents/Frameworks/Sparkle.framework"/>
            <bundle CFBundleShortVersionString="8.58.3" CFBundleVersion="8.58.3" id="io.sentry.Sentry" path="TunedOut.app/Contents/Frameworks/Sentry.framework"/>
            <bundle CFBundleShortVersionString="2.9.3" CFBundleVersion="2058" id="org.sparkle-project.Sparkle.Updater" path="TunedOut.app/Contents/Frameworks/Sparkle.framework/Versions/B/Updater.app"/>
            <bundle CFBundleShortVersionString="2.9.3" CFBundleVersion="2058" id="org.sparkle-project.DownloaderService" path="TunedOut.app/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices/Downloader.xpc"/>
            <bundle CFBundleShortVersionString="2.9.3" CFBundleVersion="2058" id="org.sparkle-project.InstallerLauncher" path="TunedOut.app/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices/Installer.xpc"/>
            <bundle CFBundleShortVersionString="1.0.2" CFBundleVersion="12" id="com.overstory.TunedOut" path="TunedOut.app"/>
        </bundle-version>
    </pkg-ref>
</installer-gui-script>