<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<installer-gui-script minSpecVersion="2">
    <title>SoftPerfect RAM Disk</title>
    <!-- file="*.rtf" is rewritten to "*.rtfd" by build-pkg.sh post-process.
         productbuild on macOS 12.x rejects .rtfd inside its resources dir,
         so we stage with .rtf and convert inside the expanded pkg. -->
    <welcome file="Welcome.rtfd" mime-type="text/rtf"/>
    <license file="License.rtfd" mime-type="text/rtf"/>
    <options customize="never" rootVolumeOnly="true" require-scripts="true" hostArchitectures="arm64,x86_64"/>
    <installation-check script="installationCheck()"/>
    <script><![CDATA[
        function installationCheck() {
            var v = system.version.ProductVersion;
            if (system.compareVersions(v, '12.0') >= 0) {
                return true;
            }
            my.result.type = 'Fatal';
            my.result.title = 'macOS 12 (Monterey) or later is required';
            my.result.message = 'SoftPerfect RAM Disk requires macOS 12 (Monterey) ' +
                                'or later because the kernel extension uses kpi APIs ' +
                                'that are not available on earlier releases. ' +
                                'You are running macOS ' + v + '.';
            return false;
        }
    ]]></script>
    <choices-outline>
        <line choice="default"/>
    </choices-outline>
    <choice id="default" title="SoftPerfect RAM Disk">
        <pkg-ref id="com.softperfect.ramdisk"/>
    </choice>
    <pkg-ref id="com.softperfect.ramdisk" auth="root" version="26.6" installKBytes="20132" updateKBytes="0">#component.pkg</pkg-ref>
    <product id="com.softperfect.ramdisk" version="26.6"/>
    <pkg-ref id="com.softperfect.ramdisk">
        <bundle-version>
            <bundle CFBundleShortVersionString="1.0" CFBundleVersion="1.0" id="com.softperfect.sprd" path="Library/Extensions/sprd.kext"/>
            <bundle CFBundleShortVersionString="26.6" CFBundleVersion="26.6" id="com.softperfect.ramdisk" path="Applications/SoftPerfect RAM Disk/SoftPerfect RAM Disk.app"/>
        </bundle-version>
    </pkg-ref>
</installer-gui-script>