namespace :air do desc "Compile" task :compile do begin project = Airake::Project.new_from_rake(ENV) fcsh = PatternPark::FCSH.new_from_rake(ENV) fcsh.execute([ project.base_dir, project.mxmlc_command ]) rescue PatternPark::FCSHConnectError => e puts "Cannot connect to FCSHD (start by running: rake air:fcshd); Continuing compilation..." project.run_mxmlc end end desc "Test" task :test do ENV["DEBUG"] = "true" unless ENV.has_key?("DEBUG") test_project = Airake::Project.new_from_rake(ENV, true) test_project.run_mxmlc test_project.run_adl end desc "Package" task :package => :compile do project = Airake::Project.new_from_rake(ENV) project.run_adt end task :set_debug do ENV["DEBUG"] = "true" unless ENV.has_key?("DEBUG") end desc "Apollo Debug Luncher" task :adl => [ :set_debug, :compile ] do project = Airake::Project.new_from_rake(ENV) project.run_adl end end