mirror of
https://github.com/golang/go
synced 2024-10-03 08:21:21 -06:00
c17d09a657
This changes the misc/dist program to generate OS X packages using pkgbuild and productbuild. The productbuild utility makes it easy to generate packages with a custom Distribution file. This allows us to add an installcheck script that presents a friendly message to users who are running on an old version of Mac OS X. The change also fixes a few issues with the postinstall script: - In-repo version of the script has been made executable. Installers generated using the new tools couldn't execute it otherwise. - It now uses -d for checking for the existence of the Xcode specs directory. - The call to sudo.bash has been dropped since cov and prof aren't bundled with the binary distributions. Fixes #3455. Tested on 10.5.8, 10.6.0, 10.6.8 and 10.7.3. R=adg, golang-dev CC=golang-dev https://golang.org/cl/5987044
26 lines
919 B
XML
26 lines
919 B
XML
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
|
<installer-script minSpecVersion="1.000000">
|
|
<title>Go</title>
|
|
<options customize="never" allow-external-scripts="no"/>
|
|
<domains enable_localSystem="true" />
|
|
<installation-check script="installCheck();"/>
|
|
<script>
|
|
function installCheck() {
|
|
if(!(system.compareVersions(system.version.ProductVersion, '10.6.0') >= 0)) {
|
|
my.result.title = 'Unable to install';
|
|
my.result.message = 'Go requires Mac OS X 10.6 or later.';
|
|
my.result.type = 'Fatal';
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
</script>
|
|
<choices-outline>
|
|
<line choice="com.googlecode.go.choice"/>
|
|
</choices-outline>
|
|
<choice id="com.googlecode.go.choice" title="Go">
|
|
<pkg-ref id="com.googlecode.go.pkg"/>
|
|
</choice>
|
|
<pkg-ref id="com.googlecode.go.pkg" auth="Root">com.googlecode.go.pkg</pkg-ref>
|
|
</installer-script>
|