Class: FlexUtils::Mxmlc

Inherits:
Asc
  • Object
show all
Defined in:
lib/flexutils/mxmlc.rb

Instance Attribute Summary collapse

Attributes inherited from Asc

#debug, #defines, #external_library_path, #fail_on_error, #fail_on_warning, #incremental, #keep_as3_metadata, #library_path, #locale, #optimize, #output, #source_path, #strict, #target_player, #use_network, #verbose_stacktraces, #warnings

Instance Method Summary collapse

Methods inherited from Asc

#command_string, compile, #compile!, #compiler=, #defines_str

Constructor Details

#initialize(output, main_class) ⇒ Mxmlc

Returns a new instance of Mxmlc.



9
10
11
12
13
14
15
16
17
18
# File 'lib/flexutils/mxmlc.rb', line 9

def initialize( output, main_class )
  super(output)
  
  @main_class = main_class

  @keep_generated_actionscript = false
  @allow_source_path_overlap   = false

  @theme_files = []
end

Instance Attribute Details

#allow_source_path_overlap=(value) ⇒ Object (writeonly)

list of paths to theme SWC or CSS files



5
6
7
# File 'lib/flexutils/mxmlc.rb', line 5

def allow_source_path_overlap=(value)
  @allow_source_path_overlap = value
end

#keep_generated_actionscript=(value) ⇒ Object (writeonly)

list of paths to theme SWC or CSS files



5
6
7
# File 'lib/flexutils/mxmlc.rb', line 5

def keep_generated_actionscript=(value)
  @keep_generated_actionscript = value
end

#theme_files=(value) ⇒ Object (writeonly)

list of paths to theme SWC or CSS files



5
6
7
# File 'lib/flexutils/mxmlc.rb', line 5

def theme_files=(value)
  @theme_files = value
end

Instance Method Details

#compiler_base_nameObject



20
21
22
# File 'lib/flexutils/mxmlc.rb', line 20

def compiler_base_name
  "mxmlc"
end

#compiler_flagsObject



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/flexutils/mxmlc.rb', line 24

def compiler_flags
  all_flags = super()

  all_flags << "-allow-source-path-overlap"   if @allow_source_path_overlap
  all_flags << "-keep-generated-actionscript" if @keep_generated_actionscript

  all_flags << "-output #{@output}"

  all_flags << "-theme #{@theme_files.join(' ')}" unless @theme_files.empty?

  all_flags << "--"

  all_flags << @main_class

  all_flags
end