aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2013-10-23 17:44:43 +0100
committerMike McQuaid2013-10-23 17:44:43 +0100
commit9fa87d69a50007efc34e539133d63cc7a37f13f2 (patch)
treee981417eafebb446f35f4d2e12b888a6e2cc510b
parentebc31c344fbad909bc57de54c169d77face3d6da (diff)
downloadhomebrew-9fa87d69a50007efc34e539133d63cc7a37f13f2.tar.bz2
Improve Xcode and CLT installation instructions.
-rw-r--r--Library/Homebrew/blacklist.rb14
-rw-r--r--Library/Homebrew/cmd/doctor.rb62
-rw-r--r--Library/Homebrew/requirements.rb35
3 files changed, 85 insertions, 26 deletions
diff --git a/Library/Homebrew/blacklist.rb b/Library/Homebrew/blacklist.rb
index 958c4154c..4f981fa8b 100644
--- a/Library/Homebrew/blacklist.rb
+++ b/Library/Homebrew/blacklist.rb
@@ -40,10 +40,16 @@ def blacklisted? name
EOS
when /(lib)?lzma/
"lzma is now part of the xz formula."
- when 'xcode' then <<-EOS.undent
- Xcode can be installed via the App Store (on Lion or newer), or from:
- https://developer.apple.com/downloads/
- EOS
+ when 'xcode'
+ if MacOS.version >= :lion
+ <<-EOS.undent
+ Xcode can be installed from the App Store.
+ EOS
+ else
+ <<-EOS.undent
+ Xcode can be installed from https://developer.apple.com/downloads/
+ EOS
+ end
when 'gtest', 'googletest', 'google-test' then <<-EOS.undent
Installing gtest system-wide is not recommended; it should be vendored
in your projects that use it.
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 059e6f284..47ad62027 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -193,34 +193,68 @@ end
def check_xcode_clt
if MacOS::Xcode.installed?
__check_xcode_up_to_date
- elsif MacOS.version >= "10.7"
+ elsif MacOS.version >= :lion
__check_clt_up_to_date
else <<-EOS.undent
- Xcode not installed
- Most stuff needs Xcode to build: http://developer.apple.com/xcode/
+ Xcode is not installed
+ Most formulae need Xcode to build.
+ It can be installed from https://developer.apple.com/downloads/
EOS
end
end
def __check_xcode_up_to_date
- if MacOS::Xcode.outdated? then <<-EOS.undent
- Your Xcode (#{MacOS::Xcode.version}) is outdated
- Please install Xcode #{MacOS::Xcode.latest_version}.
+ if MacOS::Xcode.outdated?
+ message = <<-EOS.undent
+ Your Xcode (#{MacOS::Xcode.version}) is outdated
+ Please update to Xcode #{MacOS::Xcode.latest_version}.
EOS
+ if MacOS.version >= :lion
+ message += <<-EOS.undent
+ Xcode can be updated from the App Store.
+ EOS
+ else
+ message += <<-EOS.undent
+ Xcode can be updated from https://developer.apple.com/downloads/
+ EOS
+ end
+ message
end
end
def __check_clt_up_to_date
- if not MacOS::CLT.installed? then <<-EOS.undent
- No developer tools installed
- You should install the Command Line Tools:
- https://developer.apple.com/downloads/
+ if not MacOS::CLT.installed?
+ message = <<-EOS.undent
+ No developer tools installed.
+ You should install the Command Line Tools.
EOS
- elsif MacOS::CLT.outdated? then <<-EOS.undent
- A newer Command Line Tools release is available
- You should install the latest version from:
- https://developer.apple.com/downloads
+ if MacOS.version >= :mavericks
+ message += <<-EOS.undent
+ Run `xcode-select --install` to install them.
+ EOS
+ else
+ message += <<-EOS.undent
+ The standalone package can be obtained from
+ https://developer.apple.com/downloads/,
+ or it can be installed via Xcode's preferences.
+ EOS
+ end
+ message
+ elsif MacOS::CLT.outdated?
+ message = <<-EOS.undent
+ A newer Command Line Tools release is available
EOS
+ if MacOS.version >= :mavericks
+ message += <<-EOS.undent
+ Update them from Software Update in the App Store.
+ EOS
+ else
+ message += <<-EOS.undent
+ The standalone package can be obtained from
+ https://developer.apple.com/downloads/,
+ or it can be installed via Xcode's preferences.
+ EOS
+ end
end
end
diff --git a/Library/Homebrew/requirements.rb b/Library/Homebrew/requirements.rb
index b195af98e..73e0860b7 100644
--- a/Library/Homebrew/requirements.rb
+++ b/Library/Homebrew/requirements.rb
@@ -12,10 +12,20 @@ class XcodeDependency < Requirement
satisfy(:build_env => false) { MacOS::Xcode.installed? }
- def message; <<-EOS.undent
- A full installation of Xcode.app is required to compile this software.
- Installing just the Command Line Tools is not sufficient.
+ def message
+ message = <<-EOS.undent
+ A full installation of Xcode.app is required to compile this software.
+ Installing just the Command Line Tools is not sufficient.
EOS
+ if MacOS.version >= :lion
+ message += <<-EOS.undent
+ Xcode can be installed from the App Store.
+ EOS
+ else
+ message += <<-EOS.undent
+ Xcode can be installed from https://developer.apple.com/downloads/
+ EOS
+ end
end
end
@@ -58,12 +68,21 @@ class CLTDependency < Requirement
satisfy(:build_env => false) { MacOS::CLT.installed? }
- def message; <<-EOS.undent
- The Command Line Tools are required to compile this software.
- The standalone package can be obtained from
- https://developer.apple.com/downloads/,
- or it can be installed via Xcode's preferences.
+ def message
+ message = <<-EOS.undent
+ The Command Line Tools are required to compile this software.
EOS
+ if MacOS.version >= :mavericks
+ message += <<-EOS.undent
+ Run `xcode-select --install` to install them.
+ EOS
+ else
+ message += <<-EOS.undent
+ The standalone package can be obtained from
+ https://developer.apple.com/downloads/,
+ or it can be installed via Xcode's preferences.
+ EOS
+ end
end
end