Class: FlashSDK::ADT

Inherits:
Sprout::Executable::Base show all
Defined in:
flashsdk/lib/flashsdk/adt.rb

Overview

Creates AIR certificates and compiles AIR packages for distribution.

Following is an example of how this tool might be used to create a certificate and AIR package:

mxmlc 'bin/SomeProject.swf' do |t|
  t.input = 'src/SomeProject.as'
end

adt 'cert/SomeProject.pfx' do |t|
  t.certificate = true
  t.cn          = 'SelfCertificate'
  t.key_type    = '2048-RSA'
  t.pfx_file    = 'cert/SomeProject.pfx'
  # Don't check the .password file into version control:
  t.password    = File.read('cert/.password')
end

adt 'bin/SomeProject.air' => ['bin/SomeProject.swf', 'cert/SomeProject.pfx'] do |t|
  t.package        = true
  t.package_input  = 'SomeProject.xml'
  t.package_output = 'bin/SomeProject.air'
  t.storetype      = 'PKCS12'
  t.keystore       = 'cert/SomeProject.pfx'
  # Don't check the .password file into version control:
  t.storepass      = File.read('cert/.password')
  t.included_files << 'bin/SomeProject.swf'
end

desc "Compile, certify and package the AIR application"
task package => 'bin/SomeProject.air'

Constant Summary

Constants included from Sprout::Executable

DEFAULT_FILE_EXPRESSION, DEFAULT_PREFIX, DEFAULT_SHORT_PREFIX

Instance Attribute Summary (collapse)

Method Summary

Methods inherited from Sprout::Executable::Base

add_param, add_param_alias, #binary_path, #binary_path=, #create_outer_task, #default_file_expression, #execute, #execute_delegate, #from_hash, #initialize, #library_added, #parse!, #parse_extra_options!, #parse_rake_task_arg, #prepare, set, static_default_value_collection, static_parameter_collection, #stderr, #stderr=, #stdout, #stdout=, #system_execute, #to_hash, #to_help, #to_rake, #to_shell, #update_rake_task_name_from_args

Methods included from Sprout::Concern

#append_features, extended, #included

Constructor Details

This class inherits a constructor from Sprout::Executable::Base

Instance Attribute Details

- (Boolean) certificate

Set true to create a certificate.

If this value is true, you can optionally set org_unit, org_name and country.

If this value is true, you MUST set cn, key_type, and pfx_file.

adt 'cert/SampleCert.pfx' do |t|
  t.certificate = true
  t.cn = 'SelfCertificate'
  t.key_type = '1024-RSA'
  t.pfx_file = 'cert/SampleCert.pfx'
  t.password = 'samplepassword'
end

Returns:

  • (Boolean)

    An instance of Boolean



# File ''

add_param :certificate, Boolean, { :hidden_value => true }

- (String) checkstore

Check Store Signing options

Returns:

  • (String)

    An instance of String



# File ''

add_param :checkstore, String

- (String) cn

The Certificate name.

Returns:

  • (String)

    An instance of String



# File ''

add_param :cn, String, { :delimiter => ' ' }

- (String) country

Country, follows certificate.

Returns:

  • (String)

    An instance of String



# File ''

add_param :country, String

- (Array<String> [Files]) included_files

A list of files to include in the

Returns:

  • (Array<String> [Files])

    An instance of Array<String> [Files]



# File ''

add_param :included_files, Files, { :hidden_name => true }

- (Array<String> [Paths]) included_paths

A list of paths (directories) to search for contents that will be included in the packaged AIR application.

If files are hidden from the file system, they will not be included.

Returns:

  • (Array<String> [Paths])

    An instance of Array<String> [Paths]



# File ''

add_param :included_paths, Paths, { :hidden_name => true }

- (String) key_type

Key Type, follows certificate.

Returns:

  • (String)

    An instance of String



# File ''

add_param :key_type, String, { :hidden_name => true }

- (String) keypass

A Signing Option

Returns:

  • (String)

    An instance of String



# File ''

add_param :keypass, String, { :delimiter => ' ' }

- (String) keystore

A Signing Option

Returns:

  • (String)

    An instance of String



# File ''

add_param :keystore, String, { :delimiter => ' ' }

- (Array<String> [Files]) migrate

Expects Signing Options, plus two files:

1) The Air file in 2) The Air file out

Returns:

  • (Array<String> [Files])

    An instance of Array<String> [Files]



# File ''

add_param :migrate, Files

- (String) org_name

Organization name, follows certificate.

Returns:

  • (String)

    An instance of String



# File ''

add_param :org_name, String

- (String) org_unit

Organization unit, follows certificate.

Returns:

  • (String)

    An instance of String



# File ''

add_param :org_unit, String

- (Boolean) package

Create an AIR package.

Returns:

  • (Boolean)

    An instance of Boolean



# File ''

add_param :package, Boolean, { :hidden_value => true }

- (File) package_input

The XML application descriptor that should be used to create an AIR application.

Returns:

  • (File)

    An instance of File



# File ''

add_param :package_input, File, { :hidden_name => true }

- (String) package_output

The AIR file that should be created after packaging is complete.

Returns:

  • (String)

    An instance of String



# File ''

add_param :package_output, String, { :hidden_name => true }

- (String) password

When creating a certificate, this is the file where the password can be found.

Returns:

  • (String)

    An instance of String



# File ''

add_param :password, String, { :hidden_name => true, :delimiter => ' ' }

- (String) pfx_file

PFX File

Returns:

  • (String)

    An instance of String



# File ''

add_param :pfx_file, String, { :hidden_name => true }

- (String) providername

A Signing Option

Returns:

  • (String)

    An instance of String



# File ''

add_param :providername, String, { :delimiter => ' ' }

- (Array<String> [Files]) sign

Expects two files:

1) The Airi file (?) 2) The Air file

Returns:

  • (Array<String> [Files])

    An instance of Array<String> [Files]



# File ''

add_param :sign, Files, { :delimiter => ' ' }

- (String) storepass

Provide the password directly to the ADT task so that it doesn't attempt to prompt.

Returns:

  • (String)

    An instance of String



# File ''

add_param :storepass, String, { :delimiter => ' ' }

- (String) storetype

A Signing Option

Returns:

  • (String)

    An instance of String



# File ''

add_param :storetype, String, { :delimiter => ' ' }

- (String) tsa

A Signing Option

Returns:

  • (String)

    An instance of String



# File ''

add_param :tsa, String

- (String) version

The AIR runtime version to use.

Returns:

  • (String)

    An instance of String



# File ''

add_param :version, String, { :delimiter => ' ' }