Improve Xcode and CLT installation instructions.

This commit is contained in:
Mike McQuaid 2013-10-23 17:44:43 +01:00
parent 3fb38ea69e
commit 9ebc527e49
3 changed files with 85 additions and 26 deletions

View File

@ -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.

View File

@ -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

View File

@ -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