lib/ruboss4ruby/tasks.rb in dima-ruboss4ruby-1.1.0 vs lib/ruboss4ruby/tasks.rb in dima-ruboss4ruby-1.1.1

- old
+ new

@@ -1,13 +1,16 @@ +# Rake tasks for building Ruboss-based Flex and AIR applications require 'rake' require 'ftools' require 'rexml/document' require File.join(File.dirname(__FILE__), 'configuration') APP_ROOT = Ruboss4Ruby::Configuration::APP_ROOT namespace :ruboss do + # Compile the main Flex/AIR application using given executable to the given + # destination folder def compile_app(executable, destination, opts = '') app_properties = REXML::Document.new(File.open(File.join(APP_ROOT, ".actionScriptProperties"))) app_properties.elements.each("*/applications/application") do |elm| app_path = elm.attributes['path'] project_path = File.join(APP_ROOT, "app/flex", app_path) @@ -41,14 +44,16 @@ "It is possible that '(a)mxmlc' executable was not found or there are compilation errors." end end end + # Find what the main application is based on .actionScriptProperties file def get_main_application app_properties = REXML::Document.new(File.open(File.join(APP_ROOT, ".actionScriptProperties"))) app_properties.root.attributes['mainApplicationPath'].split("/").last end + # Get appropriate executable based on platform def get_executable(executable) if RUBY_PLATFORM =~ /mswin32/ executable << '.exe' end executable \ No newline at end of file