<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<installer-gui-script minSpecVersion="2">
    <pkg-ref id="com.harman.QuantumENGINE.Installer"/>
    <title>JBL QuantumENGINE</title>
    <allowed-os-versions>
        <os-version min="11.0"/>
    </allowed-os-versions>
    <options customize="never" rootVolumeOnly="false" hostArchitectures="x86_64,arm64"/>
    <license file="license.rtf"/>
    <choices-outline>
        <line choice="default">
            <line choice="com.harman.QuantumENGINE.Installer"/>
        </line>
    </choices-outline>
    <choice id="default"/>
    <choice id="com.harman.QuantumENGINE.Installer" visible="false">
        <pkg-ref id="com.harman.QuantumENGINE.Installer"/>
    </choice>
    <pkg-ref id="com.harman.QuantumENGINE.Installer" version="0" onConclusion="none">#Installer.pkg</pkg-ref>
    <pkg-ref id="com.harman.QuantumENGINE.Installer" installKBytes="435252" updateKBytes="0">
        <must-close>
            <app id="com.harman.QuantumENGINE"/>
        </must-close>
        <bundle-version>
            <bundle CFBundleShortVersionString="2.9.4" CFBundleVersion="1" id="com.harman.QuantumENGINE" path="Applications/JBL QuantumENGINE.app"/>
            <bundle CFBundleShortVersionString="1.0" CFBundleVersion="1" id="com.microsoft.libSkiaSharp" path="Applications/JBL QuantumENGINE.app/Contents/Frameworks/libSkiaSharp.framework"/>
            <bundle CFBundleShortVersionString="1.0.10" CFBundleVersion="0" id="com.airoha.AirohaMacosLib" path="Library/Application Support/JBL/QuantumENGINE/QuantumServer.app/Contents/MacOS/AirohaMacosLib.framework"/>
            <bundle CFBundleShortVersionString="1.0" CFBundleVersion="1" id="com.telink.TelinkUSBLib" path="Library/Application Support/JBL/QuantumENGINE/QuantumServer.app/Contents/MacOS/TelinkUSBLib.framework"/>
            <bundle CFBundleShortVersionString="4.5.2" CFBundleVersion="452" id="com.airbnb.Lottie" path="Applications/JBL QuantumENGINE.app/Contents/Frameworks/Lottie.framework"/>
            <bundle CFBundleShortVersionString="1.0" CFBundleVersion="1" id="com.harman.QuantumENGINE.MauiLottie.MauiLottie" path="Applications/JBL QuantumENGINE.app/Contents/Frameworks/MauiLottie.framework"/>
            <bundle id="com.harman.QuantumENGINE.QuantumServer" path="Library/Application Support/JBL/QuantumENGINE/QuantumServer.app"/>
            <bundle CFBundleShortVersionString="1.0" CFBundleVersion="1" id="com.harman.CMediaUpdateLib" path="Library/Application Support/JBL/QuantumENGINE/QuantumServer.app/Contents/MacOS/CMediaUpdateLib.framework"/>
            <bundle CFBundleShortVersionString="1.0" CFBundleVersion="1" id="com.QuantumENGINE.HarmanOTALib" path="Library/Application Support/JBL/QuantumENGINE/QuantumServer.app/Contents/MacOS/HarmanOTALib.framework"/>
            <bundle CFBundleShortVersionString="1.0.0" CFBundleVersion="1" id="com.harman.QuantumENGINE.driver" path="Library/Audio/Plug-Ins/HAL/QuantumVirtualAudio.driver"/>
            <bundle id="com.harman.QuantumENGINE.QuantumOSC" path="Library/Application Support/JBL/QuantumENGINE/JBL Quantum Control.app"/>
        </bundle-version>
    </pkg-ref>
    <installation-check script="installationCheck()"/>
    <conclusion file="conclusion.rtf"/>
    <script><![CDATA[

        function installationCheck()
        {
            var machine = system.sysctl('hw.machine');
            system.log('System arch: ' + machine + ', pkg arch: ' + 'x86_64'); // Log can be found at /var/log/install.log
            if(machine !== 'x86_64')
            {
                my.result.type = 'Fatal';
                my.result.title = system.localizedString('INSTALLATION FAILED');
                if(machine === 'x86_64')
                    my.result.message = system.localizedString('Apple Silicon chipset is required to install JBL QuantumENGINE.');
                else
                    my.result.message = system.localizedString('Intel chipset is required to install JBL QuantumENGINE.');
                return false;
            }
            return true;
        }

    ]]></script>
    <product id="com.harman.QuantumENGINE.Installer"/>
</installer-gui-script>