<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!--
  Distribution XML for the Free VPN CLI macOS .pkg.

  This file describes what `productbuild` wraps around the inner
  `pkgbuild`-produced component package. It controls:

    - the Installer.app wizard: title, welcome / conclusion text,
      license screen, install location;
    - Apple's notarization-friendly identifier + version pair
      (must match every release; UpgradeCode equivalent);
    - hardware/OS gates so a user on macOS 11 doesn't get an
      installer that targets utun on macOS 13+.

  The component-pkg .pkg itself is pkgbuild-produced from
  packaging/mac/pkg/payload/. We embed it via <pkg-ref ...> +
  <choices-outline> below. Single-choice install — no sub-features.
-->
<installer-gui-script minSpecVersion="2">
    <title>Free VPN CLI</title>
    <organization>org.freevpnapp</organization>
    <!-- Default install location is /. We don't let the user
         change it from the wizard; the binaries always land in
         /usr/local/bin (CLI) and /Applications (GUI). -->
    <options customize="never" allow-external-scripts="no" require-scripts="no" rootVolumeOnly="true"/>
    <!-- Optional Welcome and Conclusion screens. Plain HTML
         displayed inside the Installer wizard frame. -->
    <welcome file="welcome.html" mime-type="text/html"/>
    <conclusion file="conclusion.html" mime-type="text/html"/>
    <!-- Apple's notarization service rejects unsigned pkgs, so we
         declare an identifier that productsign + notarytool both
         expect to see in the resulting .pkg's Info.plist. -->
    <pkg-ref id="org.freevpnapp.cli">
        <bundle-version>
            <bundle CFBundleShortVersionString="0.2.10" CFBundleVersion="0.2.10" id="com.wails.Free VPN CLI" path="Applications/Free VPN CLI.app"/>
        </bundle-version>
    </pkg-ref>
    <pkg-ref id="org.freevpnapp.cli" version="0.2.16" installKBytes="50910" updateKBytes="0">#freevpn-cli.pkg</pkg-ref>
    <!-- Single forced choice ("the product"). customize="never"
         above hides the customise pane entirely so users get a
         3-step wizard: Welcome → Install → Conclusion. -->
    <choices-outline>
        <line choice="default">
            <line choice="org.freevpnapp.cli"/>
        </line>
    </choices-outline>
    <choice id="default"/>
    <choice id="org.freevpnapp.cli" visible="false">
        <pkg-ref id="org.freevpnapp.cli"/>
    </choice>
    <!-- Minimum macOS = 11 (Big Sur). matches the CLI/daemon's
         own deployment target. Older releases get a clean refusal
         from Installer rather than a cryptic dyld error mid-install. -->
    <volume-check>
        <allowed-os-versions>
            <os-version min="11.0"/>
        </allowed-os-versions>
    </volume-check>
</installer-gui-script>