def check_dependencies(show_new_screen = true)
new_screen if show_new_screen
puts "<banner>Checking for required software...</banner>"
puts
require 'phusion_passenger/platform_info/depcheck'
specs, ids = dependencies
runner = PlatformInfo::Depcheck::ConsoleRunner.new
specs.each do |spec|
PlatformInfo::Depcheck.load(spec)
end
ids.each do |id|
runner.add(id)
end
if runner.check_all
return true
else
puts
puts "<red>Some required software is not installed.</red>"
puts "But don't worry, this installer will tell you how to install them.\n"
puts "<b>Press Enter to continue, or Ctrl-C to abort.</b>"
if PhusionPassenger.originally_packaged?
wait
else
wait(10)
end
line
puts
puts "<banner>Installation instructions for required software</banner>"
puts
runner.missing_dependencies.each do |dep|
puts " * To install <yellow>#{dep.name}</yellow>:"
puts " #{dep.install_instructions}"
puts
end
if respond_to?(:users_guide)
puts "If the aforementioned instructions didn't solve your problem, then please take"
puts "a look at the Users Guide:"
puts
puts " <yellow>#{users_guide}</yellow>"
end
return false
end
end