<?xml version="1.0" encoding="utf-8"?>
<installer-gui-script minSpecVersion="2">
    <title>Punto Switcher 2.1.5</title>
    <options customize="always" allow-external-scripts="no"/>
    <allowed-os-versions>
        <os-version min="10.7"/>
    </allowed-os-versions>
    <script>
        function ya_browser_installed() {
            return system.files.fileExistsAtPath('/Applications/Yandex.app');
        }

        function firefox_installed() {
            return system.files.fileExistsAtPath('/Applications/Firefox.app');
        }

        function can_install_hp() {
            return true;
        }

        function can_install_qs() {
            return true;
        }

        function can_install_elements() {
            return firefox_installed() &amp;&amp; !ya_browser_installed();
        }

        function choice2_selected() {
            result = (choices.choice2.selected == true);
            result = result &amp;&amp; (can_install_hp() == true);
            return result;
        }

        function choice2_visible() {
            return can_install_hp();
        }

        function choice3_selected() {
            result = (choices.choice3.selected == true);
            result = result &amp;&amp; (can_install_qs() == true);
            return result;
        }

        function choice3_visible() {
            return can_install_qs();
        }

        function choice4_selected() {
            result = (choices.choice4.selected == true);
            result = result &amp;&amp; (can_install_elements() == true);
            return result;
        }

        function choice4_visible() {
            return can_install_elements();
        }
    </script>
    <background file="Background.png" alignment="bottomleft" scaling="none"/>
    <welcome file="Welcome.rtf"/>
    <license file="License.rtf"/>
    <choices-outline>
        <line choice="choice_PuntoApp"/>
        <line choice="choice_Yalite"/>
        <line choice="choice_StartupHelper"/>
        <line choice="choice_UninstallReporter"/>
        <line choice="choice_UninstallReporterJob"/>
    </choices-outline>
    <choice id="choice_PuntoApp" title="Punto Switcher 2.1.5" tooltip="Punto Switcher" description="Установить Punto Switcher — автоматический переключатель русской и английской раскладок клавиатуры." start_enabled="false">
        <pkg-ref id="ru.yandex.desktop.PuntoSwitcher.PS.pkg"/>
    </choice>
    <choice id="choice_Yalite" title="Расширения и настройки Яндекса" tooltip="" description="Установить расширения и настройки Яндекса." selected="false" visible="false">
        <pkg-ref id="ru.yandex.desktop.PuntoSwitcher.Yalite.pkg"/>
    </choice>
    <choice id="choice_StartupHelper" title="" tooltip="" description="" start_selected="true" start_enabled="false" start_visible="false">
        <pkg-ref id="ru.yandex.desktop.PuntoSwitcher.StartupHelper.pkg"/>
    </choice>
    <choice id="choice_UninstallReporter" title="" tooltip="" description="" start_selected="true" start_enabled="false" start_visible="false">
        <pkg-ref id="ru.yandex.desktop.PuntoSwitcher.UninstallReporter.pkg"/>
    </choice>
    <choice id="choice_UninstallReporterJob" title="" tooltip="" description="" start_selected="true" start_enabled="false" start_visible="false">
        <pkg-ref id="ru.yandex.desktop.PuntoSwitcher.UninstallReporter.Job.pkg"/>
    </choice>
    <!-- PKG References -->
    <!-- Punto -->
    <pkg-ref id="ru.yandex.desktop.PuntoSwitcher.PS.pkg" auth="none" version="2.1.5" installKBytes="3388">#ru.yandex.desktop.PuntoSwitcher.PS.pkg</pkg-ref>
    <!-- Yalite.app -->
    <pkg-ref id="ru.yandex.desktop.PuntoSwitcher.Yalite.pkg" auth="none">#ru.yandex.desktop.PuntoSwitcher.Yalite.pkg</pkg-ref>
    <pkg-ref id="ru.yandex.desktop.PuntoSwitcher.Yalite.pkg" version="2.1.5" installKBytes="2270">
        <bundle-version>
            <bundle CFBundleShortVersionString="1.0" CFBundleVersion="1" id="ru.yandex.Yalite" path="Yalite.app"/>
        </bundle-version>
    </pkg-ref>
    <!-- Misc -->
    <pkg-ref id="ru.yandex.desktop.PuntoSwitcher.StartupHelper.pkg" auth="none" version="2.1.5" installKBytes="155">#ru.yandex.desktop.PuntoSwitcher.StartupHelper.pkg</pkg-ref>
    <pkg-ref id="ru.yandex.desktop.PuntoSwitcher.UninstallReporter.pkg" auth="none" version="2.1.5" installKBytes="57">#ru.yandex.desktop.PuntoSwitcher.UninstallReporter.pkg</pkg-ref>
    <pkg-ref id="ru.yandex.desktop.PuntoSwitcher.UninstallReporter.Job.pkg" auth="none" version="2.1.5" installKBytes="1">#ru.yandex.desktop.PuntoSwitcher.UninstallReporter.Job.pkg</pkg-ref>
    <pkg-ref id="ru.yandex.desktop.PuntoSwitcher.PS.pkg">
        <bundle-version>
            <bundle CFBundleShortVersionString="2.1.5" CFBundleVersion="1724" id="ru.yandex.desktop.PuntoSwitcher" path="PuntoSwitcher.app"/>
        </bundle-version>
    </pkg-ref>
    <pkg-ref id="ru.yandex.desktop.PuntoSwitcher.StartupHelper.pkg">
        <bundle-version>
            <bundle CFBundleVersion="" id="ru.yandex.PuntoStartupHelper" path="PuntoStartupHelper.app"/>
        </bundle-version>
    </pkg-ref>
    <pkg-ref id="ru.yandex.desktop.PuntoSwitcher.UninstallReporter.pkg">
        <bundle-version/>
    </pkg-ref>
    <pkg-ref id="ru.yandex.desktop.PuntoSwitcher.UninstallReporter.Job.pkg">
        <bundle-version/>
    </pkg-ref>
    <product version="2.1.5"/>
</installer-gui-script>