<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!--
 Copyright 2023 The Go Authors. All rights reserved.
 Use of this source code is governed by a BSD-style
 license that can be found in the LICENSE file.
-->
<installer-gui-script minSpecVersion="1">
    <title>Go</title>
    <background mime-type="image/png" file="background.png" alignment="left"/>
    <background-darkAqua mime-type="image/png" file="background.png" alignment="left"/>
    <options hostArchitectures="x86_64" customize="never" allow-external-scripts="no"/>
    <domains enable_localSystem="true"/>
    <installation-check script="installCheck();"/>
    <script>
    function installCheck() {
      if (system.sysctl('sysctl.proc_translated') == '1') {
        my.result.title = 'Wrong installer for this device';
        my.result.message = 'This go1.26.2.darwin-amd64.pkg installer is intended for devices with an Intel 64-bit processor. To install Go on a device with an Apple 64-bit processor, please use go1.26.2.darwin-arm64.pkg instead.';
        my.result.type = 'Fatal';
        return false;
      }if (!(system.compareVersions(system.version.ProductVersion, '12') &gt;= 0)) {
        my.result.title = 'Unable to install';
        my.result.message = 'Go requires macOS 12 or later.';
        my.result.type = 'Fatal';
        return false;
      }
      if (system.files.fileExistsAtPath('/usr/local/go/bin/go')) {
        my.result.title = 'Previous Installation Detected';
        my.result.message = 'A previous installation of Go exists at /usr/local/go. This installer will remove the previous installation prior to installing. Please back up any data before proceeding.';
        my.result.type = 'Warning';
        return false;
      }
      return true;
    }
  </script>
    <choices-outline>
        <line choice="org.golang.go.choice"/>
    </choices-outline>
    <choice id="org.golang.go.choice" title="Go">
        <pkg-ref id="org.golang.go.pkg"/>
    </choice>
    <pkg-ref id="org.golang.go.pkg" auth="Root" packageIdentifier="org.golang.go" version="go1.26.2" installKBytes="233360">#org.golang.go.pkg</pkg-ref>
    <pkg-ref id="org.golang.go.pkg">
        <bundle-version/>
    </pkg-ref>
</installer-gui-script>