<?xml version="1.0" encoding="utf-8"?>
<installer-gui-script minSpecVersion="1">
    <title>Arq Backup</title>
    <organization>com.haystacksoftware</organization>
    <domains enable_localSystem="true"/>
    <options customize="never" require-scripts="true" rootVolumeOnly="true"/>
    <installation-check script="InstallationCheck()"/>
    <welcome file="Welcome.rtf"/>
    <!-- Define documents displayed at various steps -->
    <!-- welcome    file="welcome.html"    mime-type="text/html" /-->
    <!-- license    file="license.html"    mime-type="text/html" /-->
    <!-- conclusion file="conclusion.html" mime-type="text/html" /-->
    <!-- List all component packages -->
    <pkg-ref id="com.haystacksoftware.Arq" version="6.2.76" auth="root" installKBytes="194179">#client.pkg</pkg-ref>
    <!-- List them again here. They can now be organized
         as a hierarchy if you want. -->
    <choices-outline>
        <line choice="com.haystacksoftware.Arq"/>
    </choices-outline>
    <!-- Define each choice above -->
    <choice id="com.haystacksoftware.Arq" visible="false" title="Arq Backup" description="backup client" start_selected="true">
        <pkg-ref id="com.haystacksoftware.Arq"/>
    </choice>
    <script><![CDATA[
function ArqAppOlderOrEqual(prefix) {
    var bundle = system.files.bundleAtPath(prefix + '/Applications/Arq.app');
    if (!bundle) {
        return true;
    }
    var bundleKeyValue = bundle['CFBundleShortVersionString'];
    if (!bundleKeyValue) {
        return true;
    }
    if (system.compareVersions(bundleKeyValue, '6.2.76') > 0) {
        return false;
    }
    return true;
}
function dontDowngrade(prefix) {
    if (ArqAppOlderOrEqual(prefix)) {
        return true;
    }
    if (typeof(my.result) != 'undefined') {
        my.result.message = system.localizedString('ERROR_NEWER_VERSION_INSTALLED');
    }
    return false;
}
function InstallationCheck(prefix) {
    if (system.compareVersions(system.version.ProductVersion, '10.10.5') < 0) {
        my.result.message = system.localizedStringWithFormat('ERROR_SYSTEM_VERSION', '10.10.5');
        my.result.type = 'Fatal';
        return false;
    }
    my.result.message = system.localizedString('ERROR_SOFTWARE_NOT_SUPPORTED_ON_SYSTEM');
    if (!dontDowngrade("/")) {
        my.result.type = 'Fatal';
        return false;
    }
    return true;
}
]]></script>
    <pkg-ref id="com.haystacksoftware.Arq">
        <bundle-version>
            <bundle CFBundleShortVersionString="6.2.76" CFBundleVersion="6.2.76" id="com.haystacksoftware.Arq" path="Applications/Arq.app"/>
        </bundle-version>
    </pkg-ref>
    <product version="6.2.76"/>
</installer-gui-script>