Class: Sprout::ADLTask

Inherits:
ToolTask
  • Object
show all
Defined in:
lib/sprout/tasks/adl_task.rb,
lib/sprout/tasks/adt_documentation.rb

Overview

The ADL Task provides Rake support for the adl, Adobe Debug Launcher command. livedocs.adobe.com/flex/3/html/help.html?content=CommandLineTools_4.html#1031914

The following example can be pasted in a file named ‘rakefile.rb’:

# Create an ADL task named :run dependent upon the swf that it is using for the window content
adl :run => 'SomeProject.swf' do |t|
  t.root_directory = model.project_path
  t.application_descriptor = "#{model.src_dir}/TestProj-app.xml"
end

Instance Method Summary collapse

Instance Method Details

#application_descriptor=(file) ⇒ Object

The application descriptor file.



37
38
39
# File 'lib/sprout/tasks/adt_documentation.rb', line 37

def application_descriptor=(file)
  @application_descriptor = file
end

#arguments=(string) ⇒ Object

Passed to the application as command-line arguments.



49
50
51
# File 'lib/sprout/tasks/adt_documentation.rb', line 49

def arguments=(string)
  @arguments = string
end

#initialize_taskObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/sprout/tasks/adl_task.rb', line 16

def initialize_task
  super
  @default_gem_name = 'sprout-flex3sdk-tool'
  @default_gem_path = 'bin/adl'

  add_param(:runtime, :file) do |p|
    p.delimiter = " "
    p.description = <<-DESC
    Specifies the directory containing the runtime to use. If not 
    specified, the runtime directory in the same SDK as the ADL program
    will be used. If you move ADL out of its SDK folder, then you must 
    specify the runtime directory. On Windows, specify the directory 
    containing the Adobe AIR directory. On Mac OSX, specify the directory 
    containing Adobe AIR.framework.
    DESC
  end

  add_param(:nodebug, :boolean) do |p|
    p.hidden_value = true
    p.description = <<-DESC
    Turns off debugging support. If used, the application process cannot 
    connect to the Flash debugger and dialogs for unhandled exceptions are
    suppressed. 
    
    Trace statements still print to the console window. Turning off 
    debugging allows your application to run a little faster and also 
    emulates the execution mode of an installed application more closely.
    DESC
  end
  
  add_param(:pubid, :string) do |p|
    p.delimiter = " "
    p.description = <<-DESC
    Assigns the specified value as the publisher ID of the AIR application 
    for this run. Specifying a temporary publisher ID allows you to test 
    features of an AIR application, such as communicating over a local 
    connection, that use the publisher ID to help uniquely identify an 
    application. 
    
    The final publisher ID is determined by the digital certificate used to 
    sign the AIR installation file.
    DESC
  end

  add_param(:application_descriptor, :file) do |p|
    p.hidden_name = true
    p.required = true
    p.description = "The application descriptor file."
  end
  
  add_param(:root_directory, :file) do |p|
    p.hidden_name = true
    p.required = true
    p.description = <<-DESC
    The root directory of the application to run. If not 
    specified, the directory containing the application 
    descriptor file is used.
    DESC
  end
  
  add_param(:arguments, :string) do |p|
    p.shell_name = "--"
    p.delimiter = " "
    p.description = <<-DESC
    Passed to the application as command-line arguments.
    DESC
  end
        
end

#nodebug=(boolean) ⇒ Object

Turns off debugging support. If used, the application process cannot

connect to the Flash debugger and dialogs for unhandled exceptions are
suppressed. 

Trace statements still print to the console window. Turning off 
debugging allows your application to run a little faster and also 
emulates the execution mode of an installed application more closely.


20
21
22
# File 'lib/sprout/tasks/adt_documentation.rb', line 20

def nodebug=(boolean)
  @nodebug = boolean
end

#pubid=(string) ⇒ Object

Assigns the specified value as the publisher ID of the AIR application

for this run. Specifying a temporary publisher ID allows you to test 
features of an AIR application, such as communicating over a local 
connection, that use the publisher ID to help uniquely identify an 
application. 

The final publisher ID is determined by the digital certificate used to 
sign the AIR installation file.


32
33
34
# File 'lib/sprout/tasks/adt_documentation.rb', line 32

def pubid=(string)
  @pubid = string
end

#root_directory=(file) ⇒ Object

The root directory of the application to run. If not

specified, the directory containing the application 
descriptor file is used.


44
45
46
# File 'lib/sprout/tasks/adt_documentation.rb', line 44

def root_directory=(file)
  @root_directory = file
end

#runtime=(file) ⇒ Object

containing Adobe AIR.framework.



9
10
11
# File 'lib/sprout/tasks/adt_documentation.rb', line 9

def runtime=(file)
  @runtime = file
end