<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<installer-gui-script minSpecVersion="2">
    <title>LitLink Audio Bridge</title>
    <welcome file="welcome.html"/>
    <options customize="never" require-scripts="false" hostArchitectures="x86_64,arm64"/>
    <!-- 2.0.5 — refuse to install on macOS older than 14.0. Without this
         the pkg installs fine on e.g. Monterey, but the app (LSMinimumSystem
         Version 14.0) then won't launch, so the user can never reach the
         in-app uninstaller — a dead end requiring manual Terminal removal.
         A Fatal installation-check blocks the install up front with a clear
         message instead. system.compareVersions / system.version are the
         standard Installer JS API; CDATA lets the >= compare stay unescaped. -->
    <installation-check script="litlinkOSCheck()"/>
    <script><![CDATA[
function litlinkOSCheck() {
    if (system.compareVersions(system.version.ProductVersion, '14.0') >= 0) {
        return true;
    }
    my.result.title = 'Cannot Install LitLink';
    my.result.message = 'LitLink requires macOS 14.0 (Sonoma) or later. This Mac is running an older version of macOS, so LitLink cannot be installed.';
    my.result.type = 'Fatal';
    return false;
}
]]></script>
    <choices-outline>
        <line choice="app"/>
        <line choice="driver"/>
    </choices-outline>
    <choice id="app" title="LitLink App" description="The LitLink application">
        <pkg-ref id="com.audiobridge.app"/>
    </choice>
    <choice id="driver" title="Audio Driver" description="LitLink Audio Bridge virtual audio driver">
        <pkg-ref id="com.audiobridge.driver"/>
    </choice>
    <pkg-ref id="com.audiobridge.app" version="2.2.9" installKBytes="11866" updateKBytes="0">#app-component.pkg</pkg-ref>
    <pkg-ref id="com.audiobridge.driver" version="2.2.9" installKBytes="173" updateKBytes="0">#driver-component.pkg</pkg-ref>
    <pkg-ref id="com.audiobridge.app">
        <bundle-version>
            <bundle CFBundleShortVersionString="2.2.9" CFBundleVersion="57" id="com.audiobridge.app" path="Applications/LitLink.app"/>
            <bundle CFBundleShortVersionString="2.2.9" CFBundleVersion="57" id="com.audiobridge.driver" path="Applications/LitLink.app/Contents/Resources/AudioBridgeDriver.driver"/>
            <bundle id="waveform.Waveform.resources" path="Applications/LitLink.app/Contents/Resources/Waveform_Waveform.bundle"/>
            <bundle id="keyboardshortcuts.KeyboardShortcuts.resources" path="Applications/LitLink.app/Contents/Resources/KeyboardShortcuts_KeyboardShortcuts.bundle"/>
        </bundle-version>
    </pkg-ref>
    <pkg-ref id="com.audiobridge.driver">
        <bundle-version>
            <bundle CFBundleShortVersionString="2.2.9" CFBundleVersion="57" id="com.audiobridge.driver" path="Library/Audio/Plug-Ins/HAL/AudioBridgeDriver.driver"/>
        </bundle-version>
    </pkg-ref>
</installer-gui-script>