0
PASSENGER_ROOT = File.expand_path(File.dirname(__FILE__) << "/..")
0
-PASSENGER_WEBSITE = "http://passenger.phusion.nl/"
0
-PHUSION_WEBSITE = "www.phusion.nl"
0
$LOAD_PATH.unshift("#{PASSENGER_ROOT}/lib")
0
require 'passenger/platform_info'
0
+require 'passenger/dependencies'
0
+require 'passenger/console_text_template'
0
+ REQUIRED_DEPENDENCIES = [
0
+ Dependencies::Ruby_DevHeaders,
0
+ Dependencies::RubyGems,
0
+ Dependencies::Apache2,
0
+ Dependencies::Apache2_DevHeaders,
0
+ Dependencies::APR_DevHeaders
0
+ def init_terminal_colors
0
+ STDOUT.write("\e[0m\e[37m\e[40m")
0
+ def reset_terminal_colors
0
+ def check_dependencies
0
+ missing_dependencies = []
0
+ color_puts "<banner>Checking for required software...</banner>"
0
+ REQUIRED_DEPENDENCIES.each do |dep|
0
+ color_print " * #{dep.name}... "
0
+ color_puts "<green>found at #{result.found_at}</green>"
0
+ color_puts "<green>found</green>"
0
+ color_puts "<red>not found</red>"
0
+ missing_dependencies << dep
0
+ missing_dependencies = REQUIRED_DEPENDENCIES
0
+ if !missing_dependencies.empty?
0
+ color_puts "<red>Some required software is not installed.</red>"
0
+ color_puts "But don't worry, this installer will tell you how to install them.\n"
0
+ color_puts "<b>Press Enter to continue, or Ctrl-C to abort.</b>"
0
+ color_puts "<banner>Installation instructions for required software</banner>"
0
+ missing_dependencies.each do |dep|
0
+ color_puts " * To install <yellow>#{dep.name}</yellow>:"
0
+ if !dep.install_command.nil?
0
+ color_puts " Please run <b>#{dep.install_command}</b> as root."
0
+ elsif !dep.install_instructions.nil?
0
+ color_puts " " << dep.install_instructions
0
+ elsif !dep.website.nil?
0
+ color_puts " Please download it from <b>#{dep.website}</b>"
0
+ color_puts " Search Google."
0
+ STDOUT.write(ConsoleTextTemplate.new(:text => text).result)
0
+ color_print("#{text}\n")
0
+ puts "--------------------------------------------"
0
+PASSENGER_WEBSITE = "http://passenger.phusion.nl/"
0
+PHUSION_WEBSITE = "www.phusion.nl"
0
Dir.chdir(PASSENGER_ROOT)
Comments
No one has commented yet.