<?xml version="1.0" encoding="utf-8"?>
<installer-script minSpecVersion="1">
    <title>NPortConnect</title>
    <license file="MOXA-General-EULA-macOS-NPortConnect.rtf"/>
    <background mime-type="image/png" file="banner.png" scaling="proportional"/>
    <background-darkAqua mime-type="image/png" file="banner-dark.png" scaling="proportional"/>
    <welcome file="welcome.html" mime-type="text/html"/>
    <conclusion file="conclusion.html" mime-type="text/html"/>
    <options customize="never" allow-external-scripts="no"/>
    <domains enable_localSystem="true"/>
    <installation-check script="installCheck();"/>
    <script>
function installCheck() {
    if(!(system.compareVersions(system.version.ProductVersion, '10.12.0') &gt;= 0)) {
        my.result.title = 'Unable to install';
        my.result.message = 'NPortConnect requires macOS 10.12 or later.';
        my.result.type = 'Fatal';
        return false;
    }
    if(system.files.fileExistsAtPath('/Applications/NPortConnect/')) {
        my.result.title = 'Previous Installation Detected';
        my.result.message = 'A previous installation of NPortConnect exists. This installer will remove the previous installation prior to installing. Please close all tty connections before proceeding.';
        my.result.type = 'Warning';
        return false;
    }
    return true;
}
    </script>
    <choices-outline>
        <line choice="default">
            <line choice="NPortConnect"/>
            <line choice="NPortConnect-1"/>
            <line choice="NPortConnect-2"/>
        </line>
    </choices-outline>
    <choice id="default"/>
    <choice id="NPortConnect" title="NPortConnect">
        <pkg-ref id="NPortConnect_app.pkg"/>
    </choice>
    <pkg-ref id="NPortConnect_app.pkg" auth="Root" packageIdentifier="com.moxa.nport.NPortConnect.1.3.app" version="1.3" installKBytes="7335">#NPortConnect_app.pkg</pkg-ref>
    <choice id="NPortConnect-1" title="NPortConnect">
        <pkg-ref id="NPortConnect_util.pkg"/>
    </choice>
    <pkg-ref id="NPortConnect_util.pkg" auth="Root" packageIdentifier="com.moxa.nport.NPortConnect.1.3.util" version="1.3" installKBytes="7722">#NPortConnect_util.pkg</pkg-ref>
    <choice id="NPortConnect-2" title="NPortConnect">
        <pkg-ref id="NPortConnect_lib.pkg"/>
    </choice>
    <pkg-ref id="NPortConnect_lib.pkg" auth="Root" packageIdentifier="com.moxa.nport.NPortConnect.1.3.lib" version="1.3" installKBytes="22">#NPortConnect_lib.pkg</pkg-ref>
    <pkg-ref id="NPortConnect_app.pkg">
        <bundle-version>
            <bundle CFBundleShortVersionString="1.3" id="com.moxa.nport.NPortConnect" path="NPortConnect.app"/>
        </bundle-version>
    </pkg-ref>
    <pkg-ref id="NPortConnect_util.pkg">
        <bundle-version/>
    </pkg-ref>
    <pkg-ref id="NPortConnect_lib.pkg">
        <bundle-version/>
    </pkg-ref>
</installer-script>