<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<installer-gui-script minSpecVersion="2">
    <welcome file="Welcome.rtfd"/>
    <title>Microsoft Bing Wallpaper</title>
    <options customize="always" hostArchitectures="x86_64,arm64"/>
    <!-- Block install on unsupported macOS (13 Ventura or older). The
         installation-check runs first and shows a localized, fatal message so
         the user gets a clear reason. The volume-check is a defense-in-depth
         backstop that also disables the target volume for the same floor. -->
    <installation-check script="check_minimum_os_version();"/>
    <script><![CDATA[
    function check_minimum_os_version() {
        if (system.compareVersions(system.version.ProductVersion, '14.0') < 0) {
            my.result.type = 'Fatal';
            my.result.title = system.localizedStringWithFormat('Installer_UnsupportedOS_Title');
            my.result.message = system.localizedStringWithFormat('Installer_UnsupportedOS_Message');
            return false;
        }
        return true;
    }
    ]]></script>
    <volume-check>
        <allowed-os-versions>
            <os-version min="14.0"/>
        </allowed-os-versions>
    </volume-check>
    <choices-outline>
        <line choice="bing_search"/>
        <line choice="app"/>
    </choices-outline>
    <choice id="bing_search" title="Installer_SearchChoice_Title" description="Installer_SearchChoice_Description" start_selected="true" visible="true">
        <pkg-ref id="com.microsoft.bing.wallpaper.installer.dse"/>
    </choice>
    <choice id="app" title="Microsoft Bing Wallpaper" enabled="false" selected="true" start_selected="true" visible="false">
        <pkg-ref id="com.microsoft.bing.wallpaper.installer"/>
    </choice>
    <pkg-ref id="com.microsoft.bing.wallpaper.installer.dse" version="2.0.18.370" onConclusion="none" installKBytes="0" updateKBytes="0">#BingWallpaper-dse.pkg</pkg-ref>
    <pkg-ref id="com.microsoft.bing.wallpaper.installer" version="2.0.18.370" onConclusion="none" installKBytes="76351" updateKBytes="0">#BingWallpaper-component.pkg</pkg-ref>
    <pkg-ref id="com.microsoft.bing.wallpaper.installer.dse">
        <bundle-version/>
    </pkg-ref>
    <pkg-ref id="com.microsoft.bing.wallpaper.installer">
        <bundle-version>
            <bundle CFBundleShortVersionString="2.0.18" CFBundleVersion="2.0.18" id="com.microsoft.bing.wallpaper" path="Applications/Microsoft Bing Wallpaper.app"/>
        </bundle-version>
    </pkg-ref>
</installer-gui-script>