lib/airake/project.rb in airake-0.3.1 vs lib/airake/project.rb in airake-0.3.2
- old
+ new
@@ -30,11 +30,11 @@
# debug: "true" or "false"
# assets: Path to assets
# certificate: Path to certificate
#
# Other options:
- # :amxmlc_path, :adt_path, :adl_path, :asdoc_path, :amxmlc_extra_opts, :adt_extra_opts, :adl_extra_opts, :asdoc_extra_opts
+ # :mxmlc_path, :adt_path, :adl_path, :asdoc_path, :mxmlc_extra_opts, :adt_extra_opts, :adl_extra_opts, :asdoc_extra_opts
#
def initialize(base_dir, mxml_path, options = {}, build_env = :normal)
raise ArgumentError, "Invalid MXML path: #{mxml_path}" if mxml_path.blank?
mxml_dir = File.expand_path(File.dirname(mxml_path))
@@ -56,26 +56,31 @@
@swf_path = options[:swf_path] || File.join(@bin_dir, "#{project_name}.swf")
# Debug options
@debug = options[:debug].is_a?(TrueClass) || options[:debug] == "true"
- with_keyed_options([ :assets, :certificate, :amxmlc_path, :adt_path, :adl_path, :asdoc_path,
- :amxmlc_extra_opts, :adt_extra_opts, :adl_extra_opts, :asdoc_extra_opts ], options)
+ with_keyed_options([ :assets, :certificate, :mxmlc_path, :adt_path, :adl_path, :asdoc_path,
+ :mxmlc_extra_opts, :adt_extra_opts, :adl_extra_opts, :asdoc_extra_opts ], options)
end
- # Flex compiler command for this project
+ # Flex compiler command (under AIR) for this project
def amxmlc
+ mxmlc({ :config_name => "air" })
+ end
+
+ # Flex compiler command for this project
+ def mxmlc(options = {})
src_dirs = case build_env
when :normal then [ @src_dir ]
when :test then [ @src_dir, @test_dir ]
else raise "Invalid build_env setting: #{build_env}"
end
- options = { :swf_path => @swf_path, :mxml_path => @mxml_path, :lib_dir => @lib_dir,
- :src_dirs => src_dirs, :debug => @debug, :amxmlc_extra_opts => @amxmlc_extra_opts,
- :amxmlc_path => @amxmlc_path }
+ options = options.merge({ :swf_path => @swf_path, :mxml_path => @mxml_path, :lib_dir => @lib_dir,
+ :src_dirs => src_dirs, :debug => @debug, :mxmlc_extra_opts => @mxmlc_extra_opts,
+ :mxmlc_path => @mxmlc_path })
- Airake::Commands::Amxmlc.new(options)
+ Airake::Commands::Mxmlc.new(options)
end
# ADL command for this project
def adl
options = { :appxml_path => @appxml_path, :base_dir => @base_dir, :adl_extra_opts => @adl_extra_opts,
\ No newline at end of file