brew/package/Distribution.xml
Mike McQuaid c5afd5d056
macOS .pkg improvements
- don't include GitHub Actions credentials
- generate and include RTF version of Homebrew BSD license
- create nicer installer with `productbuild`
- customise welcome/conclusion messages
- add Homebrew logo as a background image
- remove unnecessary `preinstall` script
- cleanup `postinstall` script to pass `brew doctor`
- use `Distribution.xml` for a nicer installer
- require CLT or Xcode rather than using our hacks to try and install
  CLT during installation
2023-07-25 15:47:34 +01:00

48 lines
1.7 KiB
XML

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<installer-gui-script minSpecVersion="2">
<pkg-ref id="sh.brew.homebrew"/>
<options customize="never" hostArchitectures="x86_64,arm64" rootVolumeOnly="true"/>
<volume-check>
<allowed-os-versions>
<os-version min="11.0.0"/>
</allowed-os-versions>
</volume-check>
<choices-outline>
<line choice="default">
<line choice="sh.brew.homebrew"/>
</line>
</choices-outline>
<choice id="default"/>
<choice id="sh.brew.homebrew" visible="false">
<pkg-ref id="sh.brew.homebrew"/>
</choice>
<pkg-ref id="sh.brew.homebrew" onConclusion="none">Homebrew.pkg</pkg-ref>
<title>Homebrew</title>
<organization>sh.brew</organization>
<background file="Homebrew.png" alignment="bottomleft" scaling="proportional"/>
<background-darkAqua file="Homebrew.png" alignment="bottomleft" scaling="proportional"/>
<welcome file="WELCOME.rtf"/>
<license file="LICENSE.rtf"/>
<conclusion file="CONCLUSION.rtf" />
<allowed-os-versions>
<os-version min="11.0"/>
</allowed-os-versions>
<script>
function installation_check() {
if (system.files.fileExistsAtPath("/Library/Developer/CommandLineTools/usr/bin/git") ||
system.files.fileExistsAtPath("/Applications/Xcode.app/Contents/Developer/usr/bin/git")) {
return true;
} else {
my.result.title = "Xcode Command Line Tools (CLT) are missing";
my.result.message = "You must install the Xcode Command Line Tools (CLT) or Xcode before installing Homebrew. Install the CLT by running `xcode-select --install` from a Terminal.";
my.result.type = "Fatal";
return false;
}
}
</script>
<installation-check script="installation_check()" />
</installer-gui-script>