Class: FlexCompiler::CommandGenerator
- Inherits:
-
Object
- Object
- FlexCompiler::CommandGenerator
- Defined in:
- lib/flex-compiler.rb
Constant Summary collapse
- PLAYER_GLOBAL =
"playerglobal"
Instance Method Summary collapse
- #command ⇒ Object
-
#initialize(options) ⇒ CommandGenerator
constructor
A new instance of CommandGenerator.
Constructor Details
#initialize(options) ⇒ CommandGenerator
Returns a new instance of CommandGenerator.
74 75 76 |
# File 'lib/flex-compiler.rb', line 74 def initialize() @options = end |
Instance Method Details
#command ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/flex-compiler.rb', line 78 def command bin = "#{@options.flex_home}\\bin\\" if( application.nil? ) exe = "#{bin}compc.exe" else exe = "#{bin}mxmlc.exe" end sources = "-source-path #{src_dir}" if( File.exists? locale_dir ) locale_string = "-locale #{discover_locale}" include_bundles = "-include-resource-bundles #{discover_rb}" sources += " #{locale_dir}/{locale}" end args = [ source_path_overlap, locale_string, include_bundles, framework_library_paths, lib_paths, sources, dump_config, output ] if( compc? ) #the ordering is important here: args = [include_stylesheets, include_assets, classes ] + args else args << "#{src_dir}/#{application}.mxml" end add_output_folder command = "\"#{exe}\" #{args.join(' ')}" command end |