Class: FlashSDK::ADT

Inherits:
Sprout::Executable::Base
  • Object
show all
Defined in:
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'

Instance Method Summary collapse

Instance Method Details

#appidObject

The appid of the app being installed/uninstalled (ex: com.foo.Bar)



66
# File 'lib/flashsdk/adt.rb', line 66

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

#certificateObject

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


88
# File 'lib/flashsdk/adt.rb', line 88

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

#checkstoreObject

Check Store Signing options



128
# File 'lib/flashsdk/adt.rb', line 128

add_param :checkstore, String

#cnObject

The Certificate name.



191
# File 'lib/flashsdk/adt.rb', line 191

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

#countryObject

Country, follows certificate.



186
# File 'lib/flashsdk/adt.rb', line 186

add_param :country, String

#default_prefixObject

Ensure the default prefix is ‘-’



268
# File 'lib/flashsdk/adt.rb', line 268

set :default_prefix, '-'

#executableObject

The default executable target.



264
# File 'lib/flashsdk/adt.rb', line 264

set :executable, :adt

#file_optionsObject

Allows file options in the form of -C <dir> <fileOrDir>+

For example if you defined:

t.file_options    << 'dir path/to/asset.xml'

In your adt task defintion, then:

-C dir path/to/asset.xml

Would be appended to your arguments.



246
# File 'lib/flashsdk/adt.rb', line 246

add_param :file_options, Strings, { :shell_name => '-C', :delimiter => ' ' }

#included_filesObject

A list of files to include in the



221
# File 'lib/flashsdk/adt.rb', line 221

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

#included_pathsObject

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.



231
# File 'lib/flashsdk/adt.rb', line 231

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

#installAppObject

Install an app on a device



46
# File 'lib/flashsdk/adt.rb', line 46

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

#key_typeObject

Key Type, follows certificate.



196
# File 'lib/flashsdk/adt.rb', line 196

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

#keypassObject

A Signing Option



111
# File 'lib/flashsdk/adt.rb', line 111

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

#keystoreObject

A Signing Option



99
# File 'lib/flashsdk/adt.rb', line 99

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

#launchAppObject

Launch an app on a device



56
# File 'lib/flashsdk/adt.rb', line 56

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

#migrateObject

Expects Signing Options, plus two files:

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



216
# File 'lib/flashsdk/adt.rb', line 216

add_param :migrate, Files

#org_nameObject

Organization name, follows certificate.



181
# File 'lib/flashsdk/adt.rb', line 181

add_param :org_name, String

#org_unitObject

Organization unit, follows certificate.



176
# File 'lib/flashsdk/adt.rb', line 176

add_param :org_unit, String

#packageObject

Create an AIR package.



71
# File 'lib/flashsdk/adt.rb', line 71

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

#package_inputObject

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



171
# File 'lib/flashsdk/adt.rb', line 171

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

#package_outputObject

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



164
# File 'lib/flashsdk/adt.rb', line 164

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

#passwordObject

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



207
# File 'lib/flashsdk/adt.rb', line 207

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

#pfx_fileObject

PFX File



201
# File 'lib/flashsdk/adt.rb', line 201

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

#pkg_nameObject

The the Ruby file that will load the expected Sprout::Specification.

Default value is ‘flex4’



254
# File 'lib/flashsdk/adt.rb', line 254

set :pkg_name, 'flex4'

#pkg_versionObject

The default pkg version



259
# File 'lib/flashsdk/adt.rb', line 259

set :pkg_version, ">= #{FlashSDK::VERSION}"

#platformObject

The platform to use (ex: android)



61
# File 'lib/flashsdk/adt.rb', line 61

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

#providernameObject

A Signing Option



117
# File 'lib/flashsdk/adt.rb', line 117

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

#provisioning_profileObject

Provisioning profile for iOS apps



133
# File 'lib/flashsdk/adt.rb', line 133

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

#signObject

Expects two files:

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



147
# File 'lib/flashsdk/adt.rb', line 147

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

#storepassObject

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



105
# File 'lib/flashsdk/adt.rb', line 105

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

#storetypeObject

A Signing Option



93
# File 'lib/flashsdk/adt.rb', line 93

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

#targetObject

Use a specific target, like apk-debug for Android or ipa-debug for iOS



158
# File 'lib/flashsdk/adt.rb', line 158

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

#tsaObject

A Signing Option



123
# File 'lib/flashsdk/adt.rb', line 123

add_param :tsa, String

#uninstallAppObject

Uninstall an app from a device



51
# File 'lib/flashsdk/adt.rb', line 51

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

#versionObject

The AIR runtime version to use.



152
# File 'lib/flashsdk/adt.rb', line 152

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