`
wuhua
  • 浏览: 2111846 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

Collection of ant tasks for building blackberry application

阅读更多
Collection of ant tasks for building blackberry applications. Home Documentation Support SourceForge Project Page Downloads Credits Documentation Requirements Reference <rapc><sigtool><alx><jadtool> Preprocessor Examples Requirements RIM JDE (tested with 4.1 and up) Java 1.5 or higher Apache Ant 1.7.x or higher Important! The Java JDK's bin directory must be in your systems PATH environment variable. For windows: set PATH=%PATH%;%JAVA_HOME%\bin For Unix: export PATH=$PATH:$JAVA_HOME/bin Reference The <rapc> and <sigtool> 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. <rapc> 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 <jdp> 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 Attributes Description Required jdehome Sets the JDE home directory. This attribute is required when the jde.home property is not defined at the project level. Optional 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. Optional exepath Explicitly define the directory containing the preverify command used by the rapc compiler. When not defined, the systems default PATH is used. Optional srcdir Directory containing source files. This attribute is required when the nested <src> property is not used. An error occurs if both the nested <src> property and the srcdir attribute is specified. Optional destdir Output directory of .cod file. When not defined, the base directory of the Ant build file is used. Optional output Name of output file, eg: [output].cod, [output].cso, etc. 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. 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. Optional defines ':' or ';' delimited list of preprocessor tags. See the note below regarding preprocessor usage. Optional quiet Tells the rapc command to be less chatty, default to false. Optional verbose Turn on verbose output of the rapc compiler, default is false. Optional nodebug Turn off generation of .debug files, default is false. Optional nowarn Disable warning messages, default is false. Optional warnerror Treat all warnings as errors, default is false. Optional noconvert Don't convert images to png, default is false. Optional nopreverify Do not call the preverify executable, default is false. Optional 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. Optional 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. Optional Nested elements <define> Zero or more preprocessor tag definitions nested as elements. Attributes Description Required 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 <src> Path like structure of files to compile. The <src> element can contain <fileset>, <filelist>, or any other path like element. A path defined elsewhere can be referenced by setting the refid attribute of <src>. If the srcdir attribute was not defined, the <src> element must contain one or more resources to compile. <import> 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. <jdp> Collection of cod file properties. Optionally, place the cod properties in a properties file and set the file attribute. The property names must match the attribute names in the table below. Attributes Description Default file Properties file containing the project attributes. Property names must match the names defined below. type Type of cod file to create. Valid values are "library", "cldc", "midlet". When "midlet" is specified, the midletclass property is required. "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. 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. false runonstartup Set to true if application should start when device starts. false startuptier Startup priority relative to other applications. Valid values are 0-7, lower value = higher priority. 7 ribbonposition Position of icon in ribbon. Higher values move the icon closer to the top of the ribbon. 0 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 (&gt;= JDE 4.7). Path must be relative to destdir, eg: ../img/focus1.png. Use a comma delimited list to set multiple focus icons. <entry> Nested element of <jdp>. Contains attributes for specifying an alternate entry point for CLDC applications. It contains a subset of attributes available in <jdp>. Optionally, place entry point properties in a properties file and set the file attribute. The property names must match the attribute names in the table below. Attributes Description Default file Properties file containing the project attributes. Property names must match the names defined below. 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. false runonstartup Set to true if application should start when device starts. false startuptier Startup priority relative to other applications. Valid values are 0-7, lower value = higher priority. 7 ribbonposition Position of icon in ribbon. Higher values move the icon closer to the top of the ribbon. 0 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 (&gt;= JDE 4.7). Path must be relative to destdir, eg: ../img/focus1.png. Use a comma delimited list to set multiple focus icons. if Include entry point when the named property is set. unless Include entry point when the named property is NOT set. <sigtool> Sigtool task will launch the signature tool on a given cod file or set of cod files. If a single cod file is specified, then a file will be created along side the cod file to mark it as signed. Parameters Attributes Description Required jdehome Sets the JDE home directory. This attribute is required when the jde.home property is not defined at the project level. Optional codfile Single cod file to sign. Optional forceclose Close signature tool even if signature failed. Default is false. Optional close Close after signature request if no errors have occurred. Default is true. Optional request Request signature when application launches. Default is true. Optional password Removes the interactive password prompt. This implicitly sets "close" and "request" to true. Optional Nested elements Sigtool task supports selecting cod files using nested resource collections such as <fileset> and <filelist>. <alx> 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. To target a specific version of the BlackBerry software set either or both both of the greaterthan and lessthan attributes in the <application> or <codset> tags. Parameters Attributes Description Required destdir Destination director for .cod files and .alx file. If the directory does not exist, it will be created. Required filename Name of .alx file to generate. Required Nested elements <application> Nested elements of <alx>. The id attribute is required. The remaining attributes are for information purposes only in the application loader program (Loader.exe). Attributes Description Required id Unique id of the application, eg: com.mycompany.myapp. Required file Optionally specify a properties file of application attributes, must match names defined below. NOTE: 'title' is recognized as an alias for 'name' so properties files created for <jdp> type can be used here. Optional name Application name. Optional description Application description. Optional version Version number, eg: 1.0 Optional vendor Vendor string, eg: My Company. Optional copyright Copyright information. Optional greaterthan Only install application on versions of the BlackBerry software greater than the given version. Optional greaterthanequal Only install application on versions of the BlackBerry software greater than or equal to the given version. Optional lessthan Only install application on versions of the BlackBerry software less than the given version. Optional lessthanequal Only install application on versions of the BlackBerry software less than or equal to the given version. Optional <codset> One or more nested elements of <application> element. Cod files must be listed using nested resource collections such as <fileset> and <filelist>. Attributes Description Required dir Directory for cod files in destination directory. Optional greaterthan Only install cod files on versions of the BlackBerry software greater than the given version. Optional greaterthanequal Only install cod files on versions of the BlackBerry software greater than or equal to the given version. Optional lessthan Only install cod files on version of the BlackBerry software less than the given version. Optional lessthanequal Only install cod files on version of the BlackBerry software less than or equal to the given version. Optional <jadtool> 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 Attributes Description Required input Input .jad file. Required destdir Destination directory for cod files and new jad file. Required Nested elements Jadtool task supports selecting cod files using nested resource collections such as <fileset> and <filelist>. At least one cod file must be selected. <override> Nested elements of <jadtool>. Provides the ability to add and/or update fields in the destination .jad file. Attributes Description Required key Name of .jad property to add/change Required value New value for .jad property Required Preprocessor Apparently since version 4.0, rapc compiler has had support for a simple set of preprocessor macros. To use the preprocessor you must: enable processing on a per file basis by placing //#preprocess in the very first line of each .java file use //#ifdef <tag>, //#ifndef <tag> to begin a block of text that will be conditionally compiled if the TAG is defined or undefined respectively use //#else after //#ifdef <tag> or //#ifndef <tag> close conditional blocks with //#endif Preprocessor defines can be specified as a colon or semi-colon delimited list as an attribute of the <rapc> tag OR zero or more nested elements. Examples Example 1 <!-- bare minimum usage --> <rapc output="ca_slashdev_MyKickAssApp" srcdir="${src.dir}" jdehome="${jde.home}"></rapc> Example 2 <!-- uses jde.home property from project, specifies app title, vendor, etc --> <property name="jde.home" location="c:/jde4.1"></property> ... <rapc output="ca_slashdev_MyKickAssApp" srcdir="${src.dir}"><jdp title="Kick Ass App" vendor="Slashdev" version="1.0" type="cldc"></jdp></rapc> Example 3 <!-- use fileset to select source files, import dependency lib --> <property name="jde.home" location="c:/jde4.1"></property> ... <rapc output="ca_slashdev_MyKickAssApp"><jdp title="Kick Ass App" vendor="Slashdev" version="1.0" type="cldc"></jdp><src><fileset dir="${src.dir}"><includes name="**/*.java"></includes><includes name="**/*.rrc"></includes></fileset></src><import location="../libKickAss/ca_slashdev_libKickAss.jar"></import></rapc> Example 4 <!-- use the preprocessor --> <rapc output="ca_slashdev_MyKickAssApp" srcdir="${src.dir}" defines="TAG1;TAG2"><define tag="TAG3"></define><define tag="TAG4"></define></rapc> Example 5 <!-- sign single cod file --> <sigtool jdehome="${jde.home}" codfile="build/ca_slashdev_MyKickAssApp.cod"></sigtool> Example 6 <!-- jde.home property from project, fileset selects multiple cod files --> <property name="jde.home" location="c:/jde4.1"></property> ... <sigtool password="1234"><fileset dir="build" includes="*.cod"></fileset></sigtool> Example 7 <!-- simple example, create zip file --> <alx destdir="release" filename="myapp.alx"><application id="ca.slashdev.myapp" name="My App"><codset><fileset dir="build" includes="*.cod"></fileset></codset></application></alx><zip destfile="release.zip" basedir="release"></zip> Example 8 <!-- cod files for specific versions of OS --> <alx destdir="release" filename="myapp.alx"><application id="ca.slashdev.myapp" name="My App"><codset><fileset dir="build" includes="*.cod"></fileset></codset><!-- 4.1 up to but not including 4.2 --><codset greaterthanequal="4.1" lessthan="4.2"><fileset dir="build41" includes="*.cod"></fileset></codset><!-- 4.2.0 only --><codset greaterthanequal="4.2.0" lessthan="4.2.1"><fileset dir="build42" includes="*.cod"></fileset></codset><!-- 4.2.1 and above --><codset greaterthanequal="4.2.1"><fileset dir="build421" includes="*.cod"></fileset></codset></application></alx><zip destfile="release.zip" basedir="release"></zip> Example 9 <!-- jadtool task is pretty simple --> <jadtool input="ca_slashdev_myapp.jad" destdir="ota"><fileset dir="build" includes="*.cod"></fileset></jadtool> Example 10 <!-- override the name of the application title in Options/Applicaions --> <jadtool input="ca_slashdev_myapp.jad" destdir="ota"><fileset dir="build" includes="*.cod"></fileset><override key="MIDlet-Name" value="My Title"></override></jadtool> Site powered by: | Markdown | MagpieRSS Tasks </rapc></tag></tag></tag></tag></jadtool></override></filelist></fileset></jadtool></filelist></fileset></application></codset></jdp></alx></application></codset></application></alx></filelist></fileset></sigtool></jdp></jdp></entry></jdp></import></src></src></filelist></fileset></src></src></define></src></src></jdp></rapc></sigtool></rapc></jadtool></alx></sigtool></rapc>
分享到:
评论

相关推荐

    maven-ant-tasks-2.1.3.zip

    《Maven Ant Tasks 2.1.3:构建与集成利器》 在软件开发领域,Maven 和 Ant 是两种广泛使用的构建工具。Maven 以其强大的依赖管理和项目生命周期管理功能著称,而 Ant 则以其灵活性和可定制性受到开发者青睐。然而...

    maven-ant-tasks.jar

    还在为找不到jar文件烦心吗,不用了到我空间来有你想要的,持续更新。。。 maven-ant-tasks.jar

    使用Flex Ant Tasks编译工程文件

    本话题将深入探讨如何使用Flex Ant Tasks来编译工程文件,这是一款基于Apache Ant的工具,专为Adobe Flex应用程序开发设计。Ant是一个流行的Java项目管理工具,而Flex Ant Tasks则扩展了Ant,增加了对Flex SDK的支持...

    maven-ant-tasks-2.1.3-src

    The Mavent Ant Tasks allow several of Maven's artifact handling features to be used from within an Ant build. These include: Dependency management - including transitive dependencies, scope ...

    ant-tasks-2.1.3.jar.zip

    标题“ant-tasks-2.1.3.jar.zip”指的是一个特定版本的Ant任务库的压缩文件,版本号为2.1.3,且已经打包成了JAR(Java Archive)格式,然后进一步压缩成ZIP文件以方便下载和传输。这个文件主要与Apache Ant构建工具...

    apache-ant-1.7.1-bin.zip_Ant 1.7_Apache-Ant 1.7.1_ant1.7_apache

    Ant 1.7 starts outsourcing of optional tasks to Antlibs. The .NET antlib in preparation will replace the .NET optional tasks which ship in Ant. Support for the version control system Subversion will ...

    ant-tasks-2.4.1.FINAL.jar.zip

    《Ant Tasks 2.4.1.FINAL.jar:构建自动化利器》 在软件开发领域,自动化构建工具扮演着至关重要的角色,它们能够有效地管理和编译项目,自动化执行各种任务,节省时间和精力。其中,Apache Ant是Java开发中广泛...

    ant-tasks-2.1.3.jar

    标签:ant-tasks-2.1.3.jar,ant,tasks,2.1.3,jar包下载,依赖包

    ant-intellij-tasks.jar

    官方版本,亲测可用

    ant-tasks-2.1.4.jar

    标签:ant-tasks-2.1.4.jar,ant,tasks,2.1.4,jar包下载,依赖包

    Android SDK 26以后ant编译错误解决(ant-tasks.jar等文件)

    Android SDK 26以后ant编译错误解决办法(错误信息:taskdef A class needed by class com.android.ant.GetUiTargetTask) https://blog.csdn.net/xlyrh/article/details/107766878

    maven-ant-tasks-2.1.3

    The Mavent Ant Tasks allow several of Maven's artifact handling features to be used from within an Ant build. These include: Dependency management - including transitive dependencies, scope ...

    Cody's Collection of popular SAS programming tasks

    ### Cody's Collection of Popular SAS Programming Tasks and How to Tackle Them #### 一、概述 《Cody's Collection of Popular SAS Programming Tasks and How to Tackle Them》由Ron Cody编写,是SAS ...

    ant-tasks-3.1.jar

    官方版本,亲测可用

    AlienBrain Ant Tasks-开源

    《 AlienBrain Ant Tasks 开源详解》 在软件开发过程中,版本控制是不可或缺的一环,它帮助团队有效地管理和追踪代码的变化。AlienBrain是一款强大的版本控制系统,而AlienBrain Ant Tasks则是专门为AlienBrain设计...

    Ant Tasks for AccuRev-开源

    该软件为SCM工具AccuRev提供Ant任务。 它是用Java编写的,但是需要安装AccuRev客户端。 该软件与Accurev,Inc.无关。

    ( Aspose.Tasks for .NET Documentation.chm )

    ( Aspose.Tasks for .NET Documentation.chm ) 13.2 官方帮助文档,英文版

Global site tag (gtag.js) - Google Analytics