golang.org/x/build@v0.0.0-20240506185731-218518f32b70/internal/installer/darwinpkg/_data/dist.xml (about)

     1  <?xml version="1.0" encoding="utf-8" standalone="no"?>
     2  <!--
     3   Copyright 2023 The Go Authors. All rights reserved.
     4   Use of this source code is governed by a BSD-style
     5   license that can be found in the LICENSE file.
     6  -->
     7  
     8  <installer-gui-script minSpecVersion="1">
     9    <title>Go</title>
    10    <background mime-type="image/png" file="background.png" alignment="left" />
    11    <background-darkAqua mime-type="image/png" file="background.png" alignment="left" />
    12    <options hostArchitectures="{{.HostArchs}}" customize="never" allow-external-scripts="no" />
    13    <domains enable_localSystem="true" />
    14    <installation-check script="installCheck();" />
    15    <script>
    16      function installCheck() {
    17        if (!(system.compareVersions(system.version.ProductVersion, '{{.MinOS}}') >= 0)) {
    18          my.result.title = 'Unable to install';
    19          my.result.message = 'Go requires macOS {{.MinOS}} or later.';
    20          my.result.type = 'Fatal';
    21          return false;
    22        }
    23        if (system.files.fileExistsAtPath('/usr/local/go/bin/go')) {
    24          my.result.title = 'Previous Installation Detected';
    25          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.';
    26          my.result.type = 'Warning';
    27          return false;
    28        }
    29        return true;
    30      }
    31    </script>
    32    <choices-outline>
    33      <line choice="org.golang.go.choice" />
    34    </choices-outline>
    35    <choice id="org.golang.go.choice" title="Go">
    36      <pkg-ref id="org.golang.go.pkg" />
    37    </choice>
    38    <pkg-ref id="org.golang.go.pkg" auth="Root">org.golang.go.pkg</pkg-ref>
    39  </installer-gui-script>