blob: 11beb5a6777ee508e55c3f935a0eabbb6675e483 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--
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="{{.HostArchs}}" customize="never" allow-external-scripts="no" />
<domains enable_localSystem="true" />
<installation-check script="installCheck();" />
<script>
function installCheck() {
if (!(system.compareVersions(system.version.ProductVersion, '{{.MinOS}}') >= 0)) {
my.result.title = 'Unable to install';
my.result.message = 'Go requires macOS {{.MinOS}} 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">org.golang.go.pkg</pkg-ref>
</installer-gui-script>