lib/flashsdk/fcsh.rb in flashsdk-1.0.14.pre vs lib/flashsdk/fcsh.rb in flashsdk-1.0.15.pre
- old
+ new
@@ -58,8 +58,106 @@
add_action :mxmlc
##
# Exit FCSH
add_action :quit
+
+ end
+end
+
+##
+# Rake task that will make any subsequent
+# mxmlc or compc tasks use the FCSH compiler.
+#
+# You can use this task by inserting it
+# before the task you're calling on the
+# command line like:
+#
+# rake fcsh test
+#
+# or:
+#
+# rake fcsh debug
+#
+# Or you can add this task as a prerequisite
+# to your build tasks directly like:
+#
+# mxmlc 'bin/SomeProject.swf' => :fcsh do |t|
+# ...
+# end
+#
+desc "Make subsequent MXMLC or COMPC tasks use FCSH"
+task :fcsh do
+ ENV['USE_FCSH'] = 'true'
+end
+
+##
+# Rake task that will make any subsequent
+# mxmlc or compc tasks use the FCSH compiler.
+#
+# You can use this task by inserting it
+# before the task you're calling on the
+# command line like:
+#
+# rake fcsh test
+#
+# or:
+#
+# rake fcsh debug
+#
+# Or you can add this task as a prerequisite
+# to your build tasks directly like:
+#
+# mxmlc 'bin/SomeProject.swf' => :fcsh do |t|
+# ...
+# end
+#
+desc "Make subsequent MXMLC or COMPC tasks use FCSH"
+task :fcsh do
+ ENV['USE_FCSH'] = 'true'
+end
+##
+# Rake task that will make any subsequent
+# mxmlc or compc tasks use the FCSH compiler.
+#
+# You can use this task by inserting it
+# before the task you're calling on the
+# command line like:
+#
+# rake fcsh test
+#
+# or:
+#
+# rake fcsh debug
+#
+# Or you can add this task as a prerequisite
+# to your build tasks directly like:
+#
+# mxmlc 'bin/SomeProject.swf' => :fcsh do |t|
+# ...
+# end
+#
+desc "Make subsequent MXMLC or COMPC tasks use FCSH"
+task :fcsh do
+ ENV['USE_FCSH'] = 'true'
+end
+
+namespace :fcsh do
+ desc "Start the FCSH server"
+ task :start do
+ server = FlashSDK::FCSHSocket.new
+ server.listen ENV['FCSH_PKG_NAME'], ENV['FCSH_PKG_VERSION'], ENV['FCSH_PORT']
+ end
+
+ desc "Clear the cached compilation data"
+ task :clear do
+ client = FlashSDK::FCSHSocket.new
+ client.execute "clear", ENV['FCSH_PORT']
+ end
+
+ desc "Quit the fcsh server"
+ task :quit do
+ client = FlashSDK::FCSHSocket.new
+ client.execute "quit", ENV['FCSH_PORT']
end
end