lib/flashsdk/compiler_base.rb in flashsdk-1.0.14.pre vs lib/flashsdk/compiler_base.rb in flashsdk-1.0.15.pre

- old
+ new

@@ -637,10 +637,23 @@ # end # attr_accessor :use_fcsh ## + # The FCSH port to use for connections. If you are building from + # multiple different directories, you will need to start up the + # FCSH servers on different ports. This can be done like: + # + # rake fcsh:start FCSH_PORT=12322 + # + # and in another terminal: + # + # rake fcsh mxmlc FCSH_PORT=12322 + # + attr_accessor :fcsh_port + + ## # Temporary override while waiting for integration of next version! # TODO: Remove this method override. def execute prepare super @@ -664,28 +677,34 @@ end path end ## - # @override + # override def prepare # Check for USE_FCSH on the environment # variable hash, update instance value # if found to be true: if ENV['USE_FCSH'].to_s == 'true' self.use_fcsh = true end + + if !ENV['FCSH_PORT'].nil? + self.fcsh_port = ENV['FCSH_PORT'] + end + super end ## - # @override + # override def execute_delegate (use_fcsh) ? execute_with_fcsh : super end def execute_with_fcsh - #puts "[execute_with_fcsh] #{executable} #{to_shell}" + client = FlashSDK::FCSHSocket.new + client.execute "#{executable.to_s} #{to_shell}", ENV['FCSH_PORT'] end end end