<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<installer-gui-script minSpecVersion="1">
    <background file="background.png" alignment="topleft" scaling="tofit"/>
    <license file="LICENCE.rtf"/>
    <options customize="never" require-scripts="true" allow-external-scripts="yes"/>
    <installation-check script="pm_install_check();"/>
    <script><![CDATA[
        function pm_install_check() {
            system.log("Running pre install check");
            system.log("OS version: " + system.version.ProductVersion);

            // Disallow 10.9 or earlier
            if (system.compareVersions(system.version.ProductVersion, '10.10') < 0) {
                my.result.title = 'Requires Mac OS X 10.10 or later';
                my.result.message = 'Mac OS X 10.10 or later is required to install this software.  Please upgrade this server to Mac OS X 10.10+.';
                my.result.type = 'Fatal';
                return false;
            }

            // Run external script to check if product can be installed.
            system.log('Invoking the external script file');
            var checkResult = system.run('existing-product');
            if (checkResult !== 0) {
                var errorDict = system.files.plistAtPath('/tmp/pmitc_preinstall_error_message.plist');

                my.result.title = "";
                my.result.message = errorDict["error-message"];
                my.result.type = 'Fatal';
                return false;
            }

            system.log("Successful pre install check");
            return true;
        }
        ]]></script>
    <choices-outline>
        <line choice="default">
            <line choice="pmitc.printClient"/>
        </line>
    </choices-outline>
    <choice id="default"/>
    <choice id="pmitc.printClient" visible="false" customLocation="/Library">
        <pkg-ref id="pmitc.printClient"/>
    </choice>
    <pkg-ref id="pmitc.printClient" auth="root" onConclusion="none" packageIdentifier="pmitc" version="2026-06-04-0435" installKBytes="109837" updateKBytes="0">#pmitc.pkg</pkg-ref>
    <title>PaperCut Hive</title>
    <pkg-ref id="pmitc.printClient">
        <bundle-version/>
    </pkg-ref>
</installer-gui-script>