<?xml version="1.0" encoding="utf-8"?>
<installer-script minSpecVersion="1">
    <title>CrestronXPanel</title>
    <background mime-type="image/png" file="banner.png" scaling="proportional"/>
    <background-darkAqua mime-type="image/png" file="banner-dark.png" scaling="proportional"/>
    <license file="Software License Agreement.rtf"/>
    <readme file="readme.html"/>
    <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.13.0') &gt;= 0)) {
        my.result.title = 'Unable to install';
        my.result.message = 'CrestronXPanel requires Mac OS X 10.13 or later.';
        my.result.type = 'Fatal';
        return false;
    }

    var bundle = system.files.bundleAtPath('/Applications/Crestron/XPanel/CrestronXPanel.app');
    if (!bundle) {
        return true;
    }
    var bundleKeyValue = bundle['CFBundleShortVersionString'];
    if (!bundleKeyValue) {
        return true;
    }

    if (system.compareVersions(bundleKeyValue, '1.00.06') &gt; 0) {
        my.result.title = 'Previous Installation Detected';
        my.result.message = 'This will install CrestronXPanel 1.00.06 on your computer. The existing version will be replaced';
        my.result.type = 'Warning';
        return false;
    }
    return true;
}
    </script>
    <choices-outline>
        <line choice="CrestronXPanel"/>
    </choices-outline>
    <choice id="CrestronXPanel" title="CrestronXPanel">
        <pkg-ref id="CrestronXPanel.pkg"/>
    </choice>
    <pkg-ref id="CrestronXPanel.pkg" auth="Root" packageIdentifier="org.CrestronXPanel.1.00.06" version="1.00.06" installKBytes="51724">#CrestronXPanel.pkg</pkg-ref>
    <pkg-ref id="CrestronXPanel.pkg">
        <bundle-version>
            <bundle CFBundleVersion="32.0.0.116" id="com.adobe.AIR" path="Applications/Crestron/XPanel/XPanel.app/Contents/Frameworks/Adobe AIR.framework"/>
            <bundle CFBundleShortVersionString="3.6.1" CFBundleVersion="1" id="org.cocoapods.CocoaLumberjack" path="Applications/Crestron/XPanel/CrestronXPanel.app/Contents/Frameworks/CocoaLumberjack.framework"/>
            <bundle CFBundleShortVersionString="0.9.11" CFBundleVersion="1" id="org.cocoapods.ZIPFoundation" path="Applications/Crestron/XPanel/CrestronXPanel.app/Contents/Frameworks/ZIPFoundation.framework"/>
            <bundle CFBundleShortVersionString="254.0.0.0" CFBundleVersion="254.0.0.0" id="com.macromedia.FlashPlayer-10.6.plugin" path="Applications/Crestron/XPanel/XPanel.app/Contents/Frameworks/Adobe AIR.framework/Versions/1.0/Resources/Flash Player.plugin"/>
            <bundle CFBundleShortVersionString="1.0.6" CFBundleVersion="1" id="com.crestron.CrestronXPanel" path="Applications/Crestron/XPanel/CrestronXPanel.app"/>
            <bundle CFBundleShortVersionString="2.16.05" id="CrestronXPanel" path="Applications/Crestron/XPanel/XPanel.app"/>
        </bundle-version>
    </pkg-ref>
</installer-script>