<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!-- Tokens (2026.10.15.0001, 13.0, ComputleStream-2026-10-15-0001-arm64-component.pkg, ComputleStream-2026-10-15-0001-arm64-kioskd.pkg) are substituted by build-pkg.sh; it drops the KIOSK lines when the app has no kiosk helper. -->
<installer-gui-script minSpecVersion="1">
    <title>Computle (Remotle)</title>
    <organization>com.computle</organization>
    <domains enable_localSystem="true"/>
    <options customize="allow" require-scripts="false" rootVolumeOnly="true" hostArchitectures="arm64"/>
    <welcome file="welcome.html" mime-type="text/html"/>
    <conclusion file="conclusion.html" mime-type="text/html"/>
    <pkg-ref id="com.computle.stream">
        <bundle-version>
            <bundle CFBundleShortVersionString="2026-10-15-0001" CFBundleVersion="20261015.0001" id="com.computle.stream" path="Applications/Computle (Remotle).app"/>
        </bundle-version>
    </pkg-ref>
    <choices-outline>
        <line choice="default">
            <line choice="com.computle.stream"/>
        </line>
        <line choice="com.computle.stream.kioskd"/>
    </choices-outline>
    <choice id="default" title="Computle (Remotle)" enabled="false"/>
    <choice id="com.computle.stream" visible="false" enabled="true" selected="true">
        <pkg-ref id="com.computle.stream"/>
    </choice>
    <pkg-ref id="com.computle.stream" version="2026.10.15.0001" onConclusion="none" installKBytes="10342" updateKBytes="0">#ComputleStream-2026-10-15-0001-arm64-component.pkg</pkg-ref>
    <choice id="com.computle.stream.kioskd" title="Kiosk terminal support" description="Lets IT enrol this Mac from the Computle portal as a terminal that starts straight into Remotle. Nothing changes until it is enrolled." visible="true" start_selected="true">
        <pkg-ref id="com.computle.stream.kioskd"/>
    </choice>
    <pkg-ref id="com.computle.stream.kioskd" version="2026.10.15.0001" onConclusion="none" installKBytes="2" updateKBytes="0">#ComputleStream-2026-10-15-0001-arm64-kioskd.pkg</pkg-ref>
    <installation-check script="installCheck()"/>
    <script><![CDATA[
    function installCheck() {
        if (system.compareVersions(system.version.ProductVersion, '13.0') < 0) {
            my.result.title = 'Incompatible macOS version';
            my.result.message = 'Computle (Remotle) requires macOS 13.0 or later. This Mac is running macOS ' + system.version.ProductVersion + '.';
            my.result.type = 'Fatal';
            return false;
        }
        // arm64-only build (arm64 libopus + quiche); an unreadable sysctl is not treated as a failure.
        var arm64 = null;
        try { arm64 = system.sysctl('hw.optional.arm64'); } catch (e) { arm64 = null; }
        if (arm64 !== null && arm64 !== undefined && String(arm64) === '0') {
            my.result.title = 'Unsupported Mac';
            my.result.message = 'This build of Computle (Remotle) runs on Apple silicon only.';
            my.result.type = 'Fatal';
            return false;
        }
        return true;
    }
    ]]></script>
    <pkg-ref id="com.computle.stream.kioskd">
        <bundle-version/>
    </pkg-ref>
</installer-gui-script>