<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<installer-gui-script minSpecVersion="2">
    <title>SimplyPrint Client</title>
    <welcome file="welcome.html" mime-type="text/html"/>
    <conclusion file="conclusion.html" mime-type="text/html"/>
    <options customize="always" require-scripts="false" hostArchitectures="arm64,x86_64"/>
    <domains enable_localSystem="true"/>
    <script><![CDATA[
function sp_is_apple_silicon() {
    try {
        return system.sysctl("hw.optional.arm64") == 1;
    } catch (e) {
        return false;
    }
}
]]></script>
    <choices-outline>
        <line choice="app-arm64"/>
        <line choice="app-x86_64"/>
        <line choice="autostart"/>
    </choices-outline>
    <choice id="app-arm64" title="SimplyPrint Client" description="The SimplyPrint client application for Apple silicon (required)." start_visible="sp_is_apple_silicon()" start_selected="sp_is_apple_silicon()" start_enabled="false">
        <pkg-ref id="com.simplyprint.client.app.arm64"/>
    </choice>
    <choice id="app-x86_64" title="SimplyPrint Client" description="The SimplyPrint client application for Intel (required)." start_visible="!sp_is_apple_silicon()" start_selected="!sp_is_apple_silicon()" start_enabled="false">
        <pkg-ref id="com.simplyprint.client.app.x86_64"/>
    </choice>
    <choice id="autostart" title="Start at login" description="Start the client automatically when you log in, so your printers stay connected to SimplyPrint. Recommended." start_selected="true">
        <pkg-ref id="com.simplyprint.client.autostart"/>
    </choice>
    <pkg-ref id="com.simplyprint.client.app.arm64" version="1.0.0-rc.25" installKBytes="123724" updateKBytes="0">#app-arm64.pkg</pkg-ref>
    <pkg-ref id="com.simplyprint.client.app.x86_64" version="1.0.0-rc.25" installKBytes="117658" updateKBytes="0">#app-x86_64.pkg</pkg-ref>
    <pkg-ref id="com.simplyprint.client.autostart" version="1.0.0-rc.25" installKBytes="2" updateKBytes="0">#autostart.pkg</pkg-ref>
    <pkg-ref id="com.simplyprint.client.app.arm64">
        <bundle-version>
            <bundle CFBundleShortVersionString="1.0.0-rc.25" CFBundleVersion="1.0.0-rc.25" id="com.simplyprint.client" path="Applications/SimplyPrint Client.app"/>
        </bundle-version>
    </pkg-ref>
    <pkg-ref id="com.simplyprint.client.app.x86_64">
        <bundle-version>
            <bundle CFBundleShortVersionString="1.0.0-rc.25" CFBundleVersion="1.0.0-rc.25" id="com.simplyprint.client" path="Applications/SimplyPrint Client.app"/>
        </bundle-version>
    </pkg-ref>
    <pkg-ref id="com.simplyprint.client.autostart">
        <bundle-version/>
    </pkg-ref>
</installer-gui-script>