<?xml version="1.0" encoding="utf-8"?>
<installer-script minSpecVersion="1">
    <title>ConnectAgent</title>
    <background mime-type="image/png" file="banner.png" scaling="proportional"/>
    <background-darkAqua mime-type="image/png" file="banner.png" scaling="proportional"/>
    <welcome file="welcome.html" mime-type="text/html"/>
    <conclusion file="conclusion.html" mime-type="text/html"/>
    <license file="LICENSE.txt"/>
    <options customize="never" allow-external-scripts="no" hostArchitectures="x86_64,arm64"/>
    <domains enable_localSystem="true"/>
    <installation-check script="installCheck();"/>
    <script>
function installCheck() {
    if(!(system.compareVersions(system.version.ProductVersion, '13.0.0') &gt;= 0)) {
        my.result.title = 'Unable to install';
        my.result.message = 'ConnectAgent requires Mac OS X 13.0 or later.';
        my.result.type = 'Fatal';
        return false;
    }
    if(system.files.fileExistsAtPath('/Applications/ConnectAgent.app/')) {
        my.result.title = 'Previous Installation Detected';
        my.result.message = 'A previous installation of ConnectAgent exists at /Applications/ConnectAgent.app/. This installer will remove the previous installation prior to installing. Please back up any data before proceeding.';
        my.result.type = 'Warning';
        return false;
    }
    return true;
}
    </script>
    <choices-outline>
        <line choice="ConnectAgent"/>
    </choices-outline>
    <choice id="ConnectAgent" title="ConnectAgent">
        <pkg-ref id="ConnectAgent.pkg"/>
    </choice>
    <pkg-ref id="ConnectAgent.pkg" auth="Root" packageIdentifier="com.msp360.connectagent" version="4.2.0.20" installKBytes="51228">#ConnectAgent.pkg</pkg-ref>
    <pkg-ref id="ConnectAgent.pkg">
        <bundle-version>
            <bundle CFBundleShortVersionString="4.0" CFBundleVersion="1" id="com.msp360.connectagent" path="Applications/ConnectAgent.app"/>
        </bundle-version>
    </pkg-ref>
</installer-script>