bb-ant-tools
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:Simple yet powerful custom ant tasks for building BlackBerry applications.
********************************************************************************
*                         BlackBerry Ant Tools @VERSION@                           *
********************************************************************************

Prerequisites:
--------------

- RIM JDE (tested with 4.1 and up)
- Java 1.5 or higher
- Apache Ant 1.7.x or higher



Using:
------

- Copy the bb-ant-tools.jar into the your Ant lib directory, in $HOME/.ant/lib,
  or add bb-ant-tools.jar to the classpath in your build script.
- Add the  to your build script, eg:
  
    or
  
- Enjoy (see examples below)



Reference:
----------

The  and  tasks will first try to get the "jde.home" property
from the project.  If this property is not set, then the "jdehome" attribute
must be explicitly set for these tasks.



Runs the rapc compiler. The rapc task runs the compiler in much the same way
as the RIM JDE.  The JDE project/workspace files are however not used for
building cod files.  The nested  element is used to specify all cod file
properties.

The rapc task behaves similar to the javac task in that it will check the
modified time of the source files and compare it to the modified time of the
cod file. It will compile if one or more of the source files is newer than
the existing cod file.

 Parameters
============

  jdehome
  ----------------------------------------------------------------------------
  Sets the JDE home directory.  This attribute is required when the "jde.home"
  property is not defined at the project level.
  
  jdkhome
  ----------------------------------------------------------------------------
  Sets an alternative JVM home directory.  Use this to override the version
  of the JVM used to execute the rapc compiler.  When this attribute is not
  defined, the systems default JVM is used.
  
  srcdir
  ----------------------------------------------------------------------------
  Directory containing source files.  This attribute is required when the
  nested  property is not used.  An error is occurs if both the nested
   property and the "srcdir" attribute is specified.
  
  destdir
  ----------------------------------------------------------------------------
  Output directory of .cod file.  When not defined, the base directory of the
  Ant build file is used.
  
  exepath
  ----------------------------------------------------------------------------
  Explicitly define the directory containing the preverify command used by
  the rapc compiler.  When not defined, the systems default PATH is used.
  
  output
  ----------------------------------------------------------------------------
  Name of output file, eg: .cod, .cso, etc.  This attribute
  is required.
  
  import
  ----------------------------------------------------------------------------
  Path of .jar files to import.  Path strings consist of relative or absolute
  path names delimited by a ';' (Windows) or ':' (Unix) character.  The rapc
  task will always add the net_rim_api.jar file by default.  This attribute
  is optional.
  
  importref
  ----------------------------------------------------------------------------
  Path of .jar files to import given as a reference to a path defined
  elsewhere.  The rapc task will always add the net_rim_api.jar file by
  default.  This attribute is optional.

  defines
  ----------------------------------------------------------------------------
  ':' or ';' delimited list of preprocessor tags.  This attribute is optional.
  See the note below regarding preprocessor usage.

  quiet
  ----------------------------------------------------------------------------
  Tells the rapc compiler to be less chatty.  Optional, defaults to true.
  
  verbose
  ----------------------------------------------------------------------------
  Turn on verbose output of the rapc compiler.  Optional, defaults to false.
  
  nodebug
  ----------------------------------------------------------------------------
  Turn off generation of .debug files.  Optional, defaults to false.
  
  nowarn
  ----------------------------------------------------------------------------
  Disable warning messages.  Optional, defaults to false.
  
  warnerror
  ----------------------------------------------------------------------------
  Treat all warnings as errors.  Optional, defaults to false.
  
  noconvert
  ----------------------------------------------------------------------------
  Do not convert all images to PNG.  Optional, defaults to false.

  nopreverify
  ----------------------------------------------------------------------------
  Do not call the preverify executable.  Optional, defaults to false.
  
  encoding
  ----------------------------------------------------------------------------
  Set file encoding name for source files.  Optional, uses system default.

  generatesourcelist
  ----------------------------------------------------------------------------
  Generate list of source files in text file.  Set this to true when java
  returns "CreateProcess error=87" on Windows.  Optional, defaults to false.
  
  sourcelistfile
  ----------------------------------------------------------------------------
  Set the name of the source list file.  Use this to override the name of
  the file created when "generatesourcelist" is set to true.  The default
  file name is "sources.txt".

 Parameters specified as nested elements
=========================================
  
  
  ----------------------------------------------------------------------------
  Zero or more preprocessor tag definitions nested as elements.
    
    tag
    ------------------------------------------------------------------------
    Name of preprocessor tag eg: THE_DEFINED_TAG.  Required.
    
    if
    ------------------------------------------------------------------------
    Define tag only when the named property is set.  Optional.
    
    unless
    ------------------------------------------------------------------------
    Define tag only when the named property is NOT set.  Optional.
  
  
  ----------------------------------------------------------------------------
  Path like structure of files to compile.  The  element can contain
  , , or any other path like element.  A path defined
  elsewhere can be referenced by setting the "refid" attribute of .
  If the "srcdir" attribute was not defined, the  element must contain
  one or more resources to compile.
  
  
  ----------------------------------------------------------------------------
  Path like structure of jar files to import.  The rapc task will always add
  the net_rim_api.jar file by default.  This parameter is optional.
  
  
  ----------------------------------------------------------------------------
  Collection of project attributes.
  
    type
    ------------------------------------------------------------------------
    Type of cod file to create.  Valid values are "library", "cldc",
    "midlet".  When "midlet" is specified, the midletclass property is
    required.  The default is "cldc".
    
    title
    ------------------------------------------------------------------------
    Module title.  The title appears below the icon and in the applications
    list on the device.
    
    vendor
    ------------------------------------------------------------------------
    Company name.  The vendor string appears in the applications properties
    on the device.
    
    version
    ------------------------------------------------------------------------
    Module version number.  Version number strings must contain only numbers
    and dots.  If not set, the default is 0.0.
    
    description
    ------------------------------------------------------------------------
    Module description.  The description string appears in the application
    properties on the device.
    
    arguments
    ------------------------------------------------------------------------
    Space delimited list of arguments passed to the main method.
    
    midletclass
    ------------------------------------------------------------------------
    Fully qualified class name of the class extending
    javax.microedition.midlet.MIDlet.
    
    systemmodule
    ------------------------------------------------------------------------
    Set to true for a system module.  System modules run in the background
    and do not have an icon on the home screen.
    
    runonstartup
    ------------------------------------------------------------------------
    Set to true if application should start when device starts.
    
    startuptier
    ------------------------------------------------------------------------
    Startup priority relative to other applications.  The default value is
    7, lower value = higher priority.
    
    ribbonposition
    ------------------------------------------------------------------------
    Position of icon in ribbon.  The default is 0, higher values move the
    icon closer to the top of the ribbon.
    
    nameresourcebundle
    ------------------------------------------------------------------------
    Name of resource bundle that contains the module title,
    eg: ca.slashdev.MyAppResources
    
    nameresourceid
    ------------------------------------------------------------------------
    The id of the resource that contains the module title, eg: 1234.
    
    icon
    ------------------------------------------------------------------------
    Ribbon icon.  Path must be relative to destdir, eg: ../img/ribbon1.png.
    Use a comma delimited list to set multiple icons.
    
    focusicon
    ------------------------------------------------------------------------
    Ribbon focus icon (>= JDE 4.7).  Path must be relative to destdir,
    eg: ../img/focus1.png.  Use a comma delimited list to set multiple focus
    icons.
    
    file
    ------------------------------------------------------------------------
    Properties file containing the project attributes.  Property names
    must match the names defined above.
    
     - nested element of 
    ------------------------------------------------------------------------
    Defines zero or more alternate entry points, CLDC applications only.
    The  element is a nested element of  and supports a subset
    of project attributes.
    
      title
      --------------------------------------------------------------------
      For non-system modules, defines the title for the ribbon icon.
      
      arguments
      --------------------------------------------------------------------
      Space delimited list arguments passed to the main method.
      
      systemmodule
      --------------------------------------------------------------------
      Set to true for a system module.  System modules run in the
      background and do not have an icon on the home screen.
      
      runonstartup
      --------------------------------------------------------------------
      Set to true if application should start when device starts.
      
      startuptier
      --------------------------------------------------------------------
      Startup priority relative to other applications.  The default value
      is 7, lower value = higher priority.
      
      ribbonposition
      --------------------------------------------------------------------
      Position of icon in ribbon.  The default is 0, higher values move
      the icon closer to the top of the ribbon.
    
      nameresourcebundle
      --------------------------------------------------------------------
      Name of resource bundle that contains the module title,
      eg: ca.slashdev.MyAppResources
      
      nameresourceid
      --------------------------------------------------------------------
      The id of the resource that contains the module title, eg: 1234.
    
      icon
      --------------------------------------------------------------------
      Ribbon icon.  Path must be relative to destdir, eg: ../img/ribbon1.png.
      Use a comma delimited list to set multiple icons.
      
      focusicon
      --------------------------------------------------------------------
      Ribbon focus icon (>= JDE 4.7).  Path must be relative to destdir,
      eg: ../img/focus1.png.  Use a comma delimited list to set multiple focus
      icons.
      
      file
      --------------------------------------------------------------------
      Properties file containing the project attributes.  Property names
      must match the names defined above.
      
      if
      --------------------------------------------------------------------
      Include entry point when the named property is set.  Optional.
      
      unless
      --------------------------------------------------------------------
      Include entry point when the named property is NOT set.  Optional.

 Preprocessor
==============

Apparently since version 4.0, rapc compiler has had support for a simple set
of preprocessor macros.  To use the preprocessor you must:

 * have version 4.x or higher of JDE
 * enable processing on a per file basis by placing //#preprocess in the very
   first line of each .java file
 * use //#ifdef , //#ifndef  to begin a block of text that will be
   conditionally compiled if the TAG is defined or undefined respectively
 * use //#else after //#ifdef  or //#ifndef 
 * close conditional blocks with //#endif

Preprocessor defines can be specified as a colon or semi-colon delimited list
as an attribute of the  tag OR zero or more nested  elements.
See reference documentation for  task above.

 Examples
==========







...

   





...

   
   
      
         
         
      
   
   





   
   





   






Sigtool task will launch the signature tool on a given cod file or set of
cod files.  When the cod file is successfully signed, a file is created
along side the cod file to mark it as signed.

 Parameters
============

  jdehome
  ----------------------------------------------------------------------------
  Set the JDE home directory.  This attribute is required when the "jde.home"
  property is not defined at the project level *and* the "sigtooljar"
  attribute has not been set.
  
  sigtooljar
  ----------------------------------------------------------------------------
  Set the path to the signature tool jar file.  When this attribute is
  set the "jdehome" attribute is optional.
  
  codfile
  ----------------------------------------------------------------------------
  Single cod file to sign.
  
  forceclose
  ----------------------------------------------------------------------------
  Close signature tool even if signature failed.  Default is false.
  
  close
  ----------------------------------------------------------------------------
  Close after signature request if no errors have occured.  Default is true.
  
  request
  ----------------------------------------------------------------------------
  Request signature when application launches.  Default is true.
  
  password
  ----------------------------------------------------------------------------
  Removes the interactive password prompt.  This implicitly sets "close" and
  "request" to true.

 Parameters specified as nested elements
=========================================

Sigtool task supports selecting cod files using nested resource collections
such as  and .

 Examples
==========






...

    






Alx task creates a directory structure of cod files and an .alx file.  The
purpose of the task is to generate a directory that can be easily zipped
for creating an installation package.  Therefore cod files are always
copied to the destination directory.

The task fully supports generating expressions that limit which files will
be selected by the application loader (Loader.exe) based on OS version.

 Parameters
============

  destdir
  ----------------------------------------------------------------------------
  Destination director for .cod files and .alx file.  If the directory does
  not exist, it will be created.  This attribute is required.
  
  filename
  ----------------------------------------------------------------------------
  Name of .alx file to generate.  This attribute is required.

 Parameters specified as nested elements
=========================================

  
  ----------------------------------------------------------------------------
  Nested elements of .  The "id" attribute is required.  The remaining
  attributes are for information purposes only in the application loader
  program (Loader.exe).
    
    id
    ------------------------------------------------------------------------
    Unique id of the application, eg: com.mycompany.myapp.  This attribute
    is required.
    
    name        - application name.
    description - application description
    version     - version number, eg: 1.0
    vendor      - vendor string, eg: My Company
    copyright   - copyright information
    
    file
    ------------------------------------------------------------------------
    Optionally specify a properties file of application attributes, must
    match names defined above.  *NOTE*: 'title' is recognized as an alias
    for 'name' so properties files created for  type can be used here.

    greaterthan
    ------------------------------------------------------------------------
    Only install application on versions of the BlackBerry software greater
    than the given version.
    
    greaterthanequal
    ------------------------------------------------------------------------
    Only install application on versions of the BlackBerry software greater
    than or equal to the given version.
    
    lessthan
    ------------------------------------------------------------------------
    Only install application on versions of the BlackBerry software less than
    the given version.
    
    lessthanequal
    ------------------------------------------------------------------------
    Only install application on versions of the BlackBerry software less than
    or equal to the given version.

    
    ------------------------------------------------------------------------
    One or more nested elements of  element.
    
    Cod files must be listed using nested resource collections such as
     and .
    
    Cod file sets can be used to target specific versions of the BlackBerry
    software by setting either or both of the greaterthan and lessthan
    properties.  Both properties have the alternate inclusive version
    greaterthanequal and lessthanequal.
    
      dir
      --------------------------------------------------------------------
      Directory for cod files in destination directory.
      
      greaterthan
      --------------------------------------------------------------------
      Only install cod files on versions of the BlackBerry software
      greater than the given version.
      
      greaterthanequal
      --------------------------------------------------------------------
      Only install cod files on versions of the BlackBerry software
      greater than or equal to the given version.
      
      lessthan
      --------------------------------------------------------------------
      Only install cod files on version of the BlackBerry software
      less than the given version.
      
      lessthanequal
      --------------------------------------------------------------------
      Only install cod files on version of the BlackBerry software
      less than or equal to the given version.

 Examples
==========



   
      
         
      
   





   
      
         
      
      
      
         
      
      
      
         
      
      
      
         
      
   







Simple task that takes an input .jad file and rewrites it with one or more
new cod files.  The .jad file is updated with accurate .cod file sizes and
SHA1 checksums.

The cod files are copied to the directory where the .jad file is created.
If the cod file contains siblings, the cod file is automatically extracted.

 Parameters
============

  input
  ----------------------------------------------------------------------------
  Input .jad file.  This attribute is required.
  
  destdir
  ----------------------------------------------------------------------------
  Destination directory for cod files and new jad file.  This attribute is
  required.
  
 Parameters specified as nested elements
=========================================

Jadtool task supports selecting cod files using nested resource collections
such as  and .  At least one cod file must be selected.

  
  ----------------------------------------------------------------------------
  Nested element of .  Provides the ability to add and/or update
  fields in the destination .jad file.

    key
    ------------------------------------------------------------------------
    Name of .jad property to add/change
    
    value
    ------------------------------------------------------------------------
    New value for .jad property

 Examples
==========



   




   
   




Licensing:
----------
This product is distributed under the GPL. Please read through the file
COPYING for more information about our license.

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。