<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<installer-gui-script minSpecVersion="2">
    <title>MonitorHUD</title>
    <options customize="always" require-scripts="false" hostArchitectures="arm64,x86_64" rootVolumeOnly="true"/>
    <domains enable_localSystem="true"/>
    <allowed-os-versions>
        <os-version min="14.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';
}
]]></script>
    <choices-outline>
        <line choice="monitorhud_install"/>
        <line choice="monitorhud_update"/>
        <line choice="monitorhud_current"/>
    </choices-outline>
    <choice id="monitorhud_install" title="Install MonitorHUD 1.1.1" description="Visualize and control your monitors. Works with Apollo interfaces." start_visible="appState('MonitorHUD','1.1.1') == 'install'" start_selected="appState('MonitorHUD','1.1.1') == 'install'" start_enabled="false">
        <pkg-ref id="com.cuemachinesoftware.pkg.monitorhud"/>
    </choice>
    <choice id="monitorhud_update" title="Update MonitorHUD to 1.1.1" description="Visualize and control your monitors. Works with Apollo interfaces." start_visible="appState('MonitorHUD','1.1.1') == 'update'" start_selected="appState('MonitorHUD','1.1.1') == 'update'" start_enabled="false">
        <pkg-ref id="com.cuemachinesoftware.pkg.monitorhud"/>
    </choice>
    <choice id="monitorhud_current" title="MonitorHUD 1.1.1 (already installed)" description="This Mac already has MonitorHUD 1.1.1 or newer." start_visible="appState('MonitorHUD','1.1.1') == 'current'" start_selected="false" start_enabled="false">
        <pkg-ref id="com.cuemachinesoftware.pkg.monitorhud"/>
    </choice>
    <pkg-ref id="com.cuemachinesoftware.pkg.monitorhud" version="1.1.1" onConclusion="none" installKBytes="40891" updateKBytes="0">#MonitorHUD.pkg</pkg-ref>
    <pkg-ref id="com.cuemachinesoftware.pkg.monitorhud">
        <bundle-version>
            <bundle CFBundleShortVersionString="1.1.1" CFBundleVersion="50" id="com.overstory.MonitorHUD" path="MonitorHUD.app"/>
            <bundle CFBundleShortVersionString="2.9.1" CFBundleVersion="2054" id="org.sparkle-project.Sparkle" path="MonitorHUD.app/Contents/Frameworks/Sparkle.framework"/>
            <bundle CFBundleShortVersionString="8.58.3" CFBundleVersion="8.58.3" id="io.sentry.Sentry" path="MonitorHUD.app/Contents/Frameworks/Sentry.framework"/>
            <bundle CFBundleShortVersionString="2.9.1" CFBundleVersion="2054" id="org.sparkle-project.Sparkle.Updater" path="MonitorHUD.app/Contents/Frameworks/Sparkle.framework/Versions/B/Updater.app"/>
            <bundle CFBundleShortVersionString="2.9.1" CFBundleVersion="2054" id="org.sparkle-project.DownloaderService" path="MonitorHUD.app/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices/Downloader.xpc"/>
            <bundle CFBundleShortVersionString="2.9.1" CFBundleVersion="2054" id="org.sparkle-project.InstallerLauncher" path="MonitorHUD.app/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices/Installer.xpc"/>
        </bundle-version>
    </pkg-ref>
</installer-gui-script>