Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Testing and Deployment

Reply
Contributor
mudassirmir83
Posts: 11
Registered: ‎09-09-2010
My Device: bold

problem in building the application using Ant

[ Edited ]

Actually i want to build my BB application using BB ant tool. it is working fine but there is one issue

like the resources i include(eg images) are added directly , means it is not creating the directory structure as is defined in the application.

When i build the same application using JDE it is creating the directory structure as is defined in the application.

I tested it by extracting the Jar file that is created after compiling the application.

When build using JDE the res folder is created and within that folder other folders are created ant the images are present in those folders.

 

But when i build it using BB ant, no folder is created, images are directly added to the main folder, but for src it is creating the directory structure.

 

the script i am using is

 

 

 

<?xml version="1.0" encoding="UTF-8"?>

<project name="DexKnows" default="simulate" basedir=".">

<taskdef resource="bb-ant-defs.xml" classpath="lib/bb-ant-tools.jar" />

<property name="jdehome" value="D:\Program Files\Research In Motion\BlackBerry JDE 4.6.1" />

<property name="simulator" value="${jdehome}\simulator" />

<property name="bin" value="${jdehome}\bin" />
<property name="jdk" location="C:\Program Files\Java\jdk1.6.0_14"/>


<target name="debug" depends="deploy" description="Builds, Deploys Project and Launches Remote Debug Server">
<exec executable="cmd.exe" dir="${bin}" spawn="true">
<arg value="jdwp.bat" />
</exec>
</target>

<target name="simulate" depends="crearezip" description="Builds, Deploys Project and Launches Simulator">
<exec executable="cmd.exe" dir="${simulator}" spawn="true">

<arg value="8900.bat" />
</exec>
</target>

<target name="deploy" depends="buildRIM" description="Builds and Deploys Project">
<copy todir="${simulator}" overwrite="true">
<fileset dir="output">
<include name="*.cod" />
<include name="*.csl" />
<include name="*.cso" />
</fileset>
</copy>
</target>

<target name="buildRIM" depends="buildLib" description="Builds Project">
<rapc jdehome="${jdehome}" jdkhome="${jdk}" output="DexKnows" quiet="false" defines="PREPROCESSOR;ANALYTICS_ENABLED" destdir="output" verbose="true" import="lib/FlurryAgent.jar">
<jdp type="cldc" title="DexKnows" vendor="mportal" version="Version=0.9" description="DexKnows"
arguments=""
systemmodule="false"
runonstartup="false"
startuptier="7"
ribbonposition="0"
icon="res/appicon.png"
>
</jdp>
<src>
<fileset dir=".">

<include name="src/**/*.java"/>
<include name="**/*.rrc" />
<include name="**/*.rrh" />
<include name="res/**/*.*"/>
</fileset>
</src>
</rapc>
</target>


<target name="buildLib" description="Builds Project">
<rapc jdehome="${jdehome}" jdkhome="${jdk}" output="FlurryAgent" quiet="false" destdir="output">

<jdp type="library" title="title" vendor="vendor" version="1.0" description="description" arguments="" systemmodule="false" runonstartup="false" startuptier="7"
ribbonposition="0"
icon="">
</jdp>
<src>
<fileset dir=".">
<include name="lib/FlurryAgent.jar"/>
</fileset>
</src>
</rapc>
</target>

<target name="sign" depends="buildRIM">
<sigtool jdehome="${jdehome}" codfile="D:\DexKnows\DexKnows_7Sep\DexKnows.cod" />
</target>

<target name="crearezip" depends="deploy">
<jadtool input="output/DexKnows.jad" destdir="output/ota">
<fileset dir="output" includes="*.cod" />
<override key="Dex" value="dex1" />
</jadtool>

</target>

</project>

 

 

Contributor
openstringed
Posts: 12
Registered: ‎10-29-2010
My Device: Not Specified

Re: problem in building the application using Ant

Hi........im facing the same problem and hence not able to run my application......can you please share the solution......it'll be really helpful......thanks in advance

New Contributor
soroya
Posts: 7
Registered: ‎04-29-2010
My Device: 8300

Re: problem in building the application using Ant

<path id="src.files">
<fileset dir="src" includes="**/*" />
<fileset dir="res" includes="**/*" />
</path>

 

 

<target name="build" depends="">
<mkdir dir="${dest.dir}" />
<rapc
jdehome="${jde.home}"
destdir="${dest.dir}"
jdkhome="C:/Program Files/Java/jdk1.6.0_29"
nodebug="true"
>
<src refid="src.files" />

</rapc>
</target>

 

You can try it like this.. its not complete rapc command but just a hint how can you include source as well as resources.

If dont work let me know...