Improve Xcode and CLT installation instructions.
This commit is contained in:
		
							parent
							
								
									3fb38ea69e
								
							
						
					
					
						commit
						9ebc527e49
					
				@ -40,10 +40,16 @@ def blacklisted? name
 | 
				
			|||||||
    EOS
 | 
					    EOS
 | 
				
			||||||
  when /(lib)?lzma/
 | 
					  when /(lib)?lzma/
 | 
				
			||||||
    "lzma is now part of the xz formula."
 | 
					    "lzma is now part of the xz formula."
 | 
				
			||||||
  when 'xcode' then <<-EOS.undent
 | 
					  when 'xcode'
 | 
				
			||||||
    Xcode can be installed via the App Store (on Lion or newer), or from:
 | 
					    if MacOS.version >= :lion
 | 
				
			||||||
      https://developer.apple.com/downloads/
 | 
					      <<-EOS.undent
 | 
				
			||||||
    EOS
 | 
					      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
 | 
					  when 'gtest', 'googletest', 'google-test' then <<-EOS.undent
 | 
				
			||||||
    Installing gtest system-wide is not recommended; it should be vendored
 | 
					    Installing gtest system-wide is not recommended; it should be vendored
 | 
				
			||||||
    in your projects that use it.
 | 
					    in your projects that use it.
 | 
				
			||||||
 | 
				
			|||||||
@ -193,34 +193,68 @@ end
 | 
				
			|||||||
def check_xcode_clt
 | 
					def check_xcode_clt
 | 
				
			||||||
  if MacOS::Xcode.installed?
 | 
					  if MacOS::Xcode.installed?
 | 
				
			||||||
    __check_xcode_up_to_date
 | 
					    __check_xcode_up_to_date
 | 
				
			||||||
  elsif MacOS.version >= "10.7"
 | 
					  elsif MacOS.version >= :lion
 | 
				
			||||||
    __check_clt_up_to_date
 | 
					    __check_clt_up_to_date
 | 
				
			||||||
  else <<-EOS.undent
 | 
					  else <<-EOS.undent
 | 
				
			||||||
    Xcode not installed
 | 
					      Xcode is not installed
 | 
				
			||||||
    Most stuff needs Xcode to build: http://developer.apple.com/xcode/
 | 
					      Most formulae need Xcode to build.
 | 
				
			||||||
 | 
					      It can be installed from https://developer.apple.com/downloads/
 | 
				
			||||||
    EOS
 | 
					    EOS
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def __check_xcode_up_to_date
 | 
					def __check_xcode_up_to_date
 | 
				
			||||||
  if MacOS::Xcode.outdated? then <<-EOS.undent
 | 
					  if MacOS::Xcode.outdated?
 | 
				
			||||||
    Your Xcode (#{MacOS::Xcode.version}) is outdated
 | 
					    message = <<-EOS.undent
 | 
				
			||||||
    Please install Xcode #{MacOS::Xcode.latest_version}.
 | 
					      Your Xcode (#{MacOS::Xcode.version}) is outdated
 | 
				
			||||||
 | 
					      Please update to Xcode #{MacOS::Xcode.latest_version}.
 | 
				
			||||||
    EOS
 | 
					    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
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def __check_clt_up_to_date
 | 
					def __check_clt_up_to_date
 | 
				
			||||||
  if not MacOS::CLT.installed? then <<-EOS.undent
 | 
					  if not MacOS::CLT.installed?
 | 
				
			||||||
    No developer tools installed
 | 
					    message = <<-EOS.undent
 | 
				
			||||||
    You should install the Command Line Tools:
 | 
					      No developer tools installed.
 | 
				
			||||||
      https://developer.apple.com/downloads/
 | 
					      You should install the Command Line Tools.
 | 
				
			||||||
    EOS
 | 
					    EOS
 | 
				
			||||||
  elsif MacOS::CLT.outdated? then <<-EOS.undent
 | 
					    if MacOS.version >= :mavericks
 | 
				
			||||||
    A newer Command Line Tools release is available
 | 
					      message += <<-EOS.undent
 | 
				
			||||||
    You should install the latest version from:
 | 
					        Run `xcode-select --install` to install them.
 | 
				
			||||||
      https://developer.apple.com/downloads
 | 
					      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
 | 
					    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
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -12,10 +12,20 @@ class XcodeDependency < Requirement
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  satisfy(:build_env => false) { MacOS::Xcode.installed? }
 | 
					  satisfy(:build_env => false) { MacOS::Xcode.installed? }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def message; <<-EOS.undent
 | 
					  def message
 | 
				
			||||||
    A full installation of Xcode.app is required to compile this software.
 | 
					    message = <<-EOS.undent
 | 
				
			||||||
    Installing just the Command Line Tools is not sufficient.
 | 
					      A full installation of Xcode.app is required to compile this software.
 | 
				
			||||||
 | 
					      Installing just the Command Line Tools is not sufficient.
 | 
				
			||||||
    EOS
 | 
					    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
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -58,12 +68,21 @@ class CLTDependency < Requirement
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  satisfy(:build_env => false) { MacOS::CLT.installed? }
 | 
					  satisfy(:build_env => false) { MacOS::CLT.installed? }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def message; <<-EOS.undent
 | 
					  def message
 | 
				
			||||||
    The Command Line Tools are required to compile this software.
 | 
					    message = <<-EOS.undent
 | 
				
			||||||
    The standalone package can be obtained from
 | 
					      The Command Line Tools are required to compile this software.
 | 
				
			||||||
    https://developer.apple.com/downloads/,
 | 
					 | 
				
			||||||
    or it can be installed via Xcode's preferences.
 | 
					 | 
				
			||||||
    EOS
 | 
					    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
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user