<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<installer-gui-script minSpecVersion="2">
    <title>LookingPro</title>
    <options customize="never" require-scripts="false" hostArchitectures="arm64,x86_64"/>
    <domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/>
    <allowed-os-versions>
        <os-version min="14.6"/>
    </allowed-os-versions>
    <installation-check script="checkEarlierBuild()"/>
    <script><![CDATA[
    function stop(title, message) {
      my.result.type = 'Fatal';
      my.result.title = title;
      my.result.message = message;
      return false;
    }
    function checkEarlierBuild() {
      // An earlier installer relocated the app here; it would stay beside the new one with the same bundle ID.
      if (system.files.fileExistsAtPath('/Applications/LookingPro.localized/LookingPro.app')) {
        return stop('Remove the earlier LookingPro first',
          'An earlier installer left a folder named LookingPro in your Applications folder. Quit LookingPro, delete that folder and run this installer again.');
      }
      // A bundle with another identifier at this path makes PackageKit relocate the new app
      // (BundleHasStrictIdentifier), so the install "succeeds" into /Applications/LookingPro.localized.
      // An unreadable bundle must not stop anyone: Installer may refuse this read, and that would block upgrades.
      var path = '/Applications/LookingPro.app';
      var bundle = system.files.fileExistsAtPath(path) ? system.files.bundleAtPath(path) : null;
      if (bundle && bundle.CFBundleIdentifier && bundle.CFBundleIdentifier != 'com.lookingpro.desktop') {
        return stop('Remove the earlier LookingPro first',
          'An earlier LookingPro build is in your Applications folder. Open it and click Uninstall Virtual Camera if it shows that button, then delete it from Applications and run this installer again.');
      }
      // LooperPro publishes a camera with the same device ID through its own extension.
      if (system.files.fileExistsAtPath('/Applications/LooperPro.app')) {
        my.result.type = 'Warning';
        my.result.title = 'LooperPro is installed';
        my.result.message = 'Open LooperPro and click Uninstall Virtual Camera before you continue, so that only one LookingPro camera remains on this Mac.';
        return false;
      }
      return true;
    }
  ]]></script>
    <choices-outline>
        <line choice="lookingpro"/>
    </choices-outline>
    <choice id="lookingpro" visible="false">
        <pkg-ref id="com.lookingpro.desktop"/>
    </choice>
    <pkg-ref id="com.lookingpro.desktop" version="1.0.0.20261101162207" onConclusion="none" installKBytes="3927" updateKBytes="0">#component.pkg</pkg-ref>
    <pkg-ref id="com.lookingpro.desktop">
        <bundle-version>
            <bundle CFBundleShortVersionString="1.0" CFBundleVersion="20261013194338" id="com.lookingpro.desktop.camera" path="Applications/LookingPro.app/Contents/Library/SystemExtensions/com.lookingpro.desktop.camera.systemextension"/>
            <bundle CFBundleShortVersionString="1.0.0" CFBundleVersion="20261101162207" id="com.lookingpro.desktop" path="Applications/LookingPro.app"/>
        </bundle-version>
    </pkg-ref>
</installer-gui-script>